This commit is contained in:
Hubry committed 2020-01-15 00:00:00 +01:00
1 parent f067c5a2b2
commit 2195d9293a
3 files changed
+10 -4

No files matched your search

@@ -9,6 +9,7 @@
package vazkii.botania.client.integration.jei.orechid;
import mezz.jei.api.helpers.IGuiHelper;
import net.minecraft.block.Blocks;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@@ -24,7 +25,8 @@ public class OrechidIgnemRecipeCategory extends OrechidRecipeCategoryBase<Orechi
public static final ResourceLocation UID = new ResourceLocation(LibMisc.MOD_ID, "orechid_ignem");
public OrechidIgnemRecipeCategory(IGuiHelper guiHelper) {
super(guiHelper, new ItemStack(ModSubtiles.orechidIgnem), I18n.format("botania.nei.orechidIgnem"));
super(guiHelper, new ItemStack(ModSubtiles.orechidIgnem), new ItemStack(Blocks.NETHERRACK, 64),
I18n.format("botania.nei.orechidIgnem"));
}
@Nonnull
@@ -9,6 +9,7 @@
package vazkii.botania.client.integration.jei.orechid;
import mezz.jei.api.helpers.IGuiHelper;
import net.minecraft.block.Blocks;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@@ -23,7 +24,8 @@ public class OrechidRecipeCategory extends OrechidRecipeCategoryBase<OrechidReci
public static final ResourceLocation UID = new ResourceLocation(LibMisc.MOD_ID, "orechid");
public OrechidRecipeCategory(IGuiHelper guiHelper) {
super(guiHelper, new ItemStack(ModSubtiles.orechid), I18n.format("botania.nei.orechid"));
super(guiHelper, new ItemStack(ModSubtiles.orechid), new ItemStack(Blocks.STONE, 64),
I18n.format("botania.nei.orechid"));
}
@Nonnull
@@ -37,14 +37,16 @@ public abstract class OrechidRecipeCategoryBase<T extends OrechidRecipeWrapper>
private final IDrawableStatic overlay;
private final IDrawable icon;
private final ItemStack iconStack;
private final ItemStack inputStack;
public OrechidRecipeCategoryBase(IGuiHelper guiHelper, ItemStack iconStack, String localizedName) {
public OrechidRecipeCategoryBase(IGuiHelper guiHelper, ItemStack iconStack, ItemStack inputStack, String localizedName) {
overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/pure_daisy_overlay.png"),
0, 0, 64, 46);
background = guiHelper.createBlankDrawable(168, 64);
this.localizedName = localizedName;
this.icon = guiHelper.createDrawableIngredient(iconStack);
this.iconStack = iconStack;
this.inputStack = inputStack;
}
@Nonnull
@@ -71,7 +73,7 @@ public abstract class OrechidRecipeCategoryBase<T extends OrechidRecipeWrapper>
@Override
public void setIngredients(T recipe, IIngredients ingredients) {
ingredients.setInput(VanillaTypes.ITEM, new ItemStack(Blocks.STONE, 64));
ingredients.setInput(VanillaTypes.ITEM, inputStack);
final int myWeight = recipe.entry.getValue();
final int amount = Math.max(1, Math.round((float) myWeight * 64 / getTotalOreWeight(getOreWeights(), myWeight)));