Cache these catalysts and rename other cached item stacks

This commit is contained in:
koolkrafter5 committed 2026-05-29 20:23:38 -04:00
1 parent 3848b29049
commit 2be7ea42a8
5 files changed
+16 -13

No files matched your search

@@ -33,7 +33,7 @@ import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
public class RecipeHandlerLexicaBotania extends TemplateRecipeHandler {
private static final ItemStack lexicaStack = new ItemStack(ModItems.lexicon);
private static final ItemStack LEXICA = new ItemStack(ModItems.lexicon);
public class CachedLexicaBotaniaRecipe extends CachedRecipe {
@@ -83,7 +83,7 @@ public class RecipeHandlerLexicaBotania extends TemplateRecipeHandler {
CachedLexicaBotaniaRecipe recipeObj = ((CachedLexicaBotaniaRecipe) arecipes.get(recipe));
NEIHelper.renderItemIntoGUI(lexicaStack, 51, 5);
NEIHelper.renderItemIntoGUI(LEXICA, 51, 5);
GuiDraw.drawStringC(
EnumChatFormatting.UNDERLINE + StatCollector.translateToLocal(recipeObj.entry.getUnlocalizedName()),
@@ -25,10 +25,12 @@ import vazkii.botania.common.core.helper.ItemNBTHelper;
public class RecipeHandlerManaPool extends TemplateRecipeHandler {
private static final ItemStack poolStack = new ItemStack(ModBlocks.pool);
private static final ItemStack POOL = new ItemStack(ModBlocks.pool);
public class CachedManaPoolRecipe extends CachedRecipe {
private static final PositionedStack ALCHEMY = new PositionedStack(new ItemStack(ModBlocks.alchemyCatalyst), 10, 37);
private static final PositionedStack CONJURATION = new PositionedStack(new ItemStack(ModBlocks.conjurationCatalyst), 10, 37);
public PositionedStack input;
public PositionedStack output;
public PositionedStack catalyst;
@@ -44,9 +46,9 @@ public class RecipeHandlerManaPool extends TemplateRecipeHandler {
}
if (recipe.isAlchemy()) {
catalyst = new PositionedStack(new ItemStack(ModBlocks.alchemyCatalyst), 10, 37);
catalyst = ALCHEMY;
} else if (recipe.isConjuration()) {
catalyst = new PositionedStack(new ItemStack(ModBlocks.conjurationCatalyst), 10, 37);
catalyst = CONJURATION;
}
output = new PositionedStack(recipe.getOutput(), 101, 37);
@@ -115,7 +117,7 @@ public class RecipeHandlerManaPool extends TemplateRecipeHandler {
RenderHelper.enableGUIStandardItemLighting();
GL11.glEnable(GL11.GL_DEPTH_TEST);
RenderTilePool.forceMana = true;
NEIHelper.renderItemIntoGUI(poolStack, 71, 37);
NEIHelper.renderItemIntoGUI(POOL, 71, 37);
GL11.glDisable(GL11.GL_DEPTH_TEST);
RenderHelper.disableStandardItemLighting();
}
@@ -24,7 +24,7 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
import vazkii.botania.common.core.helper.ItemNBTHelper;
public class RecipeHandlerPetalApothecary extends TemplateRecipeHandler {
private static final ItemStack altarStack = new ItemStack(ModBlocks.altar);
private static final ItemStack APOTHECARY = new ItemStack(ModBlocks.altar);
public class CachedPetalApothecaryRecipe extends CachedRecipe {
public List<PositionedStack> inputs = new ArrayList<>();
@@ -118,7 +118,7 @@ public class RecipeHandlerPetalApothecary extends TemplateRecipeHandler {
}
protected ItemStack getRenderItem() {
return altarStack;
return APOTHECARY;
}
public List<? extends RecipePetals> getRecipes() {
@@ -24,7 +24,7 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
public class RecipeHandlerPureDaisy extends TemplateRecipeHandler {
private static final ItemStack flowerStack = ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_PUREDAISY);
private static final ItemStack DAISY = ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_PUREDAISY);
public class CachedPureDaisyRecipe extends CachedRecipe {
@@ -90,7 +90,7 @@ public class RecipeHandlerPureDaisy extends TemplateRecipeHandler {
GuiDraw.changeTexture(LibResources.GUI_PURE_DAISY_OVERLAY);
GuiDraw.drawTexturedModalRect(48, 10, 0, 0, 65, 44);
// Flower item
NEIHelper.renderItemIntoGUI(flowerStack, 71, 23);
NEIHelper.renderItemIntoGUI(DAISY, 71, 23);
}
@Override
@@ -14,7 +14,8 @@ import codechicken.nei.PositionedStack;
public class RecipeHandlerRunicAltar extends RecipeHandlerPetalApothecary {
private static final ItemStack altarStack = new ItemStack(ModBlocks.runeAltar);
private static final ItemStack ALTAR = new ItemStack(ModBlocks.runeAltar);
private static final PositionedStack LIVINGROCK = new PositionedStack(new ItemStack(ModBlocks.livingrock), 73, 39);
public class CachedRunicAltarRecipe extends CachedPetalApothecaryRecipe {
@@ -52,12 +53,12 @@ public class RecipeHandlerRunicAltar extends RecipeHandlerPetalApothecary {
@Override
public CachedPetalApothecaryRecipe getCachedRecipe(RecipePetals recipe) {
return new CachedRunicAltarRecipe((RecipeRuneAltar) recipe);
return new CachedRunicAltarRecipe((RecipeRuneAltar) recipe, LIVINGROCK);
}
@Override
protected ItemStack getRenderItem() {
return altarStack;
return ALTAR;
}
}