fixed chest stickyness

This commit is contained in:
gnembon committed 2023-03-02 22:24:29 +01:00
1 parent d787e0cc99
commit 3f19cce649
1 file changed
+3 -8
@@ -13,6 +13,8 @@ import net.minecraft.world.level.block.ChestBlock;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.ChestType; import net.minecraft.world.level.block.state.properties.ChestType;
import static net.minecraft.world.level.block.ChestBlock.getConnectedDirection;
@Mixin(ChestBlock.class) @Mixin(ChestBlock.class)
public class ChestBlock_customStickyMixin implements BlockBehaviourInterface { public class ChestBlock_customStickyMixin implements BlockBehaviourInterface {
@@ -33,13 +35,6 @@ public class ChestBlock_customStickyMixin implements BlockBehaviourInterface {
if (type == ChestType.SINGLE || neighborType == ChestType.SINGLE) { if (type == ChestType.SINGLE || neighborType == ChestType.SINGLE) {
return false; return false;
} }
if (type != neighborType.getOpposite()) { return getConnectedDirection(state) == dir;
return false;
}
Direction facing = state.getValue(ChestBlock.FACING);
Direction neighborFacing = state.getValue(ChestBlock.FACING);
return facing == neighborFacing;
} }
} }