-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
setNoDamageTicks is broken #11988
Comments
perhaps this is relevant:
BYPASSES_COOLDOWN isn't a real damage type tag in 1.21.4 |
So, this is a rather weird mechanic. Previously, minecraft players had a spawn invulnerability which would behave like you described above (negate all damage). This can obviously be fixed, but it feels pretty hacky and isn't a mechanic we really would wanna maintain I don't think? |
Can we not just set the initial cause damage to Int.maxvalue inside setNoDamageTicks to fix it? |
Yea we could but there is already a method for this and it would mess with the API getters on the last damage. In my honest opinion, this should just be implemented via EntityDamageEvent cancellation (that code would work backwards as well, no one is loosing anything there), but I'll leave it open for others as well. |
Maybe just mark that for player like Obsolete, i think better that than mess in reimplement |
Expected behavior
setNoDamageTicks should make a given player invulnerable for the given amount of ticks
Observed/Actual behavior
They still take damage (in my case from explosions)
Steps/models to reproduce
player.setNoDamageTicks
world.createExplosion next to the player
they die from explosion damage
Plugin and Datapack List
N/A
Paper version
This server is running Paper version 1.21.4-DEV-main@a35cfe9 (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 1 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.4-DEV-cd9d6d6 (MC: 1.21.4)
Other
No response
The text was updated successfully, but these errors were encountered: