mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 12:12:08 -07:00
Move to configurate for paper.yml (#7609)
This commit is contained in:
@@ -5,20 +5,6 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ 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/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
||||
@@ -28,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
private static boolean isCatSittingOnChest(LevelAccessor world, BlockPos pos) {
|
||||
+ // Paper start - Option to disable chest cat detection
|
||||
+ if (((Level) world).paperConfig.disableChestCatDetection) {
|
||||
+ if (world.getMinecraftWorld().paperConfig().entities.behavior.disableChestCatDetection) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
Reference in New Issue
Block a user