Fixed blank patterns in the pattern terminal not decreasing when encoding a pattern.
This commit is contained in:
@@ -197,13 +197,13 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
|||||||
else if( output.isEmpty() )
|
else if( output.isEmpty() )
|
||||||
{
|
{
|
||||||
output = this.patternSlotIN.getStack();
|
output = this.patternSlotIN.getStack();
|
||||||
if( output.isEmpty() || !this.isPattern( output ) )
|
if( output.isEmpty() || !this.isPattern( output ) )
|
||||||
{
|
{
|
||||||
return; // no blanks.
|
return; // no blanks.
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove one, and clear the input slot.
|
// remove one, and clear the input slot.
|
||||||
output.setCount( output.getCount() );
|
output.setCount( output.getCount() - 1);
|
||||||
if( output.getCount() == 0 )
|
if( output.getCount() == 0 )
|
||||||
{
|
{
|
||||||
this.patternSlotIN.putStack( ItemStack.EMPTY );
|
this.patternSlotIN.putStack( ItemStack.EMPTY );
|
||||||
@@ -319,7 +319,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
|||||||
{
|
{
|
||||||
final NBTTagCompound c = new NBTTagCompound();
|
final NBTTagCompound c = new NBTTagCompound();
|
||||||
|
|
||||||
if( i != null )
|
if( !i.isEmpty() )
|
||||||
{
|
{
|
||||||
i.writeToNBT( c );
|
i.writeToNBT( c );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.standardRecipe = null;
|
this.standardRecipe = null;
|
||||||
this.correctOutput = null;
|
this.correctOutput = ItemStack.EMPTY;
|
||||||
|
|
||||||
for( int x = 0; x < outTag.tagCount(); x++ )
|
for( int x = 0; x < outTag.tagCount(); x++ )
|
||||||
{
|
{
|
||||||
@@ -332,10 +332,10 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
|
|||||||
{
|
{
|
||||||
if( this.crafting.getStackInSlot( slotIndex ).isEmpty() )
|
if( this.crafting.getStackInSlot( slotIndex ).isEmpty() )
|
||||||
{
|
{
|
||||||
return i == null ? TestStatus.ACCEPT : TestStatus.DECLINE;
|
return i.isEmpty() ? TestStatus.ACCEPT : TestStatus.DECLINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( i == null )
|
if( i.isEmpty() )
|
||||||
{
|
{
|
||||||
return TestStatus.DECLINE;
|
return TestStatus.DECLINE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user