From 58e0eaa336f706f4cff4bdec6496ef65f56c947a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 24 Jan 2022 14:17:58 +0100 Subject: [PATCH] (possibly) backported dupe glitch fix related to #112 --- .../terminal/containers/CraftingTerminalContainer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalContainer.java b/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalContainer.java index 1f1441c..dabb086 100644 --- a/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalContainer.java +++ b/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalContainer.java @@ -36,7 +36,12 @@ public class CraftingTerminalContainer extends ItemTerminalContainer { @Override protected void addOwnSlots(PlayerEntity player) { this.craftInventory = new WrappedCraftingInventory(this.getTile().craftItems, this, 3, 3); - this.craftResult = new CraftResultInventory(); + this.craftResult = new CraftResultInventory() { + @Override + public void markDirty() { + CraftingTerminalContainer.this.onCraftMatrixChanged(this); + } + }; this.addSlot(new CraftingResultSlot(player, this.craftInventory, this.craftResult, 0, 25, 77)); for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) @@ -46,6 +51,7 @@ public class CraftingTerminalContainer extends ItemTerminalContainer { @Override public void onCraftMatrixChanged(IInventory inventoryIn) { + super.onCraftMatrixChanged(inventoryIn); if (!this.player.world.isRemote) { ItemStack ret = ItemStack.EMPTY; Optional optional = this.player.world.getServer().getRecipeManager().getRecipe(IRecipeType.CRAFTING, this.craftInventory, this.player.world);