Commit Graph

388 Commits

Author SHA1 Message Date
8de7e356fa Add null check to level ref in Entity constructor (#12218) 2025-03-03 17:46:20 +01:00
0a6e7435b3 Fix invulnerability damage and armour (#12190) 2025-02-26 14:06:42 +01:00
9b9f046f41 Remove broken code (#12171) 2025-02-25 22:14:21 +01:00
60394c5b98 Fix PlayerReadyArrowEvent cancellation desync (#12111) 2025-02-16 21:44:08 +01:00
2a4a115432 Add EntityEquipmentChangedEvent (#12011) 2025-02-16 20:46:59 +01:00
a3781ff3be Separate tick count to ensure vanilla parity (#12077) 2025-02-16 20:46:37 +01:00
7bee99714a Cleanup damage source a bit (#12106) 2025-02-16 20:14:00 +01:00
cb25c0cf31 [ci skip] Fix annotation fields used in NMS getBukkitEntity (#12120) 2025-02-16 19:17:26 +01:00
072a8317b2 Add proper attached blocks API to AbstractArrow (#12099) 2025-02-12 23:13:07 +01:00
1a04e96ab7 Fix EntityBreedEvent cancellation (#12046) 2025-02-08 20:59:13 +01:00
51acc802b8 Prevent duplicate raider in RaidSpawnWaveEvent list (#12040) 2025-02-08 20:55:57 +01:00
cb6c57e0f8 Fix Squid and Dolphin spawn height (#12045) 2025-02-08 20:24:07 +01:00
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
fb5b173c6a Add PlayerClientLoadedWorldEvent (#11940) 2025-01-25 21:47:08 +01:00
6b7650d81b Only add goat horn once (#12001) 2025-01-22 18:20:24 +01:00
eeec611b9d Fix zombie villager infection chance hunk (#11974)
Dropped during hardfork, now moved to a false-ed out if statement to
prevent dropping in future updates.
2025-01-14 17:15:47 +01:00
9746d73ade Add back known movement check 2025-01-12 15:29:07 +01:00
b34ae4fb3c Fix wolves ignoring result of damage event (#11932) 2025-01-08 21:46:58 +01:00
6ab13521b7 Improve performance of PoiCompetitorScan by unrolling stream (#11871) 2025-01-04 21:23:21 +01:00
93a3df085c Extend HumanEntity#dropItem API (#11810) 2024-12-28 23:47:21 +01:00
e0abc5f85d Do not spawn fire for visual lightning (#11845) 2024-12-28 14:58:22 +01:00
aac246ae29 Expand on entity serialization API (#11807) 2024-12-27 00:08:00 +01:00
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
188124bcc3 Fix totems negating incorrect item (#11776) 2024-12-22 23:58:01 -05:00
f8bf600375 Fix potion effect type removal (#11778)
An incorrectly updated hunk attempted to remove the MobEffectInstance
from the active effect map instead of the Holder<MobEffect> as the
parameter name was changed from holder to effect during hardfork.
2024-12-23 04:51:58 +01:00
3b0b3a0aef and some more 2024-12-21 13:45:04 +01:00
82216a59fe Apply some feature patches to files instead
They're small and/or really shouldn't be left unapplied
2024-12-21 13:21:47 +01:00
e0593e9286 More diff/changed variable name cleanup 2024-12-21 12:15:25 +01:00
2213ce5bbc fix enderpearl across portals 2024-12-20 21:22:58 +01:00
f3c1eb3dc0 More param name fixes 2024-12-20 12:45:19 +01:00
42a2ccff55 Remove dead diff, some name/diff cleanup 2024-12-20 12:00:24 +01:00
2935905ced Small sculk cleanup
Don't check for empty items anymore in FishingHook.

Removes some diff + we handle it gracefully in add fresh entity
2024-12-19 20:44:24 -05:00
25a7793b9c drop duplicate block update 2024-12-19 22:12:09 +01:00
5922e6334b fix allowPermanentBlockBreakExploits config 2024-12-18 23:35:47 +01:00
dce53e05b8 fix bogged dropping shears instead of mushrooms 2024-12-18 19:37:10 +01:00
6126012369 readd beacon effect cause 2024-12-18 19:29:39 +01:00
c4fd69c807 Fix more derps from file patch updates 2024-12-18 11:56:22 +01:00
9d837fe4b6 Cat has luckily since stopped singing 2024-12-18 10:27:19 +01:00
972266605e Remove dead code, param renames in added methods 2024-12-17 22:04:50 +01:00
7caf863b52 Small diff cleanups from patch updating
And remove a dumb log change in PacketEncoder
2024-12-17 16:50:59 +01:00
9e8a2de45b readd bukkit extra data to entity tags 2024-12-16 18:07:41 +01:00
783b3b70e6 readd dropped event in InteractWithDoor 2024-12-16 17:29:46 +01:00
f8cb014d20 Move Aikar's EAR 1 into EAR 2 patch 2024-12-16 14:08:25 +01:00
189781f2cf Fix entity collision 2024-12-15 21:16:40 -05:00
4cc2be301d it compiles? 2024-12-15 14:36:05 -08:00
9bb6731cc4 readd potion splash effect cause 2024-12-15 23:24:48 +01:00
cb51a4fbcd more compile fixes 2024-12-15 14:12:59 -08:00
ec57b99bf5 readd removal cause for thrown eggs 2024-12-15 23:07:15 +01:00
8f1dcdd0b7 update restamp, add back entity ATs, rebuild patches 2024-12-15 22:39:52 +01:00
6dcb4a33b6 Fix some compilation errors 2024-12-15 21:28:08 +01:00