mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
35 lines
1.8 KiB
Diff
35 lines
1.8 KiB
Diff
From 8c54a126346a7b9ccdb31e551795a8acf76dca9f Mon Sep 17 00:00:00 2001
|
|
From: jmp <jasonpenilla2@me.com>
|
|
Date: Sat, 12 Dec 2020 14:34:18 -0800
|
|
Subject: [PATCH] Option for chests to open even with a solid block on top
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
|
|
index 9e5e6de52efabe9126f6c47acb35fa1dc461ff4f..487b281cf53d3482853d56ee1e90a329d516395f 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockChest.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockChest.java
|
|
@@ -262,6 +262,7 @@ public class BlockChest extends BlockChestAbstract<TileEntityChest> implements I
|
|
}
|
|
|
|
private static boolean a(IBlockAccess iblockaccess, BlockPosition blockposition) {
|
|
+ if (iblockaccess instanceof World && ((World) iblockaccess).purpurConfig.chestOpenWithBlockOnTop) return false; // Purpur
|
|
BlockPosition blockposition1 = blockposition.up();
|
|
|
|
return iblockaccess.getType(blockposition1).isOccluding(iblockaccess, blockposition1);
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 8664315deb60468d946857f1b70afd8b9bcb56b0..22d1eae897baf8988807eb6b72e3d8a324c173f7 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -370,6 +370,11 @@ public class PurpurWorldConfig {
|
|
}
|
|
}
|
|
|
|
+ public boolean chestOpenWithBlockOnTop = false;
|
|
+ private void chestSettings() {
|
|
+ chestOpenWithBlockOnTop = getBoolean("blocks.chest.open-with-solid-block-on-top", chestOpenWithBlockOnTop);
|
|
+ }
|
|
+
|
|
public boolean dispenserApplyCursedArmor = true;
|
|
public boolean dispenserPlaceAnvils = false;
|
|
private void dispenserSettings() {
|