fix shift-clicking patterns from pattern slot sometimes voiding them
This commit is contained in:
@@ -134,14 +134,16 @@ 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!
|
|
||||||
ItemStack itemStack = clickSlot.getStack();
|
|
||||||
if( AEApi.instance().definitions().materials().blankPattern().isSameAs( itemStack ) )
|
|
||||||
{
|
{
|
||||||
IItemHandler patternInv = this.getPatternTerminal().getInventoryByName( "pattern" );
|
final AppEngSlot clickSlot = ( AppEngSlot ) this.inventorySlots.get( idx ); // require AE SLots!
|
||||||
ItemStack remainder = patternInv.insertItem( 0, itemStack, false );
|
ItemStack itemStack = clickSlot.getStack();
|
||||||
clickSlot.putStack( remainder );
|
if( AEApi.instance().definitions().materials().blankPattern().isSameAs( itemStack ) )
|
||||||
|
{
|
||||||
|
IItemHandler patternInv = this.getPatternTerminal().getInventoryByName( "pattern" );
|
||||||
|
ItemStack remainder = patternInv.insertItem( 0, itemStack, false );
|
||||||
|
clickSlot.putStack( remainder );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return super.transferStackInSlot( p, idx );
|
return super.transferStackInSlot( p, idx );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user