From 74d03f8cc27bd0cabb6a3934206b3ee7312f564f Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 31 Jul 2024 22:02:38 +0200 Subject: [PATCH] fixed being unable to transfer items to the crafting grid using jei closes #209 closes #206 --- .../ellpeck/prettypipes/packets/PacketGhostSlot.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/ellpeck/prettypipes/packets/PacketGhostSlot.java b/src/main/java/de/ellpeck/prettypipes/packets/PacketGhostSlot.java index 2919298..f33dacd 100644 --- a/src/main/java/de/ellpeck/prettypipes/packets/PacketGhostSlot.java +++ b/src/main/java/de/ellpeck/prettypipes/packets/PacketGhostSlot.java @@ -54,10 +54,12 @@ public class PacketGhostSlot implements CustomPacketPayload { } public static void onMessage(PacketGhostSlot message, PlayPayloadContext ctx) { - var player = ctx.player().orElseThrow(); - var tile = Utility.getBlockEntity(CraftingTerminalBlockEntity.class, player.level(), message.pos); - if (tile != null) - tile.setGhostItems(message.stacks); + ctx.workHandler().execute(() -> { + var player = ctx.player().orElseThrow(); + var tile = Utility.getBlockEntity(CraftingTerminalBlockEntity.class, player.level(), message.pos); + if (tile != null) + tile.setGhostItems(message.stacks); + }); } public static class Entry {