Skip to content

Commit

Permalink
Fix oversight in behavior of last patch
Browse files Browse the repository at this point in the history
  • Loading branch information
electronicboy committed Oct 8, 2018
1 parent c353860 commit 87d2e76
Showing 1 changed file with 3 additions and 3 deletions.
@@ -1,11 +1,11 @@
From 58a667675d7fc52cb8a5502f3c75ec519df7b950 Mon Sep 17 00:00:00 2001
From 88153d3b72c888683b63d4d5aa8bcc94cbe5f07a Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 8 Oct 2018 17:51:52 +0100
Subject: [PATCH] Backport: Prevent mob spawning from loading/generating chunks


diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 11e69a0547..c1d0ff1376 100644
index 11e69a0547..93ae14e4a5 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -158,9 +158,9 @@ public final class SpawnerCreature {
Expand All @@ -24,7 +24,7 @@ index 11e69a0547..c1d0ff1376 100644
float f = (float) j3 + 0.5F;
float f1 = (float) l3 + 0.5F;

+ if (!worldserver.isChunkLoaded(j3, l3, true) || !worldserver.getWorldBorder().isInBounds(blockposition_mutableblockposition)) continue; // paper - Prevent mob spawning from loading/generating chunks
+ if (worldserver.isChunkLoaded(j3, l3, true) && !worldserver.getWorldBorder().isInBounds(blockposition_mutableblockposition)) // paper - Prevent mob spawning from loading/generating chunks
if (!worldserver.isPlayerNearby((double) f, (double) k3, (double) f1, 24.0D) && blockposition.distanceSquared((double) f, (double) k3, (double) f1) >= 576.0D) {
if (biomebase_biomemeta == null) {
biomebase_biomemeta = worldserver.a(enumcreaturetype, (BlockPosition) blockposition_mutableblockposition);
Expand Down

0 comments on commit 87d2e76

Please sign in to comment.