Fixed bug where EC closes if another player is still inside
This commit is contained in:
@ -113,7 +113,6 @@ public class SharedEnderChest implements ServerLifecycleEvents.ServerStopping, S
|
||||
}
|
||||
|
||||
public static void openSharedEnderChest(PlayerEntity player, World world, BlockPos pos) {
|
||||
playEnderChestOpenSound(world, pos);
|
||||
fakeEnderChestOpen(world, pos, true);
|
||||
sharedInventory.openedEnderChests.put(player, pos);
|
||||
player.openHandledScreen(new SimpleNamedScreenHandlerFactory((int_1, playerInventory, playerEntity) ->
|
||||
@ -133,6 +132,10 @@ public class SharedEnderChest implements ServerLifecycleEvents.ServerStopping, S
|
||||
return;
|
||||
}
|
||||
|
||||
if(open)
|
||||
playEnderChestOpenSound(world, pos);
|
||||
else
|
||||
playEnderChestCloseSound(world, pos);
|
||||
world.addSyncedBlockEvent(pos, Blocks.ENDER_CHEST, 1, open ? 1 : 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user