mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: a41d51f0 ServerExceptionEvent can be fired off main 920ad7c7 Use getChunkIfLoadedImmediately in places (#2297) 0708fa36 Updated Upstream (CraftBukkit/Spigot)
25 lines
1.0 KiB
Diff
25 lines
1.0 KiB
Diff
From 45acaf6afc185ca3d39f570cc64f16a12b9b3dfa Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Fri, 12 Jul 2019 16:18:55 -0500
|
|
Subject: [PATCH] Prevent entities from moving in unloaded chunks
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/Entity.java | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index b1afdf71bb..79fb1c6c8e 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -577,6 +577,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
int j = MathHelper.floor(this.locY - 0.20000000298023224D);
|
|
int k = MathHelper.floor(this.locZ);
|
|
BlockPosition blockposition = new BlockPosition(i, j, k);
|
|
+ if (!world.isLoaded(blockposition)) return; // Purpur
|
|
IBlockData iblockdata = this.world.getType(blockposition);
|
|
|
|
if (iblockdata.isAir()) {
|
|
--
|
|
2.20.1
|
|
|