From 9976a76809fa55f97ac8056749ba810ca2dbc54d Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 9 Feb 2020 19:32:40 +0000 Subject: [PATCH] Fix PlayerNaturallySpawnCreaturesEvent boolean inversion --- .../0192-PlayerNaturallySpawnCreaturesEvent.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Spigot-Server-Patches/0192-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/0192-PlayerNaturallySpawnCreaturesEvent.patch index 74cdb004a..a7a6b75cb 100644 --- a/Spigot-Server-Patches/0192-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/0192-PlayerNaturallySpawnCreaturesEvent.patch @@ -1,4 +1,4 @@ -From 111b99a26dc954eb72b251d2509ac50568afe1b4 Mon Sep 17 00:00:00 2001 +From a512d032fc82465e76cf0b6f8e67bd5c6fb051ad Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 14 Jan 2018 17:36:02 -0500 Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent @@ -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/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 86e1b403b2..bf80af2354 100644 +index 936fc4f6b..b5da88587 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -881,12 +881,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -31,7 +31,7 @@ index 86e1b403b2..bf80af2354 100644 + event = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityplayer.getBukkitEntity(), (byte) finalChunkRange); + event.callEvent(); + blockRange = (double) ((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4)); -+ if (event.isCancelled()) return true; ++ if (event.isCancelled()) return false; + } + + return (!entityplayer.isSpectator() && a(chunkcoordintpair, (Entity) entityplayer) < blockRange); // Spigot @@ -40,5 +40,5 @@ index 86e1b403b2..bf80af2354 100644 } -- -2.25.0.windows.1 +2.25.0