2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 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
|
2018-07-23 01:39:56 +02:00
|
|
|
Subject: [PATCH] Configurable Disabling Cat Chest Detection
|
2016-03-01 00:09:49 +01:00
|
|
|
|
2018-07-23 01:39:56 +02:00
|
|
|
Offers a gameplay feature to stop cats from blocking chests
|
2016-03-01 00:09:49 +01:00
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2020-05-06 11:48:49 +02:00
|
|
|
index a4da22ea65d5fdba38f8dc331919088f9ca99aed..345ac63e281bb3372b2ae879d587d658243581ba 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
|
2019-10-27 00:55:58 +02:00
|
|
|
@@ -181,4 +181,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
|
2020-08-25 04:22:08 +02:00
|
|
|
index fb7c0d45765e36181c809b250ba4eee5d21c5894..12a0230448dd8d56f6dc20e23cacaf0b8a9433d1 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
|
2020-06-25 11:27:25 +02:00
|
|
|
@@ -268,6 +268,11 @@ public class BlockChest extends BlockChestAbstract<TileEntityChest> implements I
|
2016-03-01 00:09:49 +01:00
|
|
|
}
|
|
|
|
|
2019-04-25 08:53:51 +02:00
|
|
|
private static boolean b(GeneratorAccess generatoraccess, BlockPosition blockposition) {
|
2018-07-15 03:53:17 +02:00
|
|
|
+ // Paper start - Option to disable chest cat detection
|
2019-04-25 08:53:51 +02:00
|
|
|
+ if (((World) generatoraccess).paperConfig.disableChestCatDetection) {
|
2016-03-01 00:09:49 +01:00
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
2019-04-25 08:53:51 +02:00
|
|
|
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)));
|
2019-01-01 04:15:55 +01:00
|
|
|
|
2018-07-15 03:53:17 +02:00
|
|
|
if (!list.isEmpty()) {
|