mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Fix depreated method usage for JEI
This commit is contained in:
1 parent
b8787f8230
commit
10e741ade5
31 files changed
+106
-141
No files matched your search
@@ -8,7 +8,6 @@ import javax.annotation.Nullable;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mezz.jei.api.ingredients.IIngredientHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class GasStackHelper implements IIngredientHelper<GasStack> {
|
||||
|
||||
@@ -59,11 +58,6 @@ public class GasStackHelper implements IIngredientHelper<GasStack> {
|
||||
return ingredient.getGas().getTranslationKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack cheatIngredient(GasStack ingredient, boolean fullStack) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack copyIngredient(GasStack ingredient) {
|
||||
return ingredient.copy();
|
||||
|
||||
@@ -109,6 +109,7 @@ import mezz.jei.api.ISubtypeRegistry;
|
||||
import mezz.jei.api.ISubtypeRegistry.ISubtypeInterpreter;
|
||||
import mezz.jei.api.JEIPlugin;
|
||||
import mezz.jei.api.ingredients.IModIngredientRegistration;
|
||||
import mezz.jei.api.recipe.IIngredientType;
|
||||
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import mezz.jei.api.recipe.VanillaRecipeCategoryUid;
|
||||
@@ -121,6 +122,8 @@ import net.minecraftforge.fml.common.Loader;
|
||||
@JEIPlugin
|
||||
public class MekanismJEI implements IModPlugin {
|
||||
|
||||
public static final IIngredientType<GasStack> TYPE_GAS = () -> GasStack.class;
|
||||
|
||||
public static final ISubtypeInterpreter NBT_INTERPRETER = itemStack ->
|
||||
{
|
||||
String ret = Integer.toString(itemStack.getMetadata());
|
||||
@@ -166,7 +169,7 @@ public class MekanismJEI implements IModPlugin {
|
||||
public void registerIngredients(IModIngredientRegistration registry) {
|
||||
List<GasStack> list = GasRegistry.getRegisteredGasses().stream().filter(Gas::isVisible)
|
||||
.map(g -> new GasStack(g, Fluid.BUCKET_VOLUME)).collect(Collectors.toList());
|
||||
registry.register(GasStack.class, list, new GasStackHelper(), GAS_RENDERER);
|
||||
registry.register(MekanismJEI.TYPE_GAS, list, new GasStackHelper(), GAS_RENDERER);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,6 +10,7 @@ import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.inputs.AdvancedMachineInput;
|
||||
import mekanism.common.recipe.machines.AdvancedMachineRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
@@ -89,7 +90,7 @@ public class AdvancedMachineRecipeCategory extends BaseRecipeCategory {
|
||||
itemStacks.set(1, ((ItemStackOutput) tempRecipe.recipeOutput).output);
|
||||
itemStacks.set(2, ((AdvancedMachineRecipeWrapper) recipeWrapper).getFuelStacks(input.gasType));
|
||||
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(GasStack.class);
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
|
||||
|
||||
initGas(gasStacks, 0, true, 33, 21, 6, 12,
|
||||
new GasStack(input.gasType, TileEntityAdvancedElectricMachine.BASE_TICKS_REQUIRED
|
||||
|
||||
@@ -3,12 +3,14 @@ package mekanism.client.jei.machine;
|
||||
import java.util.List;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.inputs.AdvancedMachineInput;
|
||||
import mekanism.common.recipe.machines.AdvancedMachineRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
import mekanism.common.tile.prefab.TileEntityAdvancedElectricMachine;
|
||||
import mekanism.common.util.GasUtils;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -22,11 +24,11 @@ public class AdvancedMachineRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(ItemStack.class, ((AdvancedMachineInput) recipe.getInput()).itemStack);
|
||||
ingredients.setInput(GasStack.class, new GasStack(((AdvancedMachineInput) recipe.getInput()).gasType,
|
||||
ingredients.setInput(VanillaTypes.ITEM, ((AdvancedMachineInput) recipe.getInput()).itemStack);
|
||||
ingredients.setInput(MekanismJEI.TYPE_GAS, new GasStack(((AdvancedMachineInput) recipe.getInput()).gasType,
|
||||
TileEntityAdvancedElectricMachine.BASE_TICKS_REQUIRED
|
||||
* TileEntityAdvancedElectricMachine.BASE_GAS_PER_TICK));
|
||||
ingredients.setOutput(ItemStack.class, ((ItemStackOutput) recipe.getOutput()).output);
|
||||
ingredients.setOutput(VanillaTypes.ITEM, ((ItemStackOutput) recipe.getOutput()).output);
|
||||
}
|
||||
|
||||
public List<ItemStack> getFuelStacks(Gas gasType) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package mekanism.client.jei.machine;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.client.gui.element.GuiPowerBar;
|
||||
import mekanism.client.gui.element.GuiPowerBar.IPowerInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
@@ -27,9 +26,6 @@ public class ChanceMachineRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private ChanceMachineRecipe tempRecipe;
|
||||
|
||||
public ChanceMachineRecipeCategory(IGuiHelper helper, String name, String unlocalized, ProgressBar progress) {
|
||||
super(helper, "mekanism:gui/GuiBasicMachine.png", name, unlocalized, progress);
|
||||
|
||||
@@ -73,7 +69,7 @@ public class ChanceMachineRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((ChanceMachineRecipeWrapper) recipeWrapper).getRecipe();
|
||||
ChanceMachineRecipe tempRecipe = ((ChanceMachineRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ import mekanism.common.recipe.inputs.ItemStackInput;
|
||||
import mekanism.common.recipe.machines.ChanceMachineRecipe;
|
||||
import mekanism.common.recipe.outputs.ChanceOutput;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ChanceMachineRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@@ -22,8 +22,8 @@ public class ChanceMachineRecipeWrapper implements IRecipeWrapper {
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ChanceOutput output = (ChanceOutput) recipe.getOutput();
|
||||
ingredients.setInput(ItemStack.class, ((ItemStackInput) recipe.getInput()).ingredient);
|
||||
ingredients.setOutputs(ItemStack.class, Arrays.asList(output.primaryOutput, output.secondaryOutput));
|
||||
ingredients.setInput(VanillaTypes.ITEM, ((ItemStackInput) recipe.getInput()).ingredient);
|
||||
ingredients.setOutputs(VanillaTypes.ITEM, Arrays.asList(output.primaryOutput, output.secondaryOutput));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package mekanism.client.jei.machine;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.client.gui.element.GuiPowerBar;
|
||||
import mekanism.client.gui.element.GuiPowerBar.IPowerInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
@@ -27,9 +26,6 @@ public class DoubleMachineRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private DoubleMachineRecipe tempRecipe;
|
||||
|
||||
public DoubleMachineRecipeCategory(IGuiHelper helper, String name, String unlocalized, ProgressBar progress) {
|
||||
super(helper, "mekanism:gui/guibasicmachine.png", name, unlocalized, progress);
|
||||
|
||||
@@ -76,7 +72,7 @@ public class DoubleMachineRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((DoubleMachineRecipeWrapper) recipeWrapper).getRecipe();
|
||||
DoubleMachineRecipe tempRecipe = ((DoubleMachineRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
DoubleMachineInput input = (DoubleMachineInput) tempRecipe.recipeInput;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import mekanism.common.recipe.inputs.DoubleMachineInput;
|
||||
import mekanism.common.recipe.machines.DoubleMachineRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class DoubleMachineRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@@ -19,8 +19,8 @@ public class DoubleMachineRecipeWrapper implements IRecipeWrapper {
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
DoubleMachineInput input = (DoubleMachineInput) recipe.getInput();
|
||||
ingredients.setInputs(ItemStack.class, Arrays.asList(input.itemStack, input.extraStack));
|
||||
ingredients.setOutput(ItemStack.class, ((ItemStackOutput) recipe.getOutput()).output);
|
||||
ingredients.setInputs(VanillaTypes.ITEM, Arrays.asList(input.itemStack, input.extraStack));
|
||||
ingredients.setOutput(VanillaTypes.ITEM, ((ItemStackOutput) recipe.getOutput()).output);
|
||||
}
|
||||
|
||||
public DoubleMachineRecipe getRecipe() {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package mekanism.client.jei.machine;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.client.gui.element.GuiPowerBar;
|
||||
import mekanism.client.gui.element.GuiPowerBar.IPowerInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
@@ -25,9 +24,6 @@ public class MachineRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private BasicMachineRecipe tempRecipe;
|
||||
|
||||
public MachineRecipeCategory(IGuiHelper helper, String name, String unlocalized, ProgressBar progress) {
|
||||
super(helper, "mekanism:gui/GuiBasicMachine.png", name, unlocalized, progress);
|
||||
|
||||
@@ -71,7 +67,7 @@ public class MachineRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((MachineRecipeWrapper) recipeWrapper).getRecipe();
|
||||
BasicMachineRecipe tempRecipe = ((MachineRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import mekanism.common.recipe.inputs.ItemStackInput;
|
||||
import mekanism.common.recipe.machines.BasicMachineRecipe;
|
||||
import mekanism.common.recipe.outputs.ItemStackOutput;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class MachineRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@@ -17,8 +17,8 @@ public class MachineRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(ItemStack.class, ((ItemStackInput) recipe.getInput()).ingredient);
|
||||
ingredients.setOutput(ItemStack.class, ((ItemStackOutput) recipe.getOutput()).output);
|
||||
ingredients.setInput(VanillaTypes.ITEM, ((ItemStackInput) recipe.getInput()).ingredient);
|
||||
ingredients.setOutput(VanillaTypes.ITEM, ((ItemStackOutput) recipe.getOutput()).output);
|
||||
}
|
||||
|
||||
public BasicMachineRecipe getRecipe() {
|
||||
|
||||
+3
-6
@@ -1,8 +1,8 @@
|
||||
package mekanism.client.jei.machine.chemical;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.CrystallizerRecipe;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
@@ -18,9 +18,6 @@ public class ChemicalCrystallizerRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private CrystallizerRecipe tempRecipe;
|
||||
|
||||
public ChemicalCrystallizerRecipeCategory(IGuiHelper helper) {
|
||||
super(helper, "mekanism:gui/nei/GuiChemicalCrystallizer.png", "chemical_crystallizer",
|
||||
"tile.MachineBlock2.ChemicalCrystallizer.name", null);
|
||||
@@ -50,14 +47,14 @@ public class ChemicalCrystallizerRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((ChemicalCrystallizerRecipeWrapper) recipeWrapper).getRecipe();
|
||||
CrystallizerRecipe tempRecipe = ((ChemicalCrystallizerRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
itemStacks.init(0, false, 130 - xOffset, 56 - yOffset);
|
||||
itemStacks.set(0, tempRecipe.getOutput().output);
|
||||
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(GasStack.class);
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
|
||||
|
||||
initGas(gasStacks, 0, true, 6 - xOffset, 5 - yOffset, 16, 58, tempRecipe.getInput().ingredient, true);
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package mekanism.client.jei.machine.chemical;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.CrystallizerRecipe;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ChemicalCrystallizerRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@@ -16,8 +16,8 @@ public class ChemicalCrystallizerRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(GasStack.class, recipe.recipeInput.ingredient);
|
||||
ingredients.setOutput(ItemStack.class, recipe.recipeOutput.output);
|
||||
ingredients.setInput(MekanismJEI.TYPE_GAS, recipe.recipeInput.ingredient);
|
||||
ingredients.setOutput(VanillaTypes.ITEM, recipe.recipeOutput.output);
|
||||
}
|
||||
|
||||
public CrystallizerRecipe getRecipe() {
|
||||
|
||||
+3
-6
@@ -1,8 +1,8 @@
|
||||
package mekanism.client.jei.machine.chemical;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.recipe.machines.DissolutionRecipe;
|
||||
import mekanism.common.tile.TileEntityChemicalDissolutionChamber;
|
||||
@@ -20,9 +20,6 @@ public class ChemicalDissolutionChamberRecipeCategory extends BaseRecipeCategory
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private DissolutionRecipe tempRecipe;
|
||||
|
||||
public ChemicalDissolutionChamberRecipeCategory(IGuiHelper helper) {
|
||||
super(helper, "mekanism:gui/nei/GuiChemicalDissolutionChamber.png", "chemical_dissolution_chamber",
|
||||
"gui.chemicalDissolutionChamber.short", null);
|
||||
@@ -52,14 +49,14 @@ public class ChemicalDissolutionChamberRecipeCategory extends BaseRecipeCategory
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((ChemicalDissolutionChamberRecipeWrapper) recipeWrapper).getRecipe();
|
||||
DissolutionRecipe tempRecipe = ((ChemicalDissolutionChamberRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
itemStacks.init(0, true, 25 - xOffset, 35 - yOffset);
|
||||
itemStacks.set(0, tempRecipe.getInput().ingredient);
|
||||
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(GasStack.class);
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
|
||||
|
||||
initGas(gasStacks, 0, true, 6 - xOffset, 5 - yOffset, 16, 58,
|
||||
new GasStack(MekanismFluids.SulfuricAcid, TileEntityChemicalDissolutionChamber.BASE_INJECT_USAGE
|
||||
|
||||
+5
-4
@@ -1,12 +1,13 @@
|
||||
package mekanism.client.jei.machine.chemical;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.recipe.machines.DissolutionRecipe;
|
||||
import mekanism.common.tile.TileEntityChemicalDissolutionChamber;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ChemicalDissolutionChamberRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@@ -18,11 +19,11 @@ public class ChemicalDissolutionChamberRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(GasStack.class, new GasStack(MekanismFluids.SulfuricAcid,
|
||||
ingredients.setInput(MekanismJEI.TYPE_GAS, new GasStack(MekanismFluids.SulfuricAcid,
|
||||
TileEntityChemicalDissolutionChamber.BASE_INJECT_USAGE
|
||||
* TileEntityChemicalDissolutionChamber.BASE_TICKS_REQUIRED));
|
||||
ingredients.setInput(ItemStack.class, recipe.recipeInput.ingredient);
|
||||
ingredients.setOutput(GasStack.class, recipe.recipeOutput.output);
|
||||
ingredients.setInput(VanillaTypes.ITEM, recipe.recipeInput.ingredient);
|
||||
ingredients.setOutput(MekanismJEI.TYPE_GAS, recipe.recipeOutput.output);
|
||||
}
|
||||
|
||||
public DissolutionRecipe getRecipe() {
|
||||
|
||||
+3
-6
@@ -1,8 +1,8 @@
|
||||
package mekanism.client.jei.machine.chemical;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.ChemicalInfuserRecipe;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
@@ -17,9 +17,6 @@ public class ChemicalInfuserRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private ChemicalInfuserRecipe tempRecipe;
|
||||
|
||||
public ChemicalInfuserRecipeCategory(IGuiHelper helper) {
|
||||
super(helper, "mekanism:gui/nei/GuiChemicalInfuser.png", "chemical_infuser",
|
||||
"tile.MachineBlock2.ChemicalInfuser.name", null);
|
||||
@@ -49,9 +46,9 @@ public class ChemicalInfuserRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((ChemicalInfuserRecipeWrapper) recipeWrapper).getRecipe();
|
||||
ChemicalInfuserRecipe tempRecipe = ((ChemicalInfuserRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(GasStack.class);
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
|
||||
|
||||
initGas(gasStacks, 0, true, 26 - xOffset, 14 - yOffset, 16, 58, tempRecipe.getInput().leftGas, true);
|
||||
initGas(gasStacks, 1, true, 134 - xOffset, 14 - yOffset, 16, 58, tempRecipe.getInput().rightGas, true);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package mekanism.client.jei.machine.chemical;
|
||||
|
||||
import java.util.Arrays;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.ChemicalInfuserRecipe;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
@@ -16,8 +16,8 @@ public class ChemicalInfuserRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInputs(GasStack.class, Arrays.asList(recipe.recipeInput.leftGas, recipe.recipeInput.rightGas));
|
||||
ingredients.setOutput(GasStack.class, recipe.recipeOutput.output);
|
||||
ingredients.setInputs(MekanismJEI.TYPE_GAS, Arrays.asList(recipe.recipeInput.leftGas, recipe.recipeInput.rightGas));
|
||||
ingredients.setOutput(MekanismJEI.TYPE_GAS, recipe.recipeOutput.output);
|
||||
}
|
||||
|
||||
public ChemicalInfuserRecipe getRecipe() {
|
||||
|
||||
+3
-6
@@ -1,6 +1,5 @@
|
||||
package mekanism.client.jei.machine.chemical;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.gui.element.GuiGasGauge;
|
||||
import mekanism.client.gui.element.GuiGauge;
|
||||
@@ -10,6 +9,7 @@ import mekanism.client.gui.element.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.OxidationRecipe;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
@@ -26,9 +26,6 @@ public class ChemicalOxidizerRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private OxidationRecipe tempRecipe;
|
||||
|
||||
public ChemicalOxidizerRecipeCategory(IGuiHelper helper) {
|
||||
super(helper, "mekanism:gui/GuiChemicalOxidizer.png", "chemical_oxidizer",
|
||||
"tile.MachineBlock2.ChemicalOxidizer.name", ProgressBar.LARGE_RIGHT);
|
||||
@@ -66,14 +63,14 @@ public class ChemicalOxidizerRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((ChemicalOxidizerRecipeWrapper) recipeWrapper).getRecipe();
|
||||
OxidationRecipe tempRecipe = ((ChemicalOxidizerRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
itemStacks.init(0, true, 25 - xOffset, 35 - yOffset);
|
||||
itemStacks.set(0, tempRecipe.getInput().ingredient);
|
||||
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(GasStack.class);
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
|
||||
|
||||
initGas(gasStacks, 0, false, 134 - xOffset, 14 - yOffset, 16, 58, tempRecipe.recipeOutput.output, true);
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package mekanism.client.jei.machine.chemical;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.OxidationRecipe;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ChemicalOxidizerRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@@ -16,8 +16,8 @@ public class ChemicalOxidizerRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(ItemStack.class, recipe.recipeInput.ingredient);
|
||||
ingredients.setOutput(GasStack.class, recipe.recipeOutput.output);
|
||||
ingredients.setInput(VanillaTypes.ITEM, recipe.recipeInput.ingredient);
|
||||
ingredients.setOutput(MekanismJEI.TYPE_GAS, recipe.recipeOutput.output);
|
||||
}
|
||||
|
||||
public OxidationRecipe getRecipe() {
|
||||
|
||||
+5
-8
@@ -1,8 +1,8 @@
|
||||
package mekanism.client.jei.machine.chemical;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.WasherRecipe;
|
||||
import mekanism.common.tile.TileEntityChemicalWasher;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
@@ -11,18 +11,15 @@ import mezz.jei.api.gui.IGuiFluidStackGroup;
|
||||
import mezz.jei.api.gui.IGuiIngredientGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class ChemicalWasherRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private WasherRecipe tempRecipe;
|
||||
|
||||
public ChemicalWasherRecipeCategory(IGuiHelper helper) {
|
||||
super(helper, "mekanism:gui/nei/GuiChemicalWasher.png", "chemical_washer",
|
||||
"tile.MachineBlock2.ChemicalWasher.name", null);
|
||||
@@ -51,15 +48,15 @@ public class ChemicalWasherRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((ChemicalWasherRecipeWrapper) recipeWrapper).getRecipe();
|
||||
WasherRecipe tempRecipe = ((ChemicalWasherRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
|
||||
|
||||
fluidStacks.init(0, true, 6 - xOffset, 5 - yOffset, 16, 58, TileEntityChemicalWasher.WATER_USAGE, false,
|
||||
fluidOverlayLarge);
|
||||
fluidStacks.set(0, ingredients.getInputs(FluidStack.class).get(0));
|
||||
fluidStacks.set(0, ingredients.getInputs(VanillaTypes.FLUID).get(0));
|
||||
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(GasStack.class);
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
|
||||
|
||||
initGas(gasStacks, 0, true, 27 - xOffset, 14 - yOffset, 16, 58, tempRecipe.getInput().ingredient, true);
|
||||
initGas(gasStacks, 1, false, 134 - xOffset, 14 - yOffset, 16, 58, tempRecipe.getOutput().output, true);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package mekanism.client.jei.machine.chemical;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.WasherRecipe;
|
||||
import mekanism.common.tile.TileEntityChemicalWasher;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -18,9 +19,9 @@ public class ChemicalWasherRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(FluidStack.class, new FluidStack(FluidRegistry.WATER, TileEntityChemicalWasher.WATER_USAGE));
|
||||
ingredients.setInput(GasStack.class, recipe.recipeInput.ingredient);
|
||||
ingredients.setOutput(GasStack.class, recipe.recipeOutput.output);
|
||||
ingredients.setInput(VanillaTypes.FLUID, new FluidStack(FluidRegistry.WATER, TileEntityChemicalWasher.WATER_USAGE));
|
||||
ingredients.setInput(MekanismJEI.TYPE_GAS, recipe.recipeInput.ingredient);
|
||||
ingredients.setOutput(MekanismJEI.TYPE_GAS, recipe.recipeOutput.output);
|
||||
}
|
||||
|
||||
public WasherRecipe getRecipe() {
|
||||
|
||||
+5
-8
@@ -1,6 +1,5 @@
|
||||
package mekanism.client.jei.machine.other;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.gui.element.GuiFluidGauge;
|
||||
import mekanism.client.gui.element.GuiGasGauge;
|
||||
@@ -14,6 +13,7 @@ import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.SeparatorRecipe;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
@@ -23,17 +23,14 @@ import mezz.jei.api.gui.IGuiFluidStackGroup;
|
||||
import mezz.jei.api.gui.IGuiIngredientGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class ElectrolyticSeparatorRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private SeparatorRecipe tempRecipe;
|
||||
|
||||
public ElectrolyticSeparatorRecipeCategory(IGuiHelper helper) {
|
||||
super(helper, "mekanism:gui/GuiElectrolyticSeparator.png", "electrolytic_separator",
|
||||
"tile.MachineBlock2.ElectrolyticSeparator.name", ProgressBar.BI);
|
||||
@@ -88,14 +85,14 @@ public class ElectrolyticSeparatorRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((ElectrolyticSeparatorRecipeWrapper) recipeWrapper).getRecipe();
|
||||
SeparatorRecipe tempRecipe = ((ElectrolyticSeparatorRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
|
||||
|
||||
fluidStacks.init(0, true, 2, 2, 16, 58, tempRecipe.getInput().ingredient.amount, false, fluidOverlayLarge);
|
||||
fluidStacks.set(0, ingredients.getInputs(FluidStack.class).get(0));
|
||||
fluidStacks.set(0, ingredients.getInputs(VanillaTypes.FLUID).get(0));
|
||||
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(GasStack.class);
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
|
||||
|
||||
initGas(gasStacks, 0, false, 59 - xOffset, 19 - yOffset, 16, 28, tempRecipe.recipeOutput.leftGas, true);
|
||||
initGas(gasStacks, 1, false, 101 - xOffset, 19 - yOffset, 16, 28, tempRecipe.recipeOutput.rightGas, true);
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
package mekanism.client.jei.machine.other;
|
||||
|
||||
import java.util.Arrays;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.SeparatorRecipe;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class ElectrolyticSeparatorRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@@ -17,9 +17,9 @@ public class ElectrolyticSeparatorRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(FluidStack.class, recipe.recipeInput.ingredient);
|
||||
ingredients
|
||||
.setOutputs(GasStack.class, Arrays.asList(recipe.recipeOutput.leftGas, recipe.recipeOutput.rightGas));
|
||||
ingredients.setInput(VanillaTypes.FLUID, recipe.recipeInput.ingredient);
|
||||
ingredients.setOutputs(MekanismJEI.TYPE_GAS,
|
||||
Arrays.asList(recipe.recipeOutput.leftGas, recipe.recipeOutput.rightGas));
|
||||
}
|
||||
|
||||
public SeparatorRecipe getRecipe() {
|
||||
|
||||
+4
-3
@@ -7,6 +7,7 @@ import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.InfuseStorage;
|
||||
import mekanism.common.recipe.machines.MetallurgicInfuserRecipe;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -24,9 +25,9 @@ public class MetallurgicInfuserRecipeWrapper implements IRecipeWrapper {
|
||||
List<ItemStack> inputStacks = Collections.singletonList(recipe.recipeInput.inputStack);
|
||||
List<ItemStack> infuseStacks = MetallurgicInfuserRecipeCategory.getInfuseStacks(recipe.getInput().infuse.type);
|
||||
|
||||
ingredients.setInput(ItemStack.class, recipe.recipeInput.inputStack);
|
||||
ingredients.setInputLists(ItemStack.class, Arrays.asList(inputStacks, infuseStacks));
|
||||
ingredients.setOutput(ItemStack.class, recipe.recipeOutput.output);
|
||||
ingredients.setInput(VanillaTypes.ITEM, recipe.recipeInput.inputStack);
|
||||
ingredients.setInputLists(VanillaTypes.ITEM, Arrays.asList(inputStacks, infuseStacks));
|
||||
ingredients.setOutput(VanillaTypes.ITEM, recipe.recipeOutput.output);
|
||||
}
|
||||
|
||||
public MetallurgicInfuserRecipe getRecipe() {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package mekanism.client.jei.machine.other;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.gui.element.GuiFluidGauge;
|
||||
import mekanism.client.gui.element.GuiGasGauge;
|
||||
@@ -14,6 +13,7 @@ import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.PressurizedRecipe;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
@@ -29,9 +29,6 @@ public class PRCRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private PressurizedRecipe tempRecipe;
|
||||
|
||||
public PRCRecipeCategory(IGuiHelper helper) {
|
||||
super(helper, "mekanism:gui/nei/GuiPRC.png", "pressurized_reaction_chamber",
|
||||
"tile.MachineBlock2.PressurizedReactionChamber.short.name", ProgressBar.MEDIUM);
|
||||
@@ -77,7 +74,7 @@ public class PRCRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((PRCRecipeWrapper) recipeWrapper).getRecipe();
|
||||
PressurizedRecipe tempRecipe = ((PRCRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
@@ -92,7 +89,7 @@ public class PRCRecipeCategory extends BaseRecipeCategory {
|
||||
fluidStacks.init(0, true, 3, 0, 16, 58, tempRecipe.getInput().getFluid().amount, false, fluidOverlayLarge);
|
||||
fluidStacks.set(0, tempRecipe.recipeInput.getFluid());
|
||||
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(GasStack.class);
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
|
||||
|
||||
initGas(gasStacks, 0, true, 29 - xOffset, 11 - yOffset, 16, 58, tempRecipe.recipeInput.getGas(), true);
|
||||
initGas(gasStacks, 1, false, 141 - xOffset, 41 - yOffset, 16, 28, tempRecipe.recipeOutput.getGasOutput(), true);
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package mekanism.client.jei.machine.other;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.PressurizedRecipe;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class PRCRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@@ -17,11 +16,11 @@ public class PRCRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(ItemStack.class, recipe.recipeInput.getSolid());
|
||||
ingredients.setInput(FluidStack.class, recipe.recipeInput.getFluid());
|
||||
ingredients.setInput(GasStack.class, recipe.recipeInput.getGas());
|
||||
ingredients.setOutput(ItemStack.class, recipe.recipeOutput.getItemOutput());
|
||||
ingredients.setOutput(GasStack.class, recipe.recipeOutput.getGasOutput());
|
||||
ingredients.setInput(VanillaTypes.ITEM, recipe.recipeInput.getSolid());
|
||||
ingredients.setInput(VanillaTypes.FLUID, recipe.recipeInput.getFluid());
|
||||
ingredients.setInput(MekanismJEI.TYPE_GAS, recipe.recipeInput.getGas());
|
||||
ingredients.setOutput(VanillaTypes.ITEM, recipe.recipeOutput.getItemOutput());
|
||||
ingredients.setOutput(MekanismJEI.TYPE_GAS, recipe.recipeOutput.getGasOutput());
|
||||
}
|
||||
|
||||
public PressurizedRecipe getRecipe() {
|
||||
|
||||
+5
-4
@@ -3,16 +3,17 @@ package mekanism.client.jei.machine.other;
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiFluidStackGroup;
|
||||
import mezz.jei.api.gui.IGuiIngredientGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class RotaryCondensentratorRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
@@ -67,17 +68,17 @@ public class RotaryCondensentratorRecipeCategory extends BaseRecipeCategory {
|
||||
tempRecipe = (RotaryCondensentratorRecipeWrapper) recipeWrapper;
|
||||
|
||||
IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(GasStack.class);
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
|
||||
|
||||
fluidStacks.init(0, !tempRecipe.condensentrating, 134 - xOffset, 14 - yOffset, 16, 58, tempRecipe.fluidAmount, false,
|
||||
fluidOverlayLarge);
|
||||
|
||||
if (tempRecipe.condensentrating) {
|
||||
initGas(gasStacks, 0, true, 26 - xOffset, 14 - yOffset, 16, 58, new GasStack(tempRecipe.gasType, tempRecipe.gasAmount), true);
|
||||
fluidStacks.set(0, ingredients.getOutputs(FluidStack.class).get(0));
|
||||
fluidStacks.set(0, ingredients.getOutputs(VanillaTypes.FLUID).get(0));
|
||||
} else {
|
||||
initGas(gasStacks, 0, false, 26 - xOffset, 14 - yOffset, 16, 58, new GasStack(tempRecipe.gasType, tempRecipe.gasAmount), true);
|
||||
fluidStacks.set(0, ingredients.getInputs(FluidStack.class).get(0));
|
||||
fluidStacks.set(0, ingredients.getInputs(VanillaTypes.FLUID).get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-4
@@ -3,8 +3,10 @@ package mekanism.client.jei.machine.other;
|
||||
import javax.annotation.Nonnull;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
@@ -29,11 +31,11 @@ public class RotaryCondensentratorRecipeWrapper implements IRecipeWrapper {
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
if (condensentrating) {
|
||||
ingredients.setInput(GasStack.class, new GasStack(gasType, gasAmount));
|
||||
ingredients.setOutput(FluidStack.class, new FluidStack(fluidType, fluidAmount));
|
||||
ingredients.setInput(MekanismJEI.TYPE_GAS, new GasStack(gasType, gasAmount));
|
||||
ingredients.setOutput(VanillaTypes.FLUID, new FluidStack(fluidType, fluidAmount));
|
||||
} else {
|
||||
ingredients.setInput(FluidStack.class, new FluidStack(fluidType, fluidAmount));
|
||||
ingredients.setOutput(GasStack.class, new GasStack(gasType, gasAmount));
|
||||
ingredients.setInput(VanillaTypes.FLUID, new FluidStack(fluidType, fluidAmount));
|
||||
ingredients.setOutput(MekanismJEI.TYPE_GAS, new GasStack(gasType, gasAmount));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package mekanism.client.jei.machine.other;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.SolarNeutronRecipe;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
@@ -17,9 +17,6 @@ public class SolarNeutronRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private SolarNeutronRecipe tempRecipe;
|
||||
|
||||
public SolarNeutronRecipeCategory(IGuiHelper helper) {
|
||||
super(helper, "mekanism:gui/nei/GuiSolarNeutronActivator.png", "solar_neutron_activator",
|
||||
"tile.MachineBlock3.SolarNeutronActivator.name", null);
|
||||
@@ -48,9 +45,9 @@ public class SolarNeutronRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((SolarNeutronRecipeWrapper) recipeWrapper).getRecipe();
|
||||
SolarNeutronRecipe tempRecipe = ((SolarNeutronRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(GasStack.class);
|
||||
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
|
||||
|
||||
initGas(gasStacks, 0, true, 26 - xOffset, 14 - yOffset, 16, 58, tempRecipe.recipeInput.ingredient, true);
|
||||
initGas(gasStacks, 1, false, 134 - xOffset, 14 - yOffset, 16, 58, tempRecipe.recipeOutput.output, true);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mekanism.client.jei.machine.other;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.common.recipe.machines.SolarNeutronRecipe;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
@@ -15,8 +15,8 @@ public class SolarNeutronRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(GasStack.class, recipe.getInput().ingredient);
|
||||
ingredients.setOutput(GasStack.class, recipe.getOutput().output);
|
||||
ingredients.setInput(MekanismJEI.TYPE_GAS, recipe.getInput().ingredient);
|
||||
ingredients.setOutput(MekanismJEI.TYPE_GAS, recipe.getOutput().output);
|
||||
}
|
||||
|
||||
public SolarNeutronRecipe getRecipe() {
|
||||
|
||||
+1
-5
@@ -1,6 +1,5 @@
|
||||
package mekanism.client.jei.machine.other;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.common.recipe.machines.ThermalEvaporationRecipe;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
@@ -16,9 +15,6 @@ public class ThermalEvaporationRecipeCategory extends BaseRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@Nullable
|
||||
private ThermalEvaporationRecipe tempRecipe;
|
||||
|
||||
public ThermalEvaporationRecipeCategory(IGuiHelper helper) {
|
||||
super(helper, "mekanism:gui/nei/GuiThermalEvaporationController.png", "thermal_evaporation_plant",
|
||||
"gui.thermalEvaporationController.short", null);
|
||||
@@ -47,7 +43,7 @@ public class ThermalEvaporationRecipeCategory extends BaseRecipeCategory {
|
||||
return;
|
||||
}
|
||||
|
||||
tempRecipe = ((ThermalEvaporationRecipeWrapper) recipeWrapper).getRecipe();
|
||||
ThermalEvaporationRecipe tempRecipe = ((ThermalEvaporationRecipeWrapper) recipeWrapper).getRecipe();
|
||||
|
||||
IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
|
||||
|
||||
|
||||
+3
-3
@@ -2,8 +2,8 @@ package mekanism.client.jei.machine.other;
|
||||
|
||||
import mekanism.common.recipe.machines.ThermalEvaporationRecipe;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class ThermalEvaporationRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@@ -15,8 +15,8 @@ public class ThermalEvaporationRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(FluidStack.class, recipe.getInput().ingredient);
|
||||
ingredients.setOutput(FluidStack.class, recipe.getOutput().output);
|
||||
ingredients.setInput(VanillaTypes.FLUID, recipe.getInput().ingredient);
|
||||
ingredients.setOutput(VanillaTypes.FLUID, recipe.getOutput().output);
|
||||
}
|
||||
|
||||
public ThermalEvaporationRecipe getRecipe() {
|
||||
|
||||
Reference in new issue
Block a user