mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Make entities lag less
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From eab5cee2a53339bdf99a85b6f2966b4aa2045381 Mon Sep 17 00:00:00 2001
|
||||
From 0053b709510e354de23738f70d82e816fa55c91b 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 loading unloaded chunks
|
||||
@@ -22,10 +22,10 @@ index 26a30e1c02..cfe21c2e70 100644
|
||||
|
||||
if (iblockdata.isAir()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
index 0939bbd5fb..6c5e10eef0 100644
|
||||
index a438d30414..5839f848d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
@@ -222,6 +222,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
@@ -223,6 +223,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
|
||||
private boolean l(double d0, double d1, double d2) {
|
||||
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(d0, d1, d2);
|
||||
@@ -34,10 +34,10 @@ index 0939bbd5fb..6c5e10eef0 100644
|
||||
while (blockposition_mutableblockposition.getY() > 0 && !this.world.getType(blockposition_mutableblockposition).getMaterial().isSolid()) {
|
||||
blockposition_mutableblockposition.c(EnumDirection.DOWN);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 6fbe1a7817..8fbad4b91b 100644
|
||||
index 4456cf1354..d967620756 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -298,6 +298,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -299,6 +299,7 @@ public class EntityZombie extends EntityMonster {
|
||||
int j1 = j + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
|
||||
int k1 = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
|
||||
BlockPosition blockposition = new BlockPosition(i1, j1 - 1, k1);
|
||||
|
||||
Reference in New Issue
Block a user