Puts everywhere brackets
This commit is contained in:
@@ -59,7 +59,9 @@ public class Grind implements ICraftHandler, IWebsiteSerializer
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
for( ItemStack is : this.pro_input.getItemStackSet() )
|
||||
{
|
||||
AEApi.instance().registries().grinder().addRecipe( is, this.pro_output[0].getItemStack(), 8 );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,9 +47,13 @@ public final class Inscribe extends InscriberProcess
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
if ( this.getImprintable() == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ( this.getOutput() == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final ItemStack[] realInput = this.getImprintable().getItemStackSet();
|
||||
final List<ItemStack> inputs = new ArrayList<ItemStack>( realInput.length );
|
||||
|
||||
@@ -49,15 +49,21 @@ public abstract class InscriberProcess implements ICraftHandler, IWebsiteSeriali
|
||||
this.topOptional = input.get( 0 ).get( 1 );
|
||||
|
||||
if( input.get( 0 ).size() > 2 )
|
||||
{
|
||||
this.botOptional = input.get( 0 ).get( 2 );
|
||||
}
|
||||
|
||||
this.output = output.get( 0 ).get( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RecipeError( "Inscriber recipes cannot have rows, and must have more then one input." );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RecipeError( "Inscriber recipes must produce a single output." );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -78,13 +84,19 @@ public abstract class InscriberProcess implements ICraftHandler, IWebsiteSeriali
|
||||
}
|
||||
|
||||
if( this.topOptional != null )
|
||||
{
|
||||
pattern += handler.getName( this.topOptional ) + '\n';
|
||||
}
|
||||
|
||||
if ( this.imprintable != null )
|
||||
{
|
||||
pattern += handler.getName( this.imprintable );
|
||||
}
|
||||
|
||||
if( this.botOptional != null )
|
||||
{
|
||||
pattern += '\n' + handler.getName( this.botOptional );
|
||||
}
|
||||
|
||||
return pattern;
|
||||
}
|
||||
|
||||
@@ -47,9 +47,13 @@ public final class Press extends InscriberProcess
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
if ( this.getImprintable() == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ( this.getOutput() == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final ItemStack[] realInput = this.getImprintable().getItemStackSet();
|
||||
final List<ItemStack> inputs = new ArrayList<ItemStack>( realInput.length );
|
||||
|
||||
@@ -68,13 +68,19 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer
|
||||
this.output = output.get( 0 ).get( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RecipeError( "Crafting recipes must have 1-3 columns." );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RecipeError( "shaped crafting recipes must have 1-3 rows." );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RecipeError( "Crafting must produce a single output." );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,7 +95,9 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer
|
||||
for( int x = 0; x < this.cols; x++ )
|
||||
{
|
||||
if( this.inputs.get( y ).get( x ).isAir() )
|
||||
{
|
||||
row.append( ' ' );
|
||||
}
|
||||
else
|
||||
{
|
||||
row.append( first );
|
||||
@@ -123,15 +131,21 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer
|
||||
o += h.getName( this.output ) + '\n';
|
||||
|
||||
for( int y = 0; y < this.rows; y++ )
|
||||
{
|
||||
for( int x = 0; x < this.cols; x++ )
|
||||
{
|
||||
IIngredient i = this.inputs.get( y ).get( x );
|
||||
|
||||
if( i.isAir() )
|
||||
{
|
||||
o += "air" + ( x + 1 == this.cols ? "\n" : " " );
|
||||
}
|
||||
else
|
||||
{
|
||||
o += h.getName( i ) + ( x + 1 == this.cols ? "\n" : " " );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return o.trim();
|
||||
}
|
||||
@@ -140,6 +154,7 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer
|
||||
public boolean canCraft( ItemStack reqOutput ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
for( int y = 0; y < this.rows; y++ )
|
||||
{
|
||||
for( int x = 0; x < this.cols; x++ )
|
||||
{
|
||||
IIngredient i = this.inputs.get( y ).get( x );
|
||||
@@ -149,10 +164,13 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer
|
||||
for( ItemStack r : i.getItemStackSet() )
|
||||
{
|
||||
if( Platform.isSameItemPrecise( r, reqOutput ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Platform.isSameItemPrecise( this.output.getItemStack(), reqOutput );
|
||||
}
|
||||
|
||||
@@ -54,10 +54,14 @@ public class Shapeless implements ICraftHandler, IWebsiteSerializer
|
||||
this.output = output.get( 0 ).get( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RecipeError( "Shapeless crafting recipes cannot have rows." );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RecipeError( "Crafting must produce a single output." );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -65,7 +69,9 @@ public class Shapeless implements ICraftHandler, IWebsiteSerializer
|
||||
{
|
||||
List<Object> args = new ArrayList<Object>();
|
||||
for( IIngredient i : this.inputs )
|
||||
{
|
||||
args.add( i );
|
||||
}
|
||||
|
||||
ItemStack outIS = this.output.getItemStack();
|
||||
|
||||
|
||||
@@ -61,10 +61,14 @@ public class Smelt implements ICraftHandler, IWebsiteSerializer
|
||||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
if( this.in.getItemStack().getItem() == null )
|
||||
{
|
||||
throw new RegistrationError( this.in.toString() + ": Smelting Input is not a valid item." );
|
||||
}
|
||||
|
||||
if( this.out.getItemStack().getItem() == null )
|
||||
{
|
||||
throw new RegistrationError( this.out.toString() + ": Smelting Output is not a valid item." );
|
||||
}
|
||||
|
||||
GameRegistry.addSmelting( this.in.getItemStack(), this.out.getItemStack(), 0 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user