fix #49. you can now actually clear storage and conversion monitors

This commit is contained in:
PrototypeTrousers
2021-08-20 23:26:33 -03:00
parent 2d71b75019
commit 8f2a06e457
3 changed files with 11 additions and 8 deletions
@@ -209,10 +209,17 @@ public abstract class AbstractPartMonitor extends AbstractPartDisplay implements
fluidInTank = fluidHandlerItem.drain( Integer.MAX_VALUE, false );
}
if (fluidInTank == null)
if( fluidInTank == null )
{
this.configuredFluid = null;
this.configuredItem = AEItemStack.fromItemStack( eq ).setStackSize( 0 );
if( !eq.isEmpty() )
{
this.configuredItem = AEItemStack.fromItemStack( eq ).setStackSize( 0 );
}
else
{
this.configuredItem = null;
}
}
else if( fluidInTank.amount > 0 )
{
@@ -160,11 +160,7 @@ public class PartConversionMonitor extends AbstractPartMonitor
{
this.insertItem( player, hand, false );
}
else if( !player.getHeldItem( hand ).isEmpty() )
{
return super.onPartActivate( player, hand, pos );
}
return true;
return super.onPartActivate( player, hand, pos );
}
@Override