2016-04-23 00:01:28 +02:00
|
|
|
From cae272d18fd6dd6b36b9c1181c9ed71437cbf049 Mon Sep 17 00:00:00 2001
|
2016-03-12 20:41:26 +01:00
|
|
|
From: Byteflux <byte@byteflux.net>
|
|
|
|
Date: Sat, 12 Mar 2016 13:37:50 -0600
|
|
|
|
Subject: [PATCH] Re-add Spigot's hopper-check feature
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-03-31 05:55:46 +02:00
|
|
|
index b813a9b..9e91991 100644
|
2016-03-12 20:41:26 +01:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-03-31 05:55:46 +02:00
|
|
|
@@ -272,4 +272,9 @@ public class PaperWorldConfig {
|
2016-03-12 20:41:26 +01:00
|
|
|
private void nonPlayerEntitiesOnScoreboards() {
|
|
|
|
nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean useHopperCheck;
|
|
|
|
+ private void useHopperCheck() {
|
|
|
|
+ useHopperCheck = getBoolean("use-hopper-check", false);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
2016-03-31 02:50:23 +02:00
|
|
|
index b2f0c18..243da36 100644
|
2016-03-12 20:41:26 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
|
|
|
@@ -178,6 +178,12 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
|
|
|
this.update();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ if (world.paperConfig.useHopperCheck && !this.o()) {
|
|
|
|
+ this.setCooldown(world.spigotConfig.hopperCheck);
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
--
|
2016-04-02 04:08:40 +02:00
|
|
|
2.8.0
|
2016-03-12 20:41:26 +01:00
|
|
|
|