We don't need the showCraftingLabel flag, as IAEStack is perfectly fine with 0 size stacks. (#3071)

Adjust rendering code to use ItemStack with size 1 where required.
This commit is contained in:
fscan
2017-09-09 12:58:22 +02:00
committed by GitHub
parent 955fcac92a
commit 375e1efb15
13 changed files with 38 additions and 67 deletions
@@ -32,7 +32,6 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
private boolean isCraftable;
private long stackSize;
private long countRequestable;
private boolean showCraftingLabel = false;
static long getPacketValue( final byte type, final ByteBuf tag )
{
@@ -104,22 +103,9 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
// priority = Integer.MIN_VALUE;
this.setCountRequestable( 0 );
this.setCraftable( false );
this.setShowCraftingLabel( false );
return (StackType) this;
}
@Override
public boolean getShowCraftingLabel()
{
return this.showCraftingLabel;
}
@Override
public void setShowCraftingLabel( boolean showCraftingLabel )
{
this.showCraftingLabel = showCraftingLabel;
}
@Override
public boolean isMeaningful()
{
@@ -157,7 +143,6 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
.getType( this.countRequestable ) << 4 ) | ( (byte) ( this.isCraftable ? 1 : 0 ) << 6 ) | ( this.hasTagCompound() ? 1 : 0 ) << 7 );
i.writeByte( mask );
i.writeBoolean( this.showCraftingLabel );
this.writeIdentity( i );