mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Re-add Spigot's hopper-check feature
Closes GH-77
This commit is contained in:
parent
0d320773fd
commit
d230ac7ef2
1 changed files with 38 additions and 0 deletions
|
@ -0,0 +1,38 @@
|
|||
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
@@ -0,0 +0,0 @@ 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 {
|
||||
--
|
Loading…
Reference in a new issue