Commit Graph

12 Commits

Author SHA1 Message Date
Lulu13022002
0c3879ac21 track block for lava/conduit damage
dropped diff
2025-06-02 22:02:52 +02:00
Bjarne Koll
ff05a2df63 Hacky EAR 2.0 fixes
EAR yields immunity to entities that are not on the ground and are not
"flying entities". What this "flying entity" filter actually entails
however is undocumented. The previous implementation checked for
FlyingMob, which only covered ghasts and phantoms, leaving entities like
the blaze and wither untouched for *some* reason.

To be improved by consulting the elders (cat).
2025-06-01 20:33:10 +02:00
Bjarne Koll
ed3b39e944 14 first feature patches 2025-06-01 20:07:10 +02:00
Bjarne Koll
f3bad8c86f Prepare work on feature patches 2025-06-01 20:05:43 +02:00
Nassim Jahnke
f00727c57e 1.21.5
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
2025-04-12 17:27:00 +02:00
Pedro
f225858235 Fix firework entity not being removed when FireworkExplodeEvent is cancelled (#12268)
* Fix Firework not removed when FireworkExplodeEvent is canceled

* JUnit require pass null

* tweaks
2025-03-24 00:20:14 +01:00
okx-code
0a6e7435b3 Fix invulnerability damage and armour (#12190) 2025-02-26 14:06:42 +01:00
Creeam
a3781ff3be Separate tick count to ensure vanilla parity (#12077) 2025-02-16 20:46:37 +01:00
Lulu13022002
5bcfb12a99 Fix activation range config and water animal status (#12047) 2025-01-31 13:13:14 +01:00
Spottedleaf
e2f0efd1af Remove nms.Entity#isChunkLoaded
This method was used pre 1.17 era where an Entity was explicitly
tied to a (then called) Chunk's entity slices. If an entity
was not inside a Chunk, then it was considered invalid as
it was not possible to save the entity.

In 1.17+, entities are now tied to a separately tracked entity
section management system. This system is far more reliable now
as it no longer requires a full chunk load to properly track
entities for saving. As a result, an Entity if inside the world
is always attached to some entity chunk section (except in rare
cases in Vanilla which are fixed in Moonrise).

As a result, whether the chunk the entity is in is loaded is no
longer an indication of whether they are tracked in the world
and we can reliably infer that the entity is correctly in the
world through the valid field alone.

Additionally drop the isInWorld() check, as valid=true implies
isInWorld=true. More importantly, the isInWorld() check invokes
getHandle which may trip a thread check on Folia. This will fix
World#getEntities() and friends exploding on Folia.

However, World#getEntities() on Folia still cannot reliably return
all entities in the world as actions such as cross-region
(not cross-world) teleporting will remove entities from the world.
2025-01-28 17:33:48 -08:00
Bjarne Koll
17d76ae42b Correctly die when cancelling EntityResurrectEvent (#11785)
The existing logic in LivingEntity#checkTotemDeathProtection completes
by checking whether the death protection component is null or not.
In cases where the event was cancelled, the component needs to be nulled
out to prevent the method from returning true, causing the player to
properly die.
2024-12-23 19:38:10 +01:00
Nassim Jahnke
3b0b3a0aef and some more 2024-12-21 13:45:04 +01:00