mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 08:39:58 +03:00
42 lines
2.2 KiB
Diff
42 lines
2.2 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockChest.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockChest.java
|
|
@@ -431,7 +431,7 @@
|
|
}
|
|
else
|
|
{
|
|
- ILockableContainer ilockablecontainer = (TileEntityChest)tileentity;
|
|
+ ILockableContainer ilockablecontainer = (ILockableContainer)tileentity;
|
|
|
|
if (!p_189418_3_ && this.isBlocked(p_189418_1_, p_189418_2_))
|
|
{
|
|
@@ -442,8 +442,14 @@
|
|
for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL)
|
|
{
|
|
BlockPos blockpos = p_189418_2_.offset(enumfacing);
|
|
+ //Block block = p_189418_1_.getBlockState(blockpos).getBlock();
|
|
+ // Svarka start - don't load chunks if the other side of the chest is in unloaded chunk
|
|
+ final IBlockState type = p_189418_1_.getBlockState(blockpos); // Paper
|
|
+ if (type == null) {
|
|
+ continue;
|
|
+ }
|
|
Block block = p_189418_1_.getBlockState(blockpos).getBlock();
|
|
-
|
|
+ // Svarka end
|
|
if (block == this)
|
|
{
|
|
if (this.isBlocked(p_189418_1_, blockpos))
|
|
@@ -457,11 +463,11 @@
|
|
{
|
|
if (enumfacing != EnumFacing.WEST && enumfacing != EnumFacing.NORTH)
|
|
{
|
|
- ilockablecontainer = new InventoryLargeChest("container.chestDouble", ilockablecontainer, (TileEntityChest)tileentity1);
|
|
+ ilockablecontainer = (ILockableContainer) new InventoryLargeChest("container.chestDouble", ilockablecontainer, (ILockableContainer)tileentity1);
|
|
}
|
|
else
|
|
{
|
|
- ilockablecontainer = new InventoryLargeChest("container.chestDouble", (TileEntityChest)tileentity1, ilockablecontainer);
|
|
+ ilockablecontainer = (ILockableContainer) new InventoryLargeChest("container.chestDouble", (ILockableContainer)tileentity1, ilockablecontainer);
|
|
}
|
|
}
|
|
}
|