papermc/CraftBukkit-Patches/0091-Prevent-hoppers-from-loading-chunks.patch

22 lines
927 B
Diff
Raw Normal View History

2015-04-09 03:18:56 +00:00
From 602bbeb4e1ce3736bca9f6bd5cf0d612598a9f2d Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com>
Date: Wed, 5 Mar 2014 20:27:27 +0000
Subject: [PATCH] Prevent hoppers from loading chunks
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index 8e0d254..766f74e 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -549,6 +549,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
int j = MathHelper.floor(d1);
int k = MathHelper.floor(d2);
2014-11-28 01:17:45 +00:00
BlockPosition blockposition = new BlockPosition(i, j, k);
+ if ( !world.isLoaded( blockposition ) ) return null; // Spigot
2015-02-28 11:36:22 +00:00
Block block = world.getType(blockposition).getBlock();
2015-02-28 11:36:22 +00:00
if (block.isTileEntity()) {
--
2014-11-28 01:17:45 +00:00
2.1.0