Fix PlayerNaturallySpawnCreaturesEvent boolean inversion
This commit is contained in:
parent
054e20da8c
commit
9976a76809
|
@ -1,4 +1,4 @@
|
|||
From 111b99a26dc954eb72b251d2509ac50568afe1b4 Mon Sep 17 00:00:00 2001
|
||||
From a512d032fc82465e76cf0b6f8e67bd5c6fb051ad Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue