Package appeng.api.exceptions

Examples of appeng.api.exceptions.RecipeError


        int sel = 0;

        if ( nameSpace.equals( "oreDictionary" ) )
        {
          if ( parts.length == 3 )
            throw new RecipeError( "Cannot specify meta when using ore dictionary." );
          sel = OreDictionary.WILDCARD_VALUE;
        }
        else
        {
          try
          {
            Object ro = AEApi.instance().registries().recipes().resolveItem( nameSpace, tmpName );
            if ( ro instanceof ResolverResult )
            {
              ResolverResult rr = (ResolverResult) ro;
              tmpName = rr.itemName;
              sel = rr.damageValue;
              nbt = rr.compound;
            }
            else if ( ro instanceof ResolverResultSet )
            {
              throw new MissedIngredientSet( (ResolverResultSet) ro );
            }
          }
          catch (IllegalArgumentException e)
          {
            throw new RecipeError( tmpName + " is not a valid ae2 item definition." );
          }
        }

        meta = sel;
      }
      else
      {
        if ( parts[2].equals( "*" ) )
        {
          meta = OreDictionary.WILDCARD_VALUE;
        }
        else
        {
          try
          {
            meta = Integer.parseInt( parts[2] );
          }
          catch (NumberFormatException e)
          {
            throw new RecipeError( "Invalid Metadata." );
          }
        }
      }
      itemName = tmpName;
    }
    else
      throw new RecipeError( input + " : Needs at least Namespace and Name." );

    handler.data.knownItem.add( toString() );
  }
View Full Code Here


        pro_input = input.get( 0 ).get( 0 );
        pro_output = output.get( 0 ).toArray( new IIngredient[outs] );
        return;
      }
    }
    throw new RecipeError( "Crusher must have a single input, and single output." );
  }
View Full Code Here

        pro_input = input.get( 0 ).get( 0 );
        pro_output = output.get( 0 ).toArray( new IIngredient[outs] );
        return;
      }
    }
    throw new RecipeError( "Crusher must have a single input, and single output." );
  }
View Full Code Here

        in = inputList.get( 0 );
        out = outputList.get( 0 );
        return;
      }
    }
    throw new RecipeError( "Smelting recipe can only have a single input and output." );
  }
View Full Code Here

          plateB = 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." );
  }
View Full Code Here

        pro_input = input.get( 0 ).get( 0 );
        pro_output = output.get( 0 ).toArray( new IIngredient[outs] );
        return;
      }
    }
    throw new RecipeError( "MekCrusher must have a single input, and single output." );
  }
View Full Code Here

  public GroupIngredient(String myName, List<IIngredient> ingredients) throws RecipeError {
    name = myName;

    for (IIngredient I : ingredients)
      if ( I.isAir() )
        throw new RecipeError( "Cannot include air in a group." );

    this.ingredients = ingredients;
  }
View Full Code Here

        pro_input = input.get( 0 ).get( 0 );
        pro_output = output.get( 0 ).toArray( new IIngredient[outs] );
        return;
      }
    }
    throw new RecipeError( "Grind must have a single input, and single output." );
  }
View Full Code Here

        pro_input = input.get( 0 ).get( 0 );
        pro_output = output.get( 0 ).toArray( new IIngredient[outs] );
        return;
      }
    }
    throw new RecipeError( "MekCrusher must have a single input, and single output." );
  }
View Full Code Here

        pro_input = input.get( 0 ).get( 0 );
        pro_output = output.get( 0 ).toArray( new IIngredient[outs] );
        return;
      }
    }
    throw new RecipeError( "Grind must have a single input, and single output." );
  }
View Full Code Here

TOP

Related Classes of appeng.api.exceptions.RecipeError

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.