mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-26 23:13:27 +00:00
Crate Craftables Panel (#696)
This commit is contained in:
1 parent
860bc059ca
commit
31fcd6af51
23 files changed
+735
-363
No files matched your search
@@ -86,13 +86,27 @@ public class ShapedRecipeHandler extends TemplateRecipeHandler {
|
||||
if (outputId.equals("crafting") && getClass() == ShapedRecipeHandler.class) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
CachedShapedRecipe recipe = null;
|
||||
if (irecipe instanceof ShapedRecipes) recipe = new CachedShapedRecipe((ShapedRecipes) irecipe);
|
||||
else if (irecipe instanceof ShapedOreRecipe) recipe = forgeShapedRecipe((ShapedOreRecipe) irecipe);
|
||||
|
||||
if (recipe == null) continue;
|
||||
if (irecipe instanceof ShapedRecipes shaped) {
|
||||
recipe = new CachedShapedRecipe(shaped);
|
||||
} else if (irecipe instanceof ShapedOreRecipe shaped) {
|
||||
recipe = forgeShapedRecipe(shaped);
|
||||
}
|
||||
|
||||
if (recipe != null) {
|
||||
recipe.computeVisuals();
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
}
|
||||
} else if (outputId.equals("crafting2x2") && getClass() == ShapedRecipeHandler.class) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
|
||||
if (irecipe instanceof ShapedRecipes shaped && shaped.recipeWidth <= 2 && shaped.recipeHeight <= 2) {
|
||||
CachedShapedRecipe recipe = new CachedShapedRecipe(shaped);
|
||||
recipe.computeVisuals();
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
|
||||
recipe.computeVisuals();
|
||||
arecipes.add(recipe);
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
|
||||
Reference in new issue
Block a user