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,11 +129,7 @@ public class TBAlloyFurnaceTileEntity
if ( this.alloying.slag != 0 ) { if ( this.alloying.slag != 0 ) {
this.addOutput( new ItemStack( Materials.ITEM_SLAG , this.alloying.slag ) ); this.addOutput( new ItemStack( Materials.ITEM_SLAG , this.alloying.slag ) );
} }
if ( this.canAlloy( ) ) { this.alloying = null;
this.startAlloying( );
} else {
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( ); this.startAlloying( );
dirty = true; dirty = true;
} }
@ -423,7 +422,7 @@ public class TBAlloyFurnaceTileEntity
if ( "".equals( alloyingRecipeName ) ) { if ( "".equals( alloyingRecipeName ) ) {
this.alloying = null; this.alloying = null;
} else { } else {
this.alloying = MAlloyRecipe.REGISTRY.getRecipe( new ResourceLocation( recipeName ) ); this.alloying = MAlloyRecipe.REGISTRY.getRecipe( new ResourceLocation( alloyingRecipeName ) );
} }
if ( this.alloying == null ) { if ( this.alloying == null ) {
this.alloyCurrent = 0; this.alloyCurrent = 0;