From b6fd4b3c0fa64d7997d4ef207bb8c9c77d7699aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salom=C3=A3o?= Date: Tue, 23 Mar 2021 22:23:58 -0300 Subject: [PATCH] changed priority of JEI items on the --- .../core/sync/packets/PacketJEIRecipe.java | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/main/java/appeng/core/sync/packets/PacketJEIRecipe.java b/src/main/java/appeng/core/sync/packets/PacketJEIRecipe.java index 687120824..1075d97fd 100644 --- a/src/main/java/appeng/core/sync/packets/PacketJEIRecipe.java +++ b/src/main/java/appeng/core/sync/packets/PacketJEIRecipe.java @@ -237,22 +237,6 @@ public class PacketJEIRecipe extends AppEngPacket // Fall back using an existing item out = storage.extractItems( request, Actionable.SIMULATE, cct.getActionSource() ); } - - if( out == null ) - { - IItemList items = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList(); - Iterator iterator = inv.getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) ).getAvailableItems( items ).iterator(); - while ( iterator.hasNext() ) - { - final IAEItemStack o = iterator.next(); - if( o.getDefinition().isItemEqual( request.getDefinition() ) && o.isCraftable() ) - { - out = o; - break; - } - iterator.remove(); - } - } } if( out != null ) @@ -274,14 +258,14 @@ public class PacketJEIRecipe extends AppEngPacket else { currentItem = ad.simulateSimilarRemove(recipe[x][y].getCount(), this.recipe[x][y],FuzzyMode.IGNORE_ALL, null ); - if( currentItem.isEmpty() ) - { - currentItem = this.recipe[x][y].copy(); - } } } } } + if( currentItem.isEmpty() && this.recipe[x] != null) + { + currentItem = this.recipe[x][0].copy(); + } } ItemHandlerUtil.setStackInSlot( craftMatrix, x, currentItem ); }