Files
CatServer/spigot-patches/CraftBukkit-Patches/0051-Prevent-hoppers-from-loading-chunks.patch
T
2023-03-11 14:12:09 +08:00

22 lines
1.0 KiB
Diff

From ceac742ade72e7b0191c2299d69bd3657dd57053 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/world/level/block/entity/TileEntityHopper.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
index 92f93542c..d8db5d531 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
@@ -465,6 +465,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper {
private static IInventory getContainerAt(World world, double d0, double d1, double d2) {
Object object = null;
BlockPosition blockposition = new BlockPosition(d0, d1, d2);
+ if ( !world.hasChunkAt( blockposition ) ) return null; // Spigot
IBlockData iblockdata = world.getBlockState(blockposition);
Block block = iblockdata.getBlock();
--
2.25.1