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:
@@ -5,22 +5,22 @@ Subject: [PATCH] Prevent Enderman from loading chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
index 2d29da8560..a94ed1ae08 100644
|
||||
index 9783576e3..13507edbc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
@@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster {
|
||||
int j = MathHelper.floor(this.enderman.locY + random.nextDouble() * 3.0D);
|
||||
int k = MathHelper.floor(this.enderman.locZ - 2.0D + random.nextDouble() * 4.0D);
|
||||
int j = MathHelper.floor(this.enderman.locY() + random.nextDouble() * 3.0D);
|
||||
int k = MathHelper.floor(this.enderman.locZ() - 2.0D + random.nextDouble() * 4.0D);
|
||||
BlockPosition blockposition = new BlockPosition(i, j, k);
|
||||
- IBlockData iblockdata = world.getType(blockposition);
|
||||
+ IBlockData iblockdata = world.getTypeIfLoaded(blockposition); // Paper
|
||||
+ if (iblockdata == null) return; // Paper
|
||||
Block block = iblockdata.getBlock();
|
||||
Vec3D vec3d = new Vec3D((double) MathHelper.floor(this.enderman.locX) + 0.5D, (double) j + 0.5D, (double) MathHelper.floor(this.enderman.locZ) + 0.5D);
|
||||
Vec3D vec3d = new Vec3D((double) MathHelper.floor(this.enderman.locX()) + 0.5D, (double) j + 0.5D, (double) MathHelper.floor(this.enderman.locZ()) + 0.5D);
|
||||
Vec3D vec3d1 = new Vec3D((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D);
|
||||
@@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster {
|
||||
int j = MathHelper.floor(this.a.locY + random.nextDouble() * 2.0D);
|
||||
int k = MathHelper.floor(this.a.locZ - 1.0D + random.nextDouble() * 2.0D);
|
||||
int j = MathHelper.floor(this.a.locY() + random.nextDouble() * 2.0D);
|
||||
int k = MathHelper.floor(this.a.locZ() - 1.0D + random.nextDouble() * 2.0D);
|
||||
BlockPosition blockposition = new BlockPosition(i, j, k);
|
||||
- IBlockData iblockdata = world.getType(blockposition);
|
||||
+ IBlockData iblockdata = world.getTypeIfLoaded(blockposition); // Paper
|
||||
|
||||
Reference in New Issue
Block a user