Renamed ModItems to TRItems. Sorted members inside it.
This commit is contained in:
parent
0443ad4a3a
commit
a40635e75f
39 changed files with 299 additions and 275 deletions
|
@ -56,7 +56,7 @@ public final class TechRebornAPI {
|
|||
}
|
||||
|
||||
/**
|
||||
* Use this to get an item from techrebonrn, @see <a href=
|
||||
* Use this to get an item from Tech Reborn, @see <a href=
|
||||
* "https://github.com/TechReborn/TechReborn/blob/1.9/src/main/java/techreborn/init/ModItems.java">
|
||||
* ModItems.java</a> for the full list
|
||||
*
|
||||
|
@ -65,7 +65,31 @@ public final class TechRebornAPI {
|
|||
*/
|
||||
public static Item getItem(String name) {
|
||||
try {
|
||||
Object e = Class.forName("techreborn.init.ModItems").getField(name).get(null);
|
||||
Object e = Class.forName("techreborn.init.TRItems").getField(name).get(null);
|
||||
return e instanceof Item ? (Item) e : null;
|
||||
} catch (NoSuchFieldException e1) {
|
||||
e1.printStackTrace();
|
||||
return null;
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this to get an ingredient item from Tech Reborn, @see <a href=
|
||||
* "https://github.com/TechReborn/TechReborn/blob/1.9/src/main/java/techreborn/init/ModItems.java">
|
||||
* ModItems.java</a> for the full list
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public static Item getIngredient(String name) {
|
||||
try {
|
||||
Object e = Class.forName("techreborn.init.TRIngredient").getField(name).get(null);
|
||||
return e instanceof Item ? (Item) e : null;
|
||||
} catch (NoSuchFieldException e1) {
|
||||
e1.printStackTrace();
|
||||
|
|
|
@ -34,6 +34,7 @@ public class ScrapboxRecipe extends BaseRecipe {
|
|||
public ScrapboxRecipe(ItemStack output, int tickTime, int euPerTick) {
|
||||
super(Reference.SCRAPBOX_RECIPE, tickTime, euPerTick);
|
||||
if (output != null) {
|
||||
// TODO: Fix recipe
|
||||
addInput(new ItemStack(TechRebornAPI.getItem("SCRAP_BOX")));
|
||||
addOutput(output);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue