diff options
author | Spottedleaf <[email protected]> | 2024-12-01 13:53:04 -0800 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2024-12-01 13:53:04 -0800 |
commit | 4bc80b8a44f3d7aa3bf44f265f0959b4e801790e (patch) | |
tree | 96126f79f9e3af730c0278405ba4eeafb5177a7a /patches/server | |
parent | 0f90942b1a59d36dffb57325066744b840decef1 (diff) | |
download | Paper-4bc80b8a44f3d7aa3bf44f265f0959b4e801790e.tar.gz Paper-4bc80b8a44f3d7aa3bf44f265f0959b4e801790e.zip |
Do not break when PlayerNaturallySpawnCreaturesEvent is cancelled
If there is a player nearby which had its event not cancelled,
then that should take precedence.
Diffstat (limited to 'patches/server')
-rw-r--r-- | patches/server/0163-PlayerNaturallySpawnCreaturesEvent.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0163-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0163-PlayerNaturallySpawnCreaturesEvent.patch index cb145ad224..b510c92555 100644 --- a/patches/server/0163-PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/0163-PlayerNaturallySpawnCreaturesEvent.patch @@ -9,7 +9,7 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 261943f1f188643793a72bd239dfc5fe604e3b99..ebe6c631d772cf41038701aafbe4e0bbb024f7f5 100644 +index 261943f1f188643793a72bd239dfc5fe604e3b99..e211cd62b9381df353c0921bfaa6ad63f251a6ac 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1094,11 +1094,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -34,7 +34,7 @@ index 261943f1f188643793a72bd239dfc5fe604e3b99..ebe6c631d772cf41038701aafbe4e0bb + blockRange = 16384.0D; + if (reducedRange) { + event = entityplayer.playerNaturallySpawnedEvent; -+ if (event == null || event.isCancelled()) return false; ++ if (event == null || event.isCancelled()) continue; + blockRange = (double) ((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4)); + } + // Paper end - PlayerNaturallySpawnCreaturesEvent |