Fixed custom gui with slot update synchronisation

This commit is contained in:
Goodbird committed 2024-01-03 17:57:26 +03:00
1 parent 37c8c8addc
commit 79a15fe1e8
2 files changed
+4 -4

No files matched your search

@@ -32,6 +32,7 @@ public class CustomGuiController {
public static boolean updateGui(IPlayer player, ScriptGui gui) {
if (((EntityPlayerMP)player.getMCEntity()).openContainer instanceof ContainerCustomGui) {
((ContainerCustomGui)((EntityPlayerMP)player.getMCEntity()).openContainer).setGui(gui, (EntityPlayer)player.getMCEntity());
Server.sendDataChecked((EntityPlayerMP)player.getMCEntity(), EnumPacketClient.GUI_DATA, new Object[]{gui.toNBT()});
return true;
} else {