Fix inventory desync when closing GuiRecipe (#320)

This commit is contained in:
miozune authored and GitHub committed 2022-11-29 18:21:45 +01:00
1 parent 2130a47f6f
commit 336c7dc621
3 files changed
+18

No files matched your search

@@ -141,6 +141,13 @@ public class NEICPH implements IClientPacketHandler {
packet.sendToServer();
}
public static void sendRequestContainer() {
PacketCustom packet = new PacketCustom(channel, 16);
packet.writeInt(
Minecraft.getMinecraft().thePlayer.openContainer.getInventory().size());
packet.sendToServer();
}
public static void sendSetSlot(int slot, ItemStack stack, boolean container) {
PacketCustom packet = new PacketCustom(channel, 5);
packet.writeBoolean(container);