Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TNT projectile- id not found? #30

Open
jamesol1 opened this issue Sep 10, 2020 · 4 comments
Open

TNT projectile- id not found? #30

jamesol1 opened this issue Sep 10, 2020 · 4 comments

Comments

@jamesol1
Copy link

This is open to anyone who may know the answer. How do I make cannons shoot out primed tnt? The ids primed_tnt and tnt did not work/could not be found. The only other entity id I’ve gotten to work outside of snowball is fireball.

Thanks

@DerPavlov
Copy link
Owner

In the config.yml you have the option to change the projectile type. You can replace SNOWBALL with PRIMED_TNT and see what happens, but I don't know what will happen.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html

cannonball:
  #the type of the projectile entity
  #ARROW, EGG, FIREBALL, SMALL_FIREBALL, SNOWBALL, THROWN_EXP_BOTTLE, SPLASH_POTION, WITHER_SKULL
  entityType: SNOWBALL

@jamesol1
Copy link
Author

jamesol1 commented Oct 8, 2020

In the config.yml you have the option to change the projectile type. You can replace SNOWBALL with PRIMED_TNT and see what happens, but I don't know what will happen.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html

cannonball:
  #the type of the projectile entity
  #ARROW, EGG, FIREBALL, SMALL_FIREBALL, SNOWBALL, THROWN_EXP_BOTTLE, SPLASH_POTION, WITHER_SKULL
  entityType: SNOWBALL

I tried using primed tnt a few weeks ago. And well it kinda spits out of the cannon but doesn't shoot with the defined velocity like a snowball does. Not sure if there's a fix for it but yh.

@DerPavlov
Copy link
Owner

It is because I set the velocity of the projectile and somehow TNTPrimed is an entity and no a projectile. You could use other projectiles:
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Projectile.html

I might be possible to replace the projectile.setVelocity with entity.setVelocity, but I am not sure if it is worth it. Since the plugin relies on the projectile impact it might get tricky, but possible.

@jamesol1
Copy link
Author

It is because I set the velocity of the projectile and somehow TNTPrimed is an entity and no a projectile. You could use other projectiles:
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Projectile.html

I might be possible to replace the projectile.setVelocity with entity.setVelocity, but I am not sure if it is worth it. Since the plugin relies on the projectile impact it might get tricky, but possible.

Hi Pavlov.
I was wondering how one would go about doing what you mentioned above. Movecraft 'Cannon Director' aims primed tnt shot from piloted crafts with vanilla tnt cannons. I was hoping to test to see if this would work with cannons if it shot out primed tnt. The movecraft dev isn't 100% sure it would work but said its worth testing. This could scrap the need for that remote cannons which i understand is too much work.

I'm guessing its not as easy as replacing projectile.setVelocity with entity.setVelocity. If its not too difficult, if a forked version could be made so i could test to see if it works that would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants