diff options
author | Kyle Wood <[email protected]> | 2021-04-24 17:01:33 -0500 |
---|---|---|
committer | Kyle Wood <[email protected]> | 2021-04-25 18:37:43 -0500 |
commit | 3093b81fee3064603c368ab934eddf66ce304433 (patch) | |
tree | cb99f05b5f31de92c41af4cc40b4bef5f3cbf573 /Spigot-Server-Patches-Unmapped/0044-Configurable-Disabling-Cat-Chest-Detection.patch | |
parent | 1af696a05d21cbdd7b5a7170f95598c013257588 (diff) | |
download | Paper-3093b81fee3064603c368ab934eddf66ce304433.tar.gz Paper-3093b81fee3064603c368ab934eddf66ce304433.zip |
Move patches
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0044-Configurable-Disabling-Cat-Chest-Detection.patch')
-rw-r--r-- | Spigot-Server-Patches-Unmapped/0044-Configurable-Disabling-Cat-Chest-Detection.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0044-Configurable-Disabling-Cat-Chest-Detection.patch b/Spigot-Server-Patches-Unmapped/0044-Configurable-Disabling-Cat-Chest-Detection.patch new file mode 100644 index 0000000000..9c34c4ef30 --- /dev/null +++ b/Spigot-Server-Patches-Unmapped/0044-Configurable-Disabling-Cat-Chest-Detection.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Thu, 3 Mar 2016 01:13:45 -0600 +Subject: [PATCH] Configurable Disabling Cat Chest Detection + +Offers a gameplay feature to stop cats from blocking chests + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 5a4c3a8c511f22c8c3240c9c7cd83a65119c1054..70e074cdf2087e638af8e0f3878d0ef8eb7305cc 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -186,4 +186,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/world/level/block/BlockChest.java b/src/main/java/net/minecraft/world/level/block/BlockChest.java +index b229faad99120c67b089f7680d800fbe594fe7da..b2c29cff5883868cb56a4e376ab946ac929abc94 100644 +--- a/src/main/java/net/minecraft/world/level/block/BlockChest.java ++++ b/src/main/java/net/minecraft/world/level/block/BlockChest.java +@@ -312,6 +312,11 @@ public class BlockChest extends BlockChestAbstract<TileEntityChest> implements I + } + + private static boolean b(GeneratorAccess generatoraccess, BlockPosition blockposition) { ++ // Paper start - Option to disable chest cat detection ++ if (((World) generatoraccess).paperConfig.disableChestCatDetection) { ++ return false; ++ } ++ // Paper end + List<EntityCat> list = generatoraccess.a(EntityCat.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))); + + if (!list.isEmpty()) { |