Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 03:20:07 +01:00
582ad801b5
cc GH-170
41 Zeilen
1.6 KiB
Diff
41 Zeilen
1.6 KiB
Diff
From 01031212772eb916a2c3f5d05c30f93302c019d3 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index b813a9b..9e91991 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -272,4 +272,9 @@ public class PaperWorldConfig {
|
|
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
|
|
index b2f0c18..243da36 100644
|
|
--- 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 {
|
|
--
|
|
2.7.4
|
|
|