PaperSpigot-Parent/Spigot-Server-Patches/0069-Re-add-Spigot-s-hopper-check-feature.patch

41 lines
1.5 KiB
Diff
Raw Permalink Normal View History

From 246f9b49c79068ca061b938ab2824c8bffa6eb7c Mon Sep 17 00:00:00 2001
2015-08-13 19:36:58 +02:00
From: Byteflux <byte@byteflux.net>
Date: Thu, 13 Aug 2015 10:33:34 -0700
Subject: [PATCH] Re-add Spigot's hopper-check feature
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index cab636a..760a076 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -199,6 +199,11 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
return true;
}
}
+ // PaperSpigot start
+ if (world.paperSpigotConfig.useHopperCheck && !this.n()) {
+ this.d(world.spigotConfig.hopperCheck);
+ }
+ // PaperSpigot end
return false;
} else {
return false;
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 346e3f9..7eb3463 100644
2015-08-13 19:36:58 +02:00
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -376,4 +376,10 @@ public class PaperSpigotWorldConfig
2015-08-13 19:36:58 +02:00
{
tntExplosionVolume = getFloat( "tnt-explosion-volume", 4.0F );
}
+
+ public boolean useHopperCheck;
+ private void useHopperCheck()
+ {
+ useHopperCheck = getBoolean( "use-hopper-check", false );
+ }
}
--
2.7.0
2015-08-13 19:36:58 +02:00