Firework collision Fix

Discussion in 'Plugin Requests' started by Gandalf360one, Mar 19, 2023.

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

    Gandalf360one

    Plugin category: Fixes

    Minecraft version: 1.19.4

    Suggested name: Firework Collision fix

    What I want:
    Please take a look at this: MC-111442
    The listed entities should also be damaged if a firework rocket with a charge explodes near them (no direct hit) (max 2 blocks away from them for example).

    I dont know if this is against the forum rules but could it maybe please be made future break proof so it will still work at newer mc versions?

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: no permissions needed

    When I'd like it by: -
     
  2. Offline

    mehboss

    Hello Gandalf. I was looking into this for you and basically finished the plugin. But then I realize that it simply does not work because these entities are not instances of Damageable for some reason. I will look into further, but I am not sure that it is possible until MC fixes this.

    So I thought, maybe the ender dragon would be different. NOPE!
    https://hub.spigotmc.org/jira/browse/SPIGOT-1985?jql=text ~ "dragon damage"

    Now, I could get around the ender dragon with some ugly NMS code and adding thorn modifier to it. But it simply is not worth doing. As far as the other items, I can break the block that is attached to the entity and replace it back quickly to make the entity break off, but this is just a finicky workaround and is completely up to you.
     
    Last edited: Mar 20, 2023
  3. Offline

    Gandalf360one

    Thank you very much for the amount of effort you put into it till now.
    If you are still motivated for it please go ahead and do it if possible.
     
    mehboss likes this.
  4. Offline

    mehboss

    Here you go! I have finished the plugin with a workaround. If you have any issues let me know. I would appreciate feedback too!
     

    Attached Files:

  5. Offline

    Gandalf360one

    Amazing work thank you very much!!!!!
    But is it maybe pleas possible to fix these bugs:
    • End Crystals will explode (explosion damage) when they got destroyed by a Firework Rocket
    • The Ender Dragon doesnt get damaged from Firework Rockets
    • Boats will drop from explosions
    • Paintings will get destroyed from a firework
     
  6. Offline

    mehboss

    1. Do paintings get destroyed by a regular firework instead of an explosion? Also, paintings are one-impact destroy items.
    2. I made the boats drop because I figured they would act similar to a creeper explosion in which it would drop the item. I can fix that if you'd like.
    3. The ender dragon should get damaged from fireworks rockets, but I will double-check and fix it. I did test it yesterday. Probably because I set the damage to only 1, so it isn't noticeable.
    4. You want end crystals to explode as if they were mined instead of just disappearing, is that correct?
     
  7. Offline

    Gandalf360one

    1. They wont get destroyed by a regular or with a charged in them.
    2. If possible please change it thx.
    Would it also be possible to make that a boat with a chest will drop too with its contents?
    3. Sorry my bad tested it with an Ender Dragon that had no AI (No need to fix).
    4. Yes that is correct. They should explode like they were harvested or shot with a projectile (f.e. arrow).
    Destroying an end crystals with fireworks is a bit buggy. Tried to destroy the end crystals from the dragon in the end and it depends on the angle and direction of the firework when it will destroy the end crystal.
     
    Last edited: Mar 23, 2023
  8. Offline

    mehboss

    You only want these items to be damaged when the firework has stars right? Meaning normal fireworks won't do any damage because they do not have the explosion? <--- done

    Also, I have already tested the Minecart Chest and it drops the contents of the chest already, just not the minecart which I will fix.. I'm also working on fixes for the other issues right now.

    UPDATE:
    I have fixed all of the concerns.
    • Fixed end dragon damaging
    • Fixed paintings not being damaged
    • Fixed chest minecarts not dropping
    • Fixed end crystals not exploding
    • Made it so that boats no longer drop
    If these problems or any other problems still exist, let me know. I would appreciate feedback too, thanks!
     

    Attached Files:

    Last edited: Mar 23, 2023
  9. Offline

    Gandalf360one

  10. Offline

    mehboss

    Did you see the attachment I made above with my updates?
     
  11. Offline

    Gandalf360one

    Really nice work!
    Still founds some bugs sorry
    • Hopper-;Furnace-; and TNT Minecarts wont drop
    • Minecarts (all Types) will only get destroyed when look to them from the west or east direction. When looking to them from the south or north direction they wont get destroyed
    • Chest Boats wont get destroyed by firework
    • idk why but the end crystals in the end dimension at the towers are weird. Sometimes they get destroyed when a firework rocket hits and sometimes not.
     
  12. Offline

    mehboss

    • Are the minecarts direct hits when you test them or indirect hits? I have the radius set to 3 for indirect hits.
    • I will fix the hopper, furnace, and tnt minecarts right now.
    • The way I have it set up is that chest boats and all of the other items only get destroyed from explosions, not regular fireworks. Can you elaborate on this issue? I tested it and it works just fine.
    • As for end crystals, the explosion has a radius of 3. So if it is not a direct hit it will not damage the end crystals if it isn't within a radius of 3. Also, if there is a block in the way of the explosion, it will not reach it either.
    As for fixes, I can try to increase the detection radius by half a block and increase the method I use to destroy the end crystals by half a second.
     
    Last edited: Mar 24, 2023
  13. Offline

    Gandalf360one

    Yes they get hit directly but it sometimes they wont get effected idk why.
    Yes I use fireworks with explosions and not regular ones.
    If possible yes pls.

    BTW. Which server type do you use for testing? (bucket, spigot, paper, pufferfish, purpur, etc)
     
  14. Offline

    mehboss

    I use Spigot. If you don't mind, I can take this to PM and get your server IP address to make fixes and test them real-time. I'll also come here and update the jar upload once resolved so if anyone else wants to utilize the plugin they can.

    EDIT: Here is the updated jar for anyone interested. Note: (damage to ender dragon depends on stars, distance from explosion, etc and still gives kill credit to player who shot the firework)

    Firework Explosions Damage:
    • End crystals
    • Ender dragons
    • All types of boats
    • All types of minecarts
    • Leads
    • Paintings
    • Itemframes
     

    Attached Files:

    Last edited: Mar 25, 2023
Thread Status:
Not open for further replies.

Share This Page