44 lines
2.5 KiB
Diff
44 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cryptite <cryptite@gmail.com>
|
|
Date: Mon, 28 Feb 2022 08:45:30 -0600
|
|
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 db726697b00afdee6078849fd224263483349912..cc415e4dd2093aa658817589f4f286c1a3ee63ad 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
|
@@ -356,9 +356,10 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> 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 16d677234616daec24e7250ff3e93aa3a83e9715..ee12ef106fa2dcbbac0161d96f383efbdd96bf94 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
|
|
@@ -77,10 +77,10 @@ public class EnderChestBlock extends AbstractChestBlock<EnderChestBlockEntity> 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;
|