Paper/Spigot-Server-Patches/0044-Disable-chest-cat-detection.patch

40 lines
1.8 KiB
Diff
Raw Normal View History

From 0a6e431075e7177f15c75f170b214b3957ed37de Mon Sep 17 00:00:00 2001
2016-02-29 23:09:49 +00:00
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:13:45 -0600
Subject: [PATCH] Disable chest cat detection
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 26d8dbb60..43aa73e1d 100644
2016-02-29 23:09:49 +00:00
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -172,4 +172,9 @@ public class PaperWorldConfig {
2016-02-29 23:09:49 +00:00
private void containerUpdateTickRate() {
containerUpdateTickRate = getInt("container-update-tick-rate", 1);
}
+
+ public boolean disableChestCatDetection;
+ private void disableChestCatDetection() {
+ disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false);
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
index d55122c66..f8be07258 100644
2016-02-29 23:09:49 +00:00
--- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java
@@ -235,6 +235,11 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC
2016-02-29 23:09:49 +00:00
}
private boolean b(World world, BlockPosition blockposition) {
+ // Paper start - Option to disable chest cat detection
2016-02-29 23:09:49 +00:00
+ if (world.paperConfig.disableChestCatDetection) {
+ return false;
+ }
+ // Paper end
List list = world.a(EntityOcelot.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1)));
2016-02-29 23:09:49 +00:00
if (!list.isEmpty()) {
2016-02-29 23:09:49 +00:00
--
2.18.0
2016-02-29 23:09:49 +00:00