mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Fix mob spawn limits
This commit is contained in:
parent
05dfa62d32
commit
1fa9e325c1
@ -133,7 +133,7 @@ index 0000000000..35104542c5
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index de34a70e9b..5e87ee9726 100644
|
||||
index 4252e8c02a..2b1affd03c 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -170,7 +170,7 @@ index 79e52f7bac..42f6a6a93a 100644
|
||||
return this.e;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 32808558bb..0a57b26551 100644
|
||||
index 32808558bb..62b4c64f68 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -0,0 +0,0 @@ public final class SpawnerCreature {
|
||||
@ -178,7 +178,7 @@ index 32808558bb..0a57b26551 100644
|
||||
if ((!enumcreaturetype.c() || flag1) && (enumcreaturetype.c() || flag) && (!enumcreaturetype.d() || flag2)) {
|
||||
k = limit * i / SpawnerCreature.b; // CraftBukkit - use per-world limits
|
||||
- int l1 = worldserver.a(enumcreaturetype.a(), k);
|
||||
+ int l1 = k = worldserver.entityList.getCreatureCount(enumcreaturetype); // Paper - entity count cache
|
||||
+ int l1 = worldserver.entityList.getCreatureCount(enumcreaturetype); // Paper - entity count cache
|
||||
|
||||
if (l1 <= k) {
|
||||
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
|
||||
|
Loading…
Reference in New Issue
Block a user