geforkt von Mirrors/Paper
0708fa363b
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes:eb2e6578
SPIGOT-5116: Fix concurrent modification exception inside ChunkMapDistance989f9b3d
SPIGOT-4849: Fix server crash when accessing chunks during chunk load/unload/populate eventsf554183c
SPIGOT-5171: Don't fire PlayerTeleportEvent if not actually moving2349feb8
SPIGOT-5163: Cancelling PlayerBucketFillEvent visually removes the targeted block Spigot Changes: 9a643a6a Remove DataWatcher Locking
34 Zeilen
2.1 KiB
Diff
34 Zeilen
2.1 KiB
Diff
From 84476e23751d1f8c891f103c194f4a0e2f7dc59a Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Tue, 18 Dec 2018 02:15:08 +0000
|
|
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 9f2c339ae..0989c07cf 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
|
|
@@ -325,7 +325,8 @@ 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);
|
|
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 vec3d1 = new Vec3D((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D);
|
|
@@ -367,7 +368,8 @@ 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);
|
|
BlockPosition blockposition = new BlockPosition(i, j, k);
|
|
- IBlockData iblockdata = world.getType(blockposition);
|
|
+ IBlockData iblockdata = world.getTypeIfLoaded(blockposition); // Paper
|
|
+ if (iblockdata == null) return; // Paper
|
|
BlockPosition blockposition1 = blockposition.down();
|
|
IBlockData iblockdata1 = world.getType(blockposition1);
|
|
IBlockData iblockdata2 = Block.getValidBlockForPosition(getEnderman().getCarried(), getEnderman().world, blockposition); // Paper - Fix MC-124320
|
|
--
|
|
2.22.0
|
|
|