Alloy furnace - Slag when breaking during alloying
This commit is contained in:
parent
fab9b117ab
commit
bc183d661e
2 changed files with 13 additions and 3 deletions
|
@ -315,6 +315,7 @@ public class TBAlloyFurnaceBlock
|
|||
|
||||
if ( tileEntity instanceof TBAlloyFurnaceTileEntity ) {
|
||||
final TBAlloyFurnaceTileEntity afte = (TBAlloyFurnaceTileEntity) tileEntity;
|
||||
afte.cancelAlloying( );
|
||||
InventoryHelper.dropInventoryItems( worldIn , pos , afte.input );
|
||||
InventoryHelper.dropInventoryItems( worldIn , pos , afte.fuel );
|
||||
InventoryHelper.dropInventoryItems( worldIn , pos , afte.output );
|
||||
|
|
|
@ -127,9 +127,8 @@ public class TBAlloyFurnaceTileEntity
|
|||
if ( this.burnCurrent == 0 ) {
|
||||
if ( this.alloying != null ) {
|
||||
if ( !this.startBurning( this.alloyCurrent ) ) {
|
||||
this.addOutput( new ItemStack( Materials.ITEM_SLAG , this.alloying.getTotalInputItems( ) ) );
|
||||
this.alloying = null;
|
||||
this.alloyCurrent = this.burnCurrent = this.burnTotal = 0;
|
||||
cancelAlloying( );
|
||||
this.burnCurrent = this.burnTotal = 0;
|
||||
}
|
||||
} else {
|
||||
this.burnTotal = this.burnCurrent = 0;
|
||||
|
@ -153,6 +152,16 @@ public class TBAlloyFurnaceTileEntity
|
|||
}
|
||||
|
||||
|
||||
public void cancelAlloying( )
|
||||
{
|
||||
if ( this.alloying != null ) {
|
||||
this.addOutput( new ItemStack( Materials.ITEM_SLAG , this.alloying.getTotalInputItems( ) ) );
|
||||
this.alloying = null;
|
||||
this.alloyCurrent = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setRecipe( final ResourceLocation location )
|
||||
{
|
||||
MAlloyRecipe recipe = MAlloyRecipe.REGISTRY.getRecipe( location );
|
||||
|
|
Reference in a new issue