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
+5 -5
View File
@@ -177,12 +177,10 @@ public class ItemRepo
if( viewMode == ViewItems.CRAFTABLE )
{
is = is.copy();
// is.setStackSize( 0 ) triggers isEmpty() and thus only shows empty stacks!
is.setStackSize( 1 );
is.setShowCraftingLabel( true );
is.setStackSize( 0 );
}
if( viewMode == ViewItems.STORED && is.getShowCraftingLabel() )
if( viewMode == ViewItems.STORED && is.getStackSize() == 0 )
{
continue;
}
@@ -240,7 +238,9 @@ public class ItemRepo
for( final IAEItemStack is : this.view )
{
this.dsp.add( is.getItemStack() );
final ItemStack displayStack = is.getItemStack();
displayStack.setCount( 1 );
this.dsp.add( displayStack );
}
}