Inscriber Recipe Handler, + Fixed Potential ME Chest Crash.
This commit is contained in:
parent
9e14101240
commit
67be86a19a
2 changed files with 26 additions and 18 deletions
|
@ -105,10 +105,13 @@ public class Inscribe implements ICraftHandler, IWebsiteSeralizer
|
|||
|
||||
o += h.getName( output ) + "\n";
|
||||
|
||||
if ( plateB != null )
|
||||
o += h.getName( plateB ) + "\n";
|
||||
if ( plateA != null )
|
||||
o += h.getName( plateA )+"\n";
|
||||
|
||||
o += h.getName( plateA );
|
||||
o += h.getName(imprintable);
|
||||
|
||||
if ( plateB != null )
|
||||
o += "\n"+h.getName( plateB );
|
||||
|
||||
return o;
|
||||
}
|
||||
|
|
|
@ -356,26 +356,31 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
|||
{
|
||||
if ( !isCached )
|
||||
{
|
||||
icell = null;
|
||||
fcell = null;
|
||||
|
||||
ItemStack is = inv.getStackInSlot( 1 );
|
||||
if ( is != null )
|
||||
{
|
||||
isCached = true;
|
||||
cellHandler = AEApi.instance().registries().cell().getHander( is );
|
||||
|
||||
double power = 1.0;
|
||||
|
||||
IMEInventoryHandler<IAEItemStack> itemCell = cellHandler.getCellInventory( is, StorageChannel.ITEMS );
|
||||
IMEInventoryHandler<IAEFluidStack> fluidCell = cellHandler.getCellInventory( is, StorageChannel.FLUIDS );
|
||||
|
||||
if ( itemCell != null )
|
||||
power += cellHandler.cellIdleDrain( is, itemCell );
|
||||
else if ( fluidCell != null )
|
||||
power += cellHandler.cellIdleDrain( is, fluidCell );
|
||||
|
||||
gridProxy.setIdlePowerUsage( power );
|
||||
|
||||
icell = wrap( itemCell );
|
||||
fcell = wrap( fluidCell );
|
||||
if ( cellHandler != null )
|
||||
{
|
||||
double power = 1.0;
|
||||
|
||||
IMEInventoryHandler<IAEItemStack> itemCell = cellHandler.getCellInventory( is, StorageChannel.ITEMS );
|
||||
IMEInventoryHandler<IAEFluidStack> fluidCell = cellHandler.getCellInventory( is, StorageChannel.FLUIDS );
|
||||
|
||||
if ( itemCell != null )
|
||||
power += cellHandler.cellIdleDrain( is, itemCell );
|
||||
else if ( fluidCell != null )
|
||||
power += cellHandler.cellIdleDrain( is, fluidCell );
|
||||
|
||||
gridProxy.setIdlePowerUsage( power );
|
||||
|
||||
icell = wrap( itemCell );
|
||||
fcell = wrap( fluidCell );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue