2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
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/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
2023-12-05 18:20:55 +01:00
|
|
|
index e89be04aed49723aca35c7b17b2a623eac0587e0..af6e245b02d5fb78764d2db0ac200056277b212a 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
2022-06-07 21:15:06 +02:00
|
|
|
@@ -361,6 +361,11 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
private static boolean isCatSittingOnChest(LevelAccessor world, BlockPos pos) {
|
|
|
|
+ // Paper start - Option to disable chest cat detection
|
2022-06-09 10:51:45 +02:00
|
|
|
+ if (world.getMinecraftWorld().paperConfig().entities.behavior.disableChestCatDetection) {
|
2021-06-11 14:02:28 +02:00
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
List<Cat> list = world.getEntitiesOfClass(Cat.class, new AABB((double) pos.getX(), (double) (pos.getY() + 1), (double) pos.getZ(), (double) (pos.getX() + 1), (double) (pos.getY() + 2), (double) (pos.getZ() + 1)));
|
|
|
|
|
|
|
|
if (!list.isEmpty()) {
|