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
Damage from a falling dripstone is inaccurate #9555
Comments
It seems that spigot accidentally fixed the helmet bug that Vanilla introduced (this is handled but a little bit too late to be taken in account for the final health). So that's why you don't get the same damage as vanilla for raw helmet vs boots for all your cases. I don't think it's worth to reintroduce the bug before reworking the damage modifier api. |
The reason for the falling dripstone to not behave like the anvil is due to when the damagemodifer are added into the map. If you see where the event is prepared (CraftEventFactory#handleLivingEntityDamageEvent) the DamageModifer.HARD_HAT is not updated for falling stalactite, Bukkit explicitely only allow anvil and falling block to handle the 1/4 reduction instead of checking with the DAMAGES_HELMET type tag (to also include the falling stalactite damage type). So in reality there are two issues here (one fixed by spigot and another one introduced by spigot (more or less a reintroduction of the vanilla bug for falling stalactite)). |
Good news! The first issue has been fixed on Mojang's end (here: https://bugs.mojang.com/browse/MC-251027). This doesn't fix anything on Spigot since they rewrote the whole logic with the DamageModifier but this is not anymore unlikely to happens before the DamageModifier is gone. Thus the parity would be complete for that type of damage. |
Fixed in 0b1b1fe |
Expected behavior
When you wear a helmet in Minecraft, damage from a falling anvil or a falling pointed dripstone should be reduced by 1/4. However, because vanilla Minecraft doesnt reduce the damage by 1/4 since a few version ago (which is not intended, i guess), i at least expected it to be the same amount of damage, when you are wearing only boots and when you are wearing only a helmet.
The first Screenshot is after getting hit by a dripstone while only wearing boots, max Health is 100, so the damage was 11.712 health. Second screenshot is only wearing a helmet and getting the same damage.
Third screenshot is while wearing everything except a helmet and getting 5.1953 damage. Fourth screenshot is wearing everything except for boots and getting 5.1953 damage, too.
Those Screenshots are from my Singleplayer test.
Observed/Actual behavior
When i tested a plugin, where i wanted to rewrite the damage system of minecraft a little bit, i saw that a I get more damage when I wear a helmet than just boots. But this only happened with pointed Dripstone. Anvils, on the other hand, had the reduced damage that Vanilla minecraft doesnt have anymore. This is a weird behaviour, because i expected anvils and pointed dripstone to be treated exactly the same.
The first Screenshot is after getting hit by a dripstone while only wearing boots, the damage was 11.712. Second screenshot is only wearing a helmet and getting 11.784 damage (0.072 more!)
Third screenshot is while wearing everything except a helmet and getting 5.1953 damage. Fourth screenshot is wearing everything except for boots and getting 6.6424 damage (which is 1.4471 health more damage, nearly a heart!)
Those Screenshots are from my Server. The "What it should be"-damage is what it would be if you first multiplied the damage by 0.75 when wearing a helmet, then applying all of the other rules (damage-reduction by armor). Formula is correct i think, at least it outputs the right damage when getting hit by an anvil.
Steps/models to reproduce
You dont need a Plugin to test it, because the command "/data get entity " outputs the health of a player too, but a Plugin might be more comfortable. I used a Plugin on the Server and got the damage amount by writing:
double finalDamge = EntityDamageEvent.getFinalDamage();
Plugin and Datapack List
Plugins i currently have installed on the server:
villagernomending.jar (Plugin i made myself, preventing Villager from giving the Mending trade)
NotTooExpensive.jar (Plugin to remove the 40 Level limit in the anvil)
Gsit-1.4.6.jar
Graves-4.9.jar
enchantmentsoverhaul.jar (The Plugin i am writing currently, which i tested when finding the bug)
Paper version
git-Paper-97 (MC: 1.20.1)
Other
No response
The text was updated successfully, but these errors were encountered: