mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37: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.3 KiB
Diff
25 lines
1.3 KiB
Diff
From 2743ab191c1f49d276cac635ad2c2d1893847ddb Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Sat, 13 Jul 2019 18:50:05 -0500
|
|
Subject: [PATCH] Prevent zombies spawning reinforcements in unloaded chunks
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/EntityZombie.java | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
index 9dfddd980b..32144bf92d 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
@@ -296,6 +296,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);
|
|
+ if (!world.isLoaded(blockposition)) continue; // Purpur
|
|
|
|
if (this.world.getType(blockposition).a((IBlockAccess) this.world, blockposition, (Entity) entityzombie) && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) {
|
|
entityzombie.setPosition((double) i1, (double) j1, (double) k1);
|
|
--
|
|
2.20.1
|
|
|