Projectile shooter plugin request

Discussion in 'Archived: Plugin Requests' started by Videogamer555, Nov 6, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Videogamer555

    I would like a projectile shooter item plugin for Bukkit server that would allow me to fire any projectile at any speed. Currently in MC (even with the summon command) there's no ability to properly summon weird projectiles like "WitherSkull" or its blue variant (the one that can destroy obsidian). I'm looking forward to a plugin that would have this syntax:
    /giveprojectileshooter <projectile-name> <projectile-speed : optional> <player-name : optional>

    Valid projectile for this plugin names may not match the actual Minecraft projectile names, but these names used in the plugin will internally link "behind the scenes" to the proper Minecraft names and code to get the desired results. The names I'm thinking of for this plugin are:
    BlazeFireball
    GhastFireball
    WitherSkull
    BlueWitherSkull
    Arrow
    PrimedTNT (yep, you could even launch this, if you want an explosion timed to go of in the air)

    And the name of the item you get, based on the command's input, will be generated on the fly.

    Let's give an example of how the command would be used:
    /giveprojectilelauncher BlueWitherSkull 3

    This will give you a weapon with the name ProjLaunch_BlueWitherSkull_3 and it will shoot BlueWitherSkulls, each at a speed of 3.
    This way you can have multiple different launchers in your inventory with different properties, because based on its properties it will actually have its own name.

    To fire the ProjectileLauncher, just aim it at a target and press the right-mouse-button. With all projectiles except the arrow, it will go in a straight line and hit the target you were aiming at. With the arrow (depending on how fast you set it, and how far you are from your target) you'll need to aim a bit above your intended target.

    The optional projectile-speed field in the command, it will use the default speed as coded in the normal vanilla Minecraft game when fired as intended by whatever enemy is normally associated with the projectile type in question.

    The optional player-name field in the command, it will by default give the person who typed the command the weapon, unless a different player's name is put in that field.

    This plugin should also include its own graphics rather than depending on existing Minecraft graphics (if this is possible), and insert them into the game on the fly. The graphic for this launcher should look something like a bazooka.
     
  2. Offline

    Skionz

    wrong section
     
  3. Videogamer555
    I decided to spend a few minutes creating this. Download | Source. Works with any entity, although it seems that only blue witherskulls cause damage to terrain.

    Command structure: /getprojectileshooter <projectile> [speed] [charged] [player]
    Example: /getprojectileshooter WITHER_SKULL 1 true

    A speed value of 1 is normal speed. The speed just multiplies the velocity of the entity, so don't make it too high (somewhere around 1.0-3.0 is good). Charged works for witherskulls only, and determines if the witherskull is blue or not. All entities and their respective names can be found here.
    http://jd.bukkit.org/rb/apidocs/org/bukkit/entity/EntityType.html

    I will later make it so it accepts e.g. WitherSkull instead of WITHER_SKULL.
     
  4. Offline

    ChipDev

    Did you hit the 'Report' button?
    I did :p
     
  5. Online

    timtower Administrator Administrator Moderator

  6. Videogamer555
    The plugin is using 1.7.9 because 1.7.10 downloads are broken. It was working fine for me, not sure what the problem here is. Is the plugin being loaded fine? Any startup errors in console? And is it in your /plugins list?

    I'll look into this tomorrow.
     
  7. Offline

    Videogamer555

    I installed the plugin, but it doesn't work. I get the error message "Unknown command. Type '/help' for help." error when using your above example command. What version of Craftbukkit server is your plugin intended to work with? My version is 1.7.10.
     
  8. Videogamer555
    I already said that in my post above. And we requested to see your server log.
     
  9. Offline

    Videogamer555

    I see the problem now. The correct command isn't "getprojectileshooter". The correct command is actually "giveprojectileshooter".
     
  10. Videogamer555
    Oops. I'll fix that tomorrow. Is the rest of the stuff working fine?
     
  11. Offline

    Videogamer555

    Yep. The rest of it is working as expected. Thanks for making that.

    One of the other things that will need to be fixed though is proper rendering of the Blaze Fireball and the Wither Skull. Those 2 projectiles appear for only a couple frames and then disappear (they continue to fly and do their damage on impact, but they are invisible as they are flying through the air). I remember reading somewhere else that these 2 projectiles are unique. Because of the way that those projectiles are coded in the game, they expect to be somehow linked to the UUID of the entity that shot them (normally a Blaze for the Blaze Fireball, and a Wither for the Wither Skull). Is there some way that you can make your mod link these projectiles to the player that fired them, so that they will be linked to the UUID of a mob (the player himself is a mob I believe as far as the game's internals are concerned), so that these 2 special projectiles will display properly while they are flying through the air after the player has launched them?
     
  12. Last edited by a moderator: Jun 10, 2016
  13. Offline

    Videogamer555

    Tried it but it had the same problem. The Blaze Fireball (SMALL_FIREBALL) and Wither Skull (WITHER_SKULL) still don't render while flying through the air, only showing for the one frame when they are created.

    And one more problem I noticed. If you land a direct hit with either the normal or charged Wither Skull, it is supposed to have a poisoning effect on the target, if the target manages to survive the actual projectile impact. I spawned some various mobs and tried targeting them with both versions of the Wither Skull. Damage was done by the direct shot, but no poisoning effect. And it's a also should be a unique poisoning effect called the "wither effect" when it's working correctly. Unlike normal poison effect (which gives off green particles around the affected target), the wither effect should give off gray particles. For a human player (so you have a heart health bar) the wither effect not only depletes your health bar slowly over time (as ordinary poisoning does) but also hides the number of hearts (health points) you have left, so you don't know how close you are to dying.
     
  14. Videogamer555
    Hmm, I'm not sure what's up with the first issue. I'll look into it and maybe ask for some help if I can't figure anything out. As for the second issue, are you on easy or peaceful difficulty? The wither effect applies only on normal+ difficulty.
     
  15. Offline

    Videogamer555

    Made any more progress yet?
     
  16. Offline

    Videogamer555

    Now the charged parameter doesn't work anymore. Whether set to True or False, it still shoots a Wither Skull that is normal (not blue) and therefore unable to shatter obsidian (or any other kind of rock for that matter).

    Not sure if this will help, but I found somebody else with a similar problem on the forums.
    https://forums.bukkit.org/threads/blue-wither-skulls.266601/

    Someone on that thread then recommended this line of code, using the setCharged function, with True as the input parameter, to make it a Blue Wither Skull.
    Code:
    ((WitherSkull) player.launchProjectile(WitherSkull.class)).setCharged(true);
    Hopefully some part of this line of code will help you in making this projectile shooter work.
     
  17. Videogamer555
    That is exactly what I am using. I tested the plugin and it was working fine for me, I'm not sure why yours isn't. I'll look at the code later and see what went wrong.
     
Thread Status:
Not open for further replies.

Share This Page