mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Prevent entities from moving in unloaded chunks
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
From d1315aeff30dfaa93dec34425ac1e3c0e4ee0ce1 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 f1975fa36e..23fea2b6e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -576,6 +576,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
|
||||
|
||||
Reference in New Issue
Block a user