Paper/Spigot-Server-Patches/0058-Disable-chest-cat-detection.patch
Zach Brown 30f02fe6e5 Fix the end credits toggle
I think its pretty clear that no one uses this given that it didn't work at all before
2016-03-16 02:41:38 -05:00

40 lines
1.8 KiB
Diff

From 40227e21c0661deeb3326ec2a40a72c8a6908ca0 Mon Sep 17 00:00:00 2001
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 427e3b3..6122760 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -244,4 +244,9 @@ public class PaperWorldConfig {
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 7d27317..ed8d1df 100644
--- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java
@@ -392,6 +392,11 @@ public class BlockChest extends BlockTileEntity {
}
private boolean j(World world, BlockPosition blockposition) {
+ // Paper start - Option ti dsiable chest cat detection
+ if (world.paperConfig.disableChestCatDetection) {
+ return false;
+ }
+ // Paper end
Iterator iterator = 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))).iterator();
EntityOcelot entityocelot;
--
2.7.2