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

40 lines
1.8 KiB
Diff
Raw Normal View History

2016-04-02 04:08:40 +02:00
From 1d96d8947dd9dcc848e7c9be4fb685d68cd04ddf Mon Sep 17 00:00:00 2001
2016-03-01 00:09:49 +01: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 8b76052..7fe2ab0 100644
2016-03-01 00:09:49 +01:00
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -242,4 +242,9 @@ public class PaperWorldConfig {
2016-03-01 00:09:49 +01: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
2016-03-31 02:50:23 +02:00
index 2fb9c76..5143d9e 100644
2016-03-01 00:09:49 +01:00
--- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java
2016-03-31 02:50:23 +02:00
@@ -396,6 +396,11 @@ public class BlockChest extends BlockTileEntity {
2016-03-01 00:09:49 +01:00
}
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;
--
2016-04-02 04:08:40 +02:00
2.8.0
2016-03-01 00:09:49 +01:00