Option for chests to open even with a solid block on top

This commit is contained in:
Jason Penilla
2025-01-10 00:44:46 -08:00
committed by granny
parent 33fe2966e6
commit 55eb63b89c
3 changed files with 15 additions and 34 deletions

View File

@@ -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);
}