fixed being unable to transfer items to the crafting grid using jei

closes #209 closes #206
This commit is contained in:
Ell 2024-07-31 22:02:38 +02:00
parent 4597192f31
commit 74d03f8cc2

View file

@ -54,10 +54,12 @@ public class PacketGhostSlot implements CustomPacketPayload {
} }
public static void onMessage(PacketGhostSlot message, PlayPayloadContext ctx) { public static void onMessage(PacketGhostSlot message, PlayPayloadContext ctx) {
var player = ctx.player().orElseThrow(); ctx.workHandler().execute(() -> {
var tile = Utility.getBlockEntity(CraftingTerminalBlockEntity.class, player.level(), message.pos); var player = ctx.player().orElseThrow();
if (tile != null) var tile = Utility.getBlockEntity(CraftingTerminalBlockEntity.class, player.level(), message.pos);
tile.setGhostItems(message.stacks); if (tile != null)
tile.setGhostItems(message.stacks);
});
} }
public static class Entry { public static class Entry {