Fixed blank patterns in the pattern terminal not decreasing when encoding a pattern.

This commit is contained in:
Gunther De Wachter
2017-06-28 06:21:11 +02:00
parent bce500616c
commit 0be2011645
2 changed files with 6 additions and 6 deletions
@@ -197,13 +197,13 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
else if( output.isEmpty() )
{
output = this.patternSlotIN.getStack();
if( output.isEmpty() || !this.isPattern( output ) )
if( output.isEmpty() || !this.isPattern( output ) )
{
return; // no blanks.
}
// remove one, and clear the input slot.
output.setCount( output.getCount() );
output.setCount( output.getCount() - 1);
if( output.getCount() == 0 )
{
this.patternSlotIN.putStack( ItemStack.EMPTY );
@@ -319,7 +319,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
{
final NBTTagCompound c = new NBTTagCompound();
if( i != null )
if( !i.isEmpty() )
{
i.writeToNBT( c );
}