Change Pam's Harvest the Nether script to Fether#1622
Change Pam's Harvest the Nether script to Fether#1622glowredman wants to merge 13 commits intomasterfrom
Conversation
| try { | ||
| Class forestryFermenterRecipeManager = Class.forName("forestry.factory.recipes.FermenterRecipeManager"); | ||
| Class<?> forestryFermenterRecipeManager = Class | ||
| .forName("forestry.factory.recipes.FermenterRecipeManager"); | ||
| Field fieldFermenterRecipes = forestryFermenterRecipeManager.getDeclaredField("recipes"); | ||
| fieldFermenterRecipes.setAccessible(true); | ||
|
|
||
| @SuppressWarnings("unchecked") | ||
| Iterable<IFermenterRecipe> recipes = (Iterable<IFermenterRecipe>) fieldFermenterRecipes.get(null); |
There was a problem hiding this comment.
Just reference Forestry's class directly, please.
There was a problem hiding this comment.
(int) casts are unnecessary.
There was a problem hiding this comment.
Also, aren't there better ways to get a fluid stack for a material other than creating it with new?
There was a problem hiding this comment.
Nope, calling Materials.<someMaterial>.getFluid() / .getMolten() would still create a new FluidStack
There was a problem hiding this comment.
You should probably get rid of this comment, then?
| return false; | ||
| } | ||
|
|
||
| @SuppressWarnings("unchecked") |
There was a problem hiding this comment.
Same here. You should probably remove // noinspection unchecked from these methods.
| } | ||
| } | ||
|
|
||
| @SuppressWarnings("unchecked") |
There was a problem hiding this comment.
Instead of continuing with this HashMap madness, perhaps we just replace them with an Arrays.asList of pairs?
| netherPlanks.stackSize = 2; | ||
| addShapelessRecipe(netherPlanks, netherLog); | ||
|
|
||
| netherPlanks.stackSize = 4; | ||
| addShapedRecipe(netherPlanks, "craftingToolSaw", netherLog, null); |
There was a problem hiding this comment.
Please don't. I'd like to someday remove the copy operations from the recipe adders, and it would be preferable if these were just new ItemStacks.
... and a bit of cleanup (see commit history)