mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Option for chests to open even with a solid block on top
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/world/level/block/ChestBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ChestBlock.java
|
||||
@@ -361,6 +_,7 @@
|
||||
}
|
||||
|
||||
public static boolean isBlockedChestByBlock(BlockGetter level, BlockPos pos) {
|
||||
+ if (level instanceof Level level1 && level1.purpurConfig.chestOpenWithBlockOnTop) return false; // Purpur - Option for chests to open even with a solid block on top
|
||||
BlockPos blockPos = pos.above();
|
||||
return level.getBlockState(blockPos).isRedstoneConductor(level, blockPos);
|
||||
}
|
||||
@@ -368,6 +368,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() {
|
||||
|
||||
Reference in New Issue
Block a user