From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Cryptite Date: Tue, 18 Apr 2023 07:49:59 -0500 Subject: [PATCH] Allow opening covered chests 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 9804ee2020e5cef23d3f5174d153fc149e611503..8baeb4cb4a6e24e8099a0a98779dc50073d5d0b4 100644 --- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java @@ -358,9 +358,10 @@ public class ChestBlock extends AbstractChestBlock implements } private static boolean isBlockedChestByBlock(BlockGetter world, BlockPos pos) { - BlockPos blockposition1 = pos.above(); - - return world.getBlockState(blockposition1).isRedstoneConductor(world, blockposition1); + return false; +// BlockPos blockposition1 = pos.above(); +// +// return world.getBlockState(blockposition1).isRedstoneConductor(world, blockposition1); } private static boolean isCatSittingOnChest(LevelAccessor world, BlockPos pos) { diff --git a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java index ddca14f1224327a738415fb8b37398d8df0aa9c8..cfd9bfd30d4b1787dacc95215e823603537131fd 100644 --- a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java +++ b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java @@ -83,10 +83,10 @@ public class EnderChestBlock extends AbstractChestBlock i PlayerEnderChestContainer playerEnderChestContainer = player.getEnderChestInventory(); BlockEntity blockEntity = world.getBlockEntity(pos); if (playerEnderChestContainer != null && blockEntity instanceof EnderChestBlockEntity) { - BlockPos blockPos = pos.above(); - if (world.getBlockState(blockPos).isRedstoneConductor(world, blockPos)) { - return InteractionResult.sidedSuccess(world.isClientSide); - } else if (world.isClientSide) { +// BlockPos blockPos = pos.above(); +// if (world.getBlockState(blockPos).isRedstoneConductor(world, blockPos)) { +// return InteractionResult.sidedSuccess(world.isClientSide); + if (world.isClientSide) { return InteractionResult.SUCCESS; } else { EnderChestBlockEntity enderChestBlockEntity = (EnderChestBlockEntity)blockEntity;