Skip to content

Commit

Permalink
Fix printing not updating the output display state
Browse files Browse the repository at this point in the history
  • Loading branch information
SquidDev committed Apr 2, 2019
1 parent 2965fb6 commit 1fd0b40
Showing 1 changed file with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public ItemStack removeStackFromSlot( int i )
{
ItemStack result = m_inventory.get( i );
m_inventory.set( i, ItemStack.EMPTY );
markDirty();
updateAnim();
return result;
}
Expand All @@ -197,10 +198,7 @@ public ItemStack decrStackSize( int i, int j )
{
synchronized( m_inventory )
{
if( m_inventory.get( i ).isEmpty() )
{
return ItemStack.EMPTY;
}
if( m_inventory.get( i ).isEmpty() ) return ItemStack.EMPTY;

if( m_inventory.get( i ).getCount() <= j )
{
Expand Down Expand Up @@ -238,10 +236,7 @@ public void clear()
{
synchronized( m_inventory )
{
for( int i = 0; i < m_inventory.size(); i++ )
{
m_inventory.set( i, ItemStack.EMPTY );
}
for( int i = 0; i < m_inventory.size(); i++ ) m_inventory.set( i, ItemStack.EMPTY );
markDirty();
updateAnim();
}
Expand Down Expand Up @@ -432,10 +427,7 @@ private boolean inputPage()

// Decrement ink
inkStack.shrink( 1 );
if( inkStack.isEmpty() )
{
m_inventory.set( 0, ItemStack.EMPTY );
}
if( inkStack.isEmpty() ) m_inventory.set( 0, ItemStack.EMPTY );

// Decrement paper
paperStack.shrink( 1 );
Expand Down Expand Up @@ -474,7 +466,7 @@ private boolean outputPage()
{
if( m_inventory.get( slot ).isEmpty() )
{
m_inventory.set( slot, stack );
setInventorySlotContents( slot, stack );
m_printing = false;
return true;
}
Expand Down

0 comments on commit 1fd0b40

Please sign in to comment.