Skip to content

Commit

Permalink
Improve performance of updating the recipe in crafting terminals (#8026)
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte authored Jul 12, 2024
1 parent 6be78d9 commit 43ee4eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/appeng/menu/me/items/CraftingTermMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.InventoryActionPacket;
import appeng.helpers.IMenuCraftingPacket;
import appeng.helpers.IMenuCraftingPacket.AutoCraftEntry;
import appeng.helpers.InventoryAction;
import appeng.menu.SlotSemantics;
import appeng.menu.implementations.MenuTypeBuilder;
Expand Down Expand Up @@ -111,7 +110,10 @@ public CraftingTermMenu(MenuType<?> menuType, int id, Inventory ip, ITerminalHos

@Override
public void slotsChanged(Container inventory) {
updateCurrentRecipeAndOutput(false);
// Do not trigger a recursive update from updating the test container
if (inventory != recipeTestContainer) {
updateCurrentRecipeAndOutput(false);
}
}

private void updateCurrentRecipeAndOutput(boolean forceUpdate) {
Expand Down

0 comments on commit 43ee4eb

Please sign in to comment.