More compile fixes
This commit is contained in:
@@ -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 487114367..bcca7faed 100644
|
||||
index 224443e03..fdac5bb3a 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 {
|
||||
@@ -14,7 +14,7 @@ index 487114367..bcca7faed 100644
|
||||
|
||||
if (k >= 1) {
|
||||
- IBlockData iblockdata = chunk.getType(blockposition1);
|
||||
+ IBlockData iblockdata = world.getTypeIfLoadedAndInBounds(blockposition1); // Paper - don't load chunks for mob spawn
|
||||
+ IBlockData iblockdata = worldserver.getTypeIfLoadedAndInBounds(blockposition1); // Paper - don't load chunks for mob spawn
|
||||
|
||||
- if (!iblockdata.isOccluding(chunk, blockposition1)) {
|
||||
+ if (iblockdata != null && !iblockdata.isOccluding(chunk, blockposition1)) { // Paper - don't load chunks for mob spawn
|
||||
@@ -26,7 +26,7 @@ index 487114367..bcca7faed 100644
|
||||
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
|
||||
+ if (d0 > 576.0D && !blockposition.a((IPosition) (new Vec3D((double) f, (double) k, (double) f1)), 24.0D) && worldserver.isLoadedAndInBounds(blockposition_mutableblockposition)) { // Paper - don't load chunks for mob spawn
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition_mutableblockposition);
|
||||
|
||||
if (Objects.equals(chunkcoordintpair, chunk.getPos()) || worldserver.getChunkProvider().a(chunkcoordintpair)) {
|
||||
|
||||
Reference in New Issue
Block a user