mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 13:36:16 +01:00
24 lines
1.3 KiB
Diff
24 lines
1.3 KiB
Diff
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
|
|
index 62440d5985341d6c1b9ec5f6cce81a5ad6bd9040..590837cb242eda62dca3c937a26b8ba26c41850c 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
|
@@ -348,6 +348,11 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
|
|
}
|
|
|
|
private static boolean isCatSittingOnChest(LevelAccessor world, BlockPos pos) {
|
|
+ // Paper start - Option to disable chest cat detection
|
|
+ if (world.getMinecraftWorld().paperConfig().entities.behavior.disableChestCatDetection) {
|
|
+ return false;
|
|
+ }
|
|
+ // Paper end - Option to disable chest cat detection
|
|
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()) {
|