Alloys won't provide XP

This commit is contained in:
Emmanuel BENOîT 2016-06-25 08:27:13 +02:00
parent 10a0b6cb86
commit b611d4d235
4 changed files with 8 additions and 23 deletions

View file

@ -41,7 +41,6 @@ materials.ores No Tin
materials.ores No Zinc
-------------------------------------------------------------------------------------------------------
tech.base No Alloy furnace
-> XP
-> let output hoppers take empty buckets / invalid input
(make that configurable)
-> comparator signal configuration

View file

@ -54,7 +54,6 @@ public class MAlloyRecipe
{
private ResourceLocation name;
private int burnTime;
private float xp;
private ItemStack output;
private int slag;
private final ItemStack[] inputs = new ItemStack[ MAlloyRecipe.MAX_ALLOY_INPUTS ];
@ -84,16 +83,6 @@ public class MAlloyRecipe
}
public MAlloyRecipe.Builder setExperience( final float xp )
{
if ( xp < 0 ) {
throw new IllegalArgumentException( "invalid experience" );
}
this.xp = xp;
return this;
}
public MAlloyRecipe.Builder setOutput( final Item item )
{
this.output = new ItemStack( item );
@ -202,8 +191,8 @@ public class MAlloyRecipe
inputs[ i ] = this.inputs[ i ].copy( );
}
final MAlloyRecipe recipe = new MAlloyRecipe( this.name , this.burnTime , this.xp , this.slag ,
this.output.copy( ) , inputs );
final MAlloyRecipe recipe = new MAlloyRecipe( this.name , this.burnTime , this.slag , this.output.copy( ) ,
inputs );
registry.byName.put( this.name , recipe );
registry.list.add( recipe );
this.name = null;
@ -231,18 +220,16 @@ public class MAlloyRecipe
public final ResourceLocation name;
public final int burnTime;
public final float xp;
public final int slag;
public final ItemStack output;
public final ItemStack[] inputs;
private MAlloyRecipe( final ResourceLocation name , final int burnTime , final float xp , final int slag ,
final ItemStack output , final ItemStack[] inputs )
private MAlloyRecipe( final ResourceLocation name , final int burnTime , final int slag , final ItemStack output ,
final ItemStack[] inputs )
{
this.name = name;
this.burnTime = burnTime;
this.xp = xp;
this.slag = slag;
this.output = output;
this.inputs = inputs;

View file

@ -89,8 +89,8 @@ public class Materials
public void registerRecipes( )
{
// Alloy recipes
MAlloyRecipe.build( ).setName( "materials/coke" ).setBurnTime( 3200 ).setExperience( 0.1f )
.addInput( Items.COAL , 2 ).setOutput( ITEM_COKE ).setSlag( 1 ).register( );
MAlloyRecipe.build( ).setName( "materials/coke" ).setBurnTime( 3200 ).addInput( Items.COAL , 2 )
.setOutput( ITEM_COKE ).setSlag( 1 ).register( );
}
}

View file

@ -32,9 +32,8 @@ public class TechBase
URegistry.addServerMessage( TBAlloyFurnaceMessage.class );
// FIXME test, remove this later
MAlloyRecipe.build( ).setName( "test" ).setBurnTime( 50 ).setExperience( .05f ).setSlag( 1 )
.setOutput( Items.COOKED_CHICKEN , 10 ).addInput( Items.COOKED_BEEF ).addInput( Items.COOKED_PORKCHOP )
.register( );
MAlloyRecipe.build( ).setName( "test" ).setBurnTime( 50 ).setSlag( 1 ).setOutput( Items.COOKED_CHICKEN , 10 )
.addInput( Items.COOKED_BEEF ).addInput( Items.COOKED_PORKCHOP ).register( );
}