mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
Prevent zombies spawning reinforcements in unloaded chunks
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
From bc6361e47b89f6a225b13b5c2dfb44d1f2f7968f 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
|
||||||
|
|
||||||
Reference in New Issue
Block a user