This commit is contained in:
Brianna O'Keefe 2018-12-28 21:14:11 -05:00
parent b13a02b6a5
commit be648a4891

View File

@ -43,10 +43,8 @@ public class HopHandler {
for (com.songoda.epichoppers.api.hopper.Hopper hopper : new HashMap<>(instance.getHopperManager().getHoppers()).values()) {
Location location = hopper.getLocation();
Bukkit.broadcastMessage("first");
if (!location.getWorld().isChunkLoaded(location.getBlockX() >> 4, location.getBlockZ() >> 4))
continue;
Bukkit.broadcastMessage("first2");
Block block = location.getBlock();
@ -55,7 +53,6 @@ public class HopHandler {
continue;
}
Bukkit.broadcastMessage("first2");
if (block.isBlockPowered() || block.isBlockIndirectlyPowered()) continue;
Hopper hopperBlock = hopper.getHopper();
@ -79,11 +76,9 @@ public class HopHandler {
for (Location destinationLocation : hopper.getLinkedBlocks()) {
if (destinationLocation == null) continue;
Bukkit.broadcastMessage("before");
if (!destinationLocation.getWorld().isChunkLoaded(destinationLocation.getBlockX(),
destinationLocation.getBlockZ()))
continue;
Bukkit.broadcastMessage("after");
Block destinationBlock = destinationLocation.getBlock();
if (!(destinationBlock.getState() instanceof InventoryHolder)) {