GC-spigot / AdvancedEnchantments

Superior Custom Enchantments Creator for Minecraft And Spigot platform
138 stars 61 forks source link

TP_DROPS effect reports incorrect (too high) item damage to tools it's applied to. #4316

Closed BigScary closed 1 month ago

BigScary commented 1 month ago

Describe the bug

TP_DROPS is firing an item damage event (that's good), but instead of reporting the right/vanilla amount of damage (1 for breaking a stone block with a stone pick, for example), those events are erroneously reporting steadily increasing amounts (1 for first block broken, 15 for 15th block broken).

How to reproduce

Code an event handler something like this, to display the item damage event information:

@EventHandler public void onPlayerItemDamgae(PlayerItemDamageEvent event) { AddLogEntry("item damage: " + event.getDamage());
}

Give yourself two stone pickaxes. Leave one without enchantments. Enchant the other with TP_DROPS at 100% chance to happen. Ensure you're in survival mode. Break several stone blocks with the unenchanted pick. You will see 1 point of item damage with each break. Break several stone blocks with the TP_DROPS pick.

Expected: Item damage amount is same as unenchanted pick, 1 item damage each time a stone block is broken.

Actual: Item damage amount is increasing with each block broken.

Screenshots / Videos

No response

"/ae plinfo" link

https://paste.md-5.net/upirabufoz

Server Log

No response

ThomasWega commented 1 month ago

Will be fixed in the next update. Thanks for reporting!