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 materials.ores No Zinc
------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------
tech.base No Alloy furnace tech.base No Alloy furnace
-> XP
-> let output hoppers take empty buckets / invalid input -> let output hoppers take empty buckets / invalid input
(make that configurable) (make that configurable)
-> comparator signal configuration -> comparator signal configuration

View file

@ -54,7 +54,6 @@ public class MAlloyRecipe
{ {
private ResourceLocation name; private ResourceLocation name;
private int burnTime; private int burnTime;
private float xp;
private ItemStack output; private ItemStack output;
private int slag; private int slag;
private final ItemStack[] inputs = new ItemStack[ MAlloyRecipe.MAX_ALLOY_INPUTS ]; 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 ) public MAlloyRecipe.Builder setOutput( final Item item )
{ {
this.output = new ItemStack( item ); this.output = new ItemStack( item );
@ -202,8 +191,8 @@ public class MAlloyRecipe
inputs[ i ] = this.inputs[ i ].copy( ); inputs[ i ] = this.inputs[ i ].copy( );
} }
final MAlloyRecipe recipe = new MAlloyRecipe( this.name , this.burnTime , this.xp , this.slag , final MAlloyRecipe recipe = new MAlloyRecipe( this.name , this.burnTime , this.slag , this.output.copy( ) ,
this.output.copy( ) , inputs ); inputs );
registry.byName.put( this.name , recipe ); registry.byName.put( this.name , recipe );
registry.list.add( recipe ); registry.list.add( recipe );
this.name = null; this.name = null;
@ -231,18 +220,16 @@ public class MAlloyRecipe
public final ResourceLocation name; public final ResourceLocation name;
public final int burnTime; public final int burnTime;
public final float xp;
public final int slag; public final int slag;
public final ItemStack output; public final ItemStack output;
public final ItemStack[] inputs; public final ItemStack[] inputs;
private MAlloyRecipe( final ResourceLocation name , final int burnTime , final float xp , final int slag , private MAlloyRecipe( final ResourceLocation name , final int burnTime , final int slag , final ItemStack output ,
final ItemStack output , final ItemStack[] inputs ) final ItemStack[] inputs )
{ {
this.name = name; this.name = name;
this.burnTime = burnTime; this.burnTime = burnTime;
this.xp = xp;
this.slag = slag; this.slag = slag;
this.output = output; this.output = output;
this.inputs = inputs; this.inputs = inputs;

View file

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

View file

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