fix shift-clicking patterns from pattern slot sometimes voiding them

This commit is contained in:
Salomão
2021-06-05 18:54:26 -03:00
parent 50aac2c768
commit 52da4f9528
@@ -134,7 +134,8 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
{ {
return ItemStack.EMPTY; return ItemStack.EMPTY;
} }
if( this.inventorySlots.get( idx ) instanceof SlotPlayerInv || this.inventorySlots.get( idx ) instanceof SlotPlayerHotBar )
{
final AppEngSlot clickSlot = ( AppEngSlot ) this.inventorySlots.get( idx ); // require AE SLots! final AppEngSlot clickSlot = ( AppEngSlot ) this.inventorySlots.get( idx ); // require AE SLots!
ItemStack itemStack = clickSlot.getStack(); ItemStack itemStack = clickSlot.getStack();
if( AEApi.instance().definitions().materials().blankPattern().isSameAs( itemStack ) ) if( AEApi.instance().definitions().materials().blankPattern().isSameAs( itemStack ) )
@@ -143,6 +144,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
ItemStack remainder = patternInv.insertItem( 0, itemStack, false ); ItemStack remainder = patternInv.insertItem( 0, itemStack, false );
clickSlot.putStack( remainder ); clickSlot.putStack( remainder );
} }
}
return super.transferStackInSlot( p, idx ); return super.transferStackInSlot( p, idx );
} }