JEI recipe transfer fixes

re-checks the amount of items in the recipe
only do fuzzy search for damageable items
This commit is contained in:
Salomão
2021-03-29 08:46:19 -03:00
parent 1a11462ddd
commit 59d7bd6c16
2 changed files with 8 additions and 3 deletions
@@ -137,7 +137,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
this.buttonList.clear();
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.InterfaceTerminal.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), offsetX, this.ySize - 96 + 3, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), this.offsetX + 2, this.ySize - 96 + 3, 4210752 );
final int ex = this.getScrollBar().getCurrentScroll();
@@ -182,7 +182,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
name = name.substring( 0, name.length() - 1 );
}
this.fontRenderer.drawString( name, 22, 6 + offset, 4210752 );
this.fontRenderer.drawString( name, this.offsetX + 2, 6 + offset, 4210752 );
}
offset += 18;
}
@@ -171,6 +171,11 @@ public class PacketJEIRecipe extends AppEngPacket
// already the correct item?
ItemStack newItem = this.canUseInSlot( x, currentItem );
if ( !cct.useRealItems() && this.recipe[x] != null ) {
if (this.recipe[x].length > 0 )
currentItem.setCount( recipe[x][0].getCount() );
}
// put away old item
if( newItem != currentItem && security.hasPermission( player, SecurityPermissions.INJECT ) )
{
@@ -210,7 +215,7 @@ public class PacketJEIRecipe extends AppEngPacket
IAEItemStack mostDamaged = null;
for( IAEItemStack is : outList )
{
if( !is.isCraftable() )
if( !is.isCraftable() && is.getItem().isDamageable() )
{
if( mostDamaged == null || mostDamaged.getItemDamage() < is.getItemDamage() )
{