Houston, we got a patch (#2731)

* Houston, we got a patch

* is this the end of the beginning or the beginning of the end
This commit is contained in:
MiniDigger | Martin
2019-12-12 17:20:43 +01:00
parent 12013028b5
commit 3360d06f76
125 changed files with 643 additions and 6035 deletions

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks
also prevents if out of world border bounds
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 30da877d53..c6ea37ffbd 100644
index 487114367..bcca7faed 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 {
@@ -23,11 +23,11 @@ index 30da877d53..c6ea37ffbd 100644
@@ -0,0 +0,0 @@ public final class SpawnerCreature {
if (entityhuman != null) {
double d0 = entityhuman.e((double) f, (double) k, (double) f1);
double d0 = entityhuman.g((double) f, (double) k, (double) f1);
- if (d0 > 576.0D && !blockposition.a((IPosition) (new Vec3D((double) f, (double) k, (double) f1)), 24.0D)) {
+ if (d0 > 576.0D && !blockposition.a((IPosition) (new Vec3D((double) f, (double) k, (double) f1)), 24.0D) && world.isLoadedAndInBounds(blockposition_mutableblockposition)) { // Paper - don't load chunks for mob spawn
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition_mutableblockposition);
if (Objects.equals(chunkcoordintpair, chunk.getPos()) || world.getChunkProvider().a(chunkcoordintpair)) {
if (Objects.equals(chunkcoordintpair, chunk.getPos()) || worldserver.getChunkProvider().a(chunkcoordintpair)) {
--