Alloy furnace - Fixed various issues

+ Bad read for current alloy recipe
+ Incorrect handling of burn / alloy update
This commit is contained in:
Emmanuel BENOîT 2016-06-25 20:55:11 +02:00
parent 3cd9d5719c
commit 8001cb13a2

View file

@ -129,13 +129,9 @@ public class TBAlloyFurnaceTileEntity
if ( this.alloying.slag != 0 ) {
this.addOutput( new ItemStack( Materials.ITEM_SLAG , this.alloying.slag ) );
}
if ( this.canAlloy( ) ) {
this.startAlloying( );
} else {
this.alloying = null;
}
}
}
if ( this.burnCurrent == 0 ) {
if ( this.alloying != null ) {
@ -148,7 +144,10 @@ public class TBAlloyFurnaceTileEntity
}
}
} else if ( this.canAlloy( ) && this.startBurning( this.recipe.burnTime ) ) {
}
if ( !this.isAlloying( ) && this.canAlloy( )
&& ( this.isBurning( ) || this.startBurning( this.recipe.burnTime ) ) ) {
this.startAlloying( );
dirty = true;
}
@ -423,7 +422,7 @@ public class TBAlloyFurnaceTileEntity
if ( "".equals( alloyingRecipeName ) ) {
this.alloying = null;
} else {
this.alloying = MAlloyRecipe.REGISTRY.getRecipe( new ResourceLocation( recipeName ) );
this.alloying = MAlloyRecipe.REGISTRY.getRecipe( new ResourceLocation( alloyingRecipeName ) );
}
if ( this.alloying == null ) {
this.alloyCurrent = 0;