Files
OldSliceMC/patches/server/0006-Allow-opening-covered-chests.patch
2021-10-29 10:23:02 -05:00

44 lines
2.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cryptite <cryptite@gmail.com>
Date: Thu, 23 Sep 2021 09:08:06 -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 1891cfb8f7ebae5a95a55f706bb04f8206121d32..d24c22e0dd84344021a77d24926c2934e71d40ff 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 7e45c97acce83a9fe8ada486e9fcdafe58769736..80e30b978455890506ef555773983dd4058185e3 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;