use of minechem.item.element.ElementClassificationEnum in project Minechem by iopleke.
the class Chemicals method addElement.
@ZenMethod
public static void addElement(int id, String name, String descriptiveName, String classification, String roomState, String radioactivity) {
if (id < 0) {
throw new IllegalArgumentException(id + " is invalid");
}
if (ElementEnum.getByID(id) != null) {
throw new IllegalArgumentException(id + ": " + name + " is already registered as an element");
}
ElementClassificationEnum eClass = InputHelper.getClassification(classification);
ChemicalRoomStateEnum state = InputHelper.getRoomState(roomState);
RadiationEnum radiation = InputHelper.getRadiation(radioactivity);
MineTweakerAPI.apply(new AddElementAction(id, name, descriptiveName, eClass, state, radiation));
}
Aggregations