diff --git a/src/main/java/mekanism/client/jei/BaseRecipeCategory.java b/src/main/java/mekanism/client/jei/BaseRecipeCategory.java index 50920691f..ef23dc3f8 100644 --- a/src/main/java/mekanism/client/jei/BaseRecipeCategory.java +++ b/src/main/java/mekanism/client/jei/BaseRecipeCategory.java @@ -45,8 +45,10 @@ public abstract class BaseRecipeCategory implements IRecipeCategory 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); - initGas(gasStacks, 2, false, 80 - xOffset, 5 - yOffset, 16, 58, tempRecipe.getOutput().output, true);return; + initGas(gasStacks, 2, false, 80 - xOffset, 5 - yOffset, 16, 58, tempRecipe.getOutput().output, true); + return; } } } diff --git a/src/main/java/mekanism/client/jei/machine/chemical/ChemicalInfuserRecipeWrapper.java b/src/main/java/mekanism/client/jei/machine/chemical/ChemicalInfuserRecipeWrapper.java index 010965119..706161062 100644 --- a/src/main/java/mekanism/client/jei/machine/chemical/ChemicalInfuserRecipeWrapper.java +++ b/src/main/java/mekanism/client/jei/machine/chemical/ChemicalInfuserRecipeWrapper.java @@ -16,7 +16,8 @@ public class ChemicalInfuserRecipeWrapper implements IRecipeWrapper { @Override public void getIngredients(IIngredients ingredients) { - ingredients.setInputs(MekanismJEI.TYPE_GAS, Arrays.asList(recipe.recipeInput.leftGas, recipe.recipeInput.rightGas)); + ingredients + .setInputs(MekanismJEI.TYPE_GAS, Arrays.asList(recipe.recipeInput.leftGas, recipe.recipeInput.rightGas)); ingredients.setOutput(MekanismJEI.TYPE_GAS, recipe.recipeOutput.output); } diff --git a/src/main/java/mekanism/client/jei/machine/chemical/ChemicalOxidizerRecipeCategory.java b/src/main/java/mekanism/client/jei/machine/chemical/ChemicalOxidizerRecipeCategory.java index e759c53ea..2532fb2e7 100644 --- a/src/main/java/mekanism/client/jei/machine/chemical/ChemicalOxidizerRecipeCategory.java +++ b/src/main/java/mekanism/client/jei/machine/chemical/ChemicalOxidizerRecipeCategory.java @@ -12,7 +12,6 @@ import mekanism.client.jei.BaseRecipeCategory; import mekanism.client.jei.MekanismJEI; import mekanism.common.recipe.machines.OxidationRecipe; import mezz.jei.api.IGuiHelper; -import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiIngredientGroup; import mezz.jei.api.gui.IGuiItemStackGroup; import mezz.jei.api.gui.IRecipeLayout; @@ -21,14 +20,9 @@ import mezz.jei.api.recipe.IRecipeWrapper; public class ChemicalOxidizerRecipeCategory extends BaseRecipeCategory { - private final IDrawable background; - public ChemicalOxidizerRecipeCategory(IGuiHelper helper) { super(helper, "mekanism:gui/GuiChemicalOxidizer.png", "chemical_oxidizer", - "tile.MachineBlock2.ChemicalOxidizer.name", ProgressBar.LARGE_RIGHT); - xOffset = 20; - yOffset = 12; - background = guiHelper.createDrawable(guiLocation, xOffset, yOffset, 132, 62); + "tile.MachineBlock2.ChemicalOxidizer.name", ProgressBar.LARGE_RIGHT, 20, 12, 132, 62); } @Override @@ -43,11 +37,6 @@ public class ChemicalOxidizerRecipeCategory extends BaseRecipeCategory { }, progressBar, this, guiLocation, 62, 39)); } - @Override - public IDrawable getBackground() { - return background; - } - @Override public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { if (recipeWrapper instanceof ChemicalOxidizerRecipeWrapper) { diff --git a/src/main/java/mekanism/client/jei/machine/chemical/ChemicalWasherRecipeCategory.java b/src/main/java/mekanism/client/jei/machine/chemical/ChemicalWasherRecipeCategory.java index 3e008a071..82f8ae2e8 100644 --- a/src/main/java/mekanism/client/jei/machine/chemical/ChemicalWasherRecipeCategory.java +++ b/src/main/java/mekanism/client/jei/machine/chemical/ChemicalWasherRecipeCategory.java @@ -6,7 +6,6 @@ import mekanism.client.jei.MekanismJEI; import mekanism.common.recipe.machines.WasherRecipe; import mekanism.common.tile.TileEntityChemicalWasher; 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; @@ -17,14 +16,9 @@ import net.minecraft.client.Minecraft; public class ChemicalWasherRecipeCategory extends BaseRecipeCategory { - private final IDrawable background; - public ChemicalWasherRecipeCategory(IGuiHelper helper) { super(helper, "mekanism:gui/nei/GuiChemicalWasher.png", "chemical_washer", - "tile.MachineBlock2.ChemicalWasher.name", null); - xOffset = 3; - yOffset = 3; - background = guiHelper.createDrawable(guiLocation, xOffset, yOffset, 170, 70); + "tile.MachineBlock2.ChemicalWasher.name", null, 3, 3, 170, 70); } @Override @@ -33,11 +27,6 @@ public class ChemicalWasherRecipeCategory extends BaseRecipeCategory { drawTexturedRect(61 - xOffset, 39 - yOffset, 176, 63, 55, 8); } - @Override - public IDrawable getBackground() { - return background; - } - @Override public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { if (recipeWrapper instanceof ChemicalWasherRecipeWrapper) { diff --git a/src/main/java/mekanism/client/jei/machine/chemical/ChemicalWasherRecipeWrapper.java b/src/main/java/mekanism/client/jei/machine/chemical/ChemicalWasherRecipeWrapper.java index cbdea4633..5c78d85c1 100644 --- a/src/main/java/mekanism/client/jei/machine/chemical/ChemicalWasherRecipeWrapper.java +++ b/src/main/java/mekanism/client/jei/machine/chemical/ChemicalWasherRecipeWrapper.java @@ -19,7 +19,8 @@ public class ChemicalWasherRecipeWrapper implements IRecipeWrapper { @Override public void getIngredients(IIngredients ingredients) { - ingredients.setInput(VanillaTypes.FLUID, new FluidStack(FluidRegistry.WATER, TileEntityChemicalWasher.WATER_USAGE)); + 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); } diff --git a/src/main/java/mekanism/client/jei/machine/other/ElectrolyticSeparatorRecipeCategory.java b/src/main/java/mekanism/client/jei/machine/other/ElectrolyticSeparatorRecipeCategory.java index 28640ba7a..355bf477b 100644 --- a/src/main/java/mekanism/client/jei/machine/other/ElectrolyticSeparatorRecipeCategory.java +++ b/src/main/java/mekanism/client/jei/machine/other/ElectrolyticSeparatorRecipeCategory.java @@ -16,7 +16,6 @@ import mekanism.client.jei.BaseRecipeCategory; import mekanism.client.jei.MekanismJEI; import mekanism.common.recipe.machines.SeparatorRecipe; 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; @@ -26,16 +25,9 @@ import mezz.jei.api.recipe.IRecipeWrapper; public class ElectrolyticSeparatorRecipeCategory extends BaseRecipeCategory { - private final IDrawable background; - public ElectrolyticSeparatorRecipeCategory(IGuiHelper helper) { super(helper, "mekanism:gui/GuiElectrolyticSeparator.png", "electrolytic_separator", - "tile.MachineBlock2.ElectrolyticSeparator.name", ProgressBar.BI); - - xOffset = 4; - yOffset = 9; - - background = guiHelper.createDrawable(guiLocation, xOffset, yOffset, 167, 62); + "tile.MachineBlock2.ElectrolyticSeparator.name", ProgressBar.BI, 4, 9, 167, 62); } @Override @@ -61,11 +53,6 @@ public class ElectrolyticSeparatorRecipeCategory extends BaseRecipeCategory { }, progressBar, this, guiLocation, 78, 29)); } - @Override - public IDrawable getBackground() { - return background; - } - @Override public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { if (recipeWrapper instanceof ElectrolyticSeparatorRecipeWrapper) { diff --git a/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeCategory.java b/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeCategory.java index 51c111483..ffa47fbc6 100644 --- a/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeCategory.java +++ b/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeCategory.java @@ -16,7 +16,6 @@ import mekanism.client.gui.element.GuiSlot.SlotType; import mekanism.client.jei.BaseRecipeCategory; import mekanism.common.recipe.machines.MetallurgicInfuserRecipe; import mezz.jei.api.IGuiHelper; -import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.ingredients.IIngredients; @@ -25,14 +24,9 @@ import net.minecraft.item.ItemStack; public class MetallurgicInfuserRecipeCategory extends BaseRecipeCategory { - private final IDrawable background; - public MetallurgicInfuserRecipeCategory(IGuiHelper helper) { super(helper, "mekanism:gui/GuiMetallurgicInfuser.png", "metallurgic_infuser", - "tile.MachineBlock.MetallurgicInfuser.name", ProgressBar.MEDIUM); - xOffset = 5; - yOffset = 16; - background = guiHelper.createDrawable(guiLocation, xOffset, yOffset, 166, 54); + "tile.MachineBlock.MetallurgicInfuser.name", ProgressBar.MEDIUM, 5, 16, 166, 54); } public static List getInfuseStacks(InfuseType type) { @@ -60,11 +54,6 @@ public class MetallurgicInfuserRecipeCategory extends BaseRecipeCategory { }, ProgressBar.MEDIUM, this, guiLocation, 70, 46)); } - @Override - public IDrawable getBackground() { - return background; - } - @Override public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { if (recipeWrapper instanceof MetallurgicInfuserRecipeWrapper) { diff --git a/src/main/java/mekanism/client/jei/machine/other/PRCRecipeCategory.java b/src/main/java/mekanism/client/jei/machine/other/PRCRecipeCategory.java index 68249cd9c..9a613e03a 100644 --- a/src/main/java/mekanism/client/jei/machine/other/PRCRecipeCategory.java +++ b/src/main/java/mekanism/client/jei/machine/other/PRCRecipeCategory.java @@ -16,7 +16,6 @@ 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; import mezz.jei.api.gui.IGuiFluidStackGroup; import mezz.jei.api.gui.IGuiIngredientGroup; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -26,14 +25,9 @@ import mezz.jei.api.recipe.IRecipeWrapper; public class PRCRecipeCategory extends BaseRecipeCategory { - private final IDrawable background; - public PRCRecipeCategory(IGuiHelper helper) { super(helper, "mekanism:gui/nei/GuiPRC.png", "pressurized_reaction_chamber", - "tile.MachineBlock2.PressurizedReactionChamber.short.name", ProgressBar.MEDIUM); - xOffset = 3; - yOffset = 11; - background = guiHelper.createDrawable(guiLocation, xOffset, yOffset, 170, 68); + "tile.MachineBlock2.PressurizedReactionChamber.short.name", ProgressBar.MEDIUM, 3, 11, 170, 68); } @Override @@ -58,11 +52,6 @@ public class PRCRecipeCategory extends BaseRecipeCategory { }, progressBar, this, guiLocation, 75, 37)); } - @Override - public IDrawable getBackground() { - return background; - } - @Override public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { if (recipeWrapper instanceof PRCRecipeWrapper) { @@ -77,7 +66,8 @@ public class PRCRecipeCategory extends BaseRecipeCategory { fluidStacks.set(0, tempRecipe.recipeInput.getFluid()); IGuiIngredientGroup 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); + initGas(gasStacks, 1, false, 141 - xOffset, 41 - yOffset, 16, 28, tempRecipe.recipeOutput.getGasOutput(), + true); } } } \ No newline at end of file diff --git a/src/main/java/mekanism/client/jei/machine/other/RotaryCondensentratorRecipeCategory.java b/src/main/java/mekanism/client/jei/machine/other/RotaryCondensentratorRecipeCategory.java index 8c12145cb..da0cd1065 100644 --- a/src/main/java/mekanism/client/jei/machine/other/RotaryCondensentratorRecipeCategory.java +++ b/src/main/java/mekanism/client/jei/machine/other/RotaryCondensentratorRecipeCategory.java @@ -4,7 +4,6 @@ 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; @@ -15,33 +14,20 @@ import net.minecraft.client.Minecraft; public class RotaryCondensentratorRecipeCategory extends BaseRecipeCategory { - private final IDrawable background; private final boolean condensentrating; public RotaryCondensentratorRecipeCategory(IGuiHelper helper, boolean condensentrating) { super(helper, "mekanism:gui/nei/GuiRotaryCondensentrator.png", condensentrating ? "rotary_condensentrator_condensentrating" : "rotary_condensentrator_decondensentrating", - condensentrating ? "gui.condensentrating" : "gui.decondensentrating", null); - xOffset = 3; - yOffset = 12; - background = guiHelper.createDrawable(guiLocation, xOffset, yOffset, 170, 71); + condensentrating ? "gui.condensentrating" : "gui.decondensentrating", null, 3, 12, 170, 71); this.condensentrating = condensentrating; } @Override public void drawExtras(Minecraft minecraft) { super.drawExtras(minecraft); - if (condensentrating) { - drawTexturedRect(64 - xOffset, 39 - yOffset, 176, 123, 48, 8); - } else { - drawTexturedRect(64 - xOffset, 39 - yOffset, 176, 115, 48, 8); - } - } - - @Override - public IDrawable getBackground() { - return background; + drawTexturedRect(64 - xOffset, 39 - yOffset, 176, condensentrating ? 123 : 115, 48, 8); } @Override diff --git a/src/main/java/mekanism/client/jei/machine/other/SolarNeutronRecipeCategory.java b/src/main/java/mekanism/client/jei/machine/other/SolarNeutronRecipeCategory.java index a317911c3..cc94e33bf 100644 --- a/src/main/java/mekanism/client/jei/machine/other/SolarNeutronRecipeCategory.java +++ b/src/main/java/mekanism/client/jei/machine/other/SolarNeutronRecipeCategory.java @@ -5,7 +5,6 @@ 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; import mezz.jei.api.gui.IGuiIngredientGroup; import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.ingredients.IIngredients; @@ -14,14 +13,9 @@ import net.minecraft.client.Minecraft; public class SolarNeutronRecipeCategory extends BaseRecipeCategory { - private final IDrawable background; - public SolarNeutronRecipeCategory(IGuiHelper helper) { super(helper, "mekanism:gui/nei/GuiSolarNeutronActivator.png", "solar_neutron_activator", - "tile.MachineBlock3.SolarNeutronActivator.name", null); - xOffset = 3; - yOffset = 12; - background = guiHelper.createDrawable(guiLocation, xOffset, yOffset, 170, 70); + "tile.MachineBlock3.SolarNeutronActivator.name", null, 3, 12, 170, 70); } @Override @@ -30,11 +24,6 @@ public class SolarNeutronRecipeCategory extends BaseRecipeCategory { drawTexturedRect(64 - xOffset, 39 - yOffset, 176, 58, 55, 8); } - @Override - public IDrawable getBackground() { - return background; - } - @Override public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { if (recipeWrapper instanceof SolarNeutronRecipeWrapper) { diff --git a/src/main/java/mekanism/client/jei/machine/other/ThermalEvaporationRecipeCategory.java b/src/main/java/mekanism/client/jei/machine/other/ThermalEvaporationRecipeCategory.java index e09320e65..15019e64f 100644 --- a/src/main/java/mekanism/client/jei/machine/other/ThermalEvaporationRecipeCategory.java +++ b/src/main/java/mekanism/client/jei/machine/other/ThermalEvaporationRecipeCategory.java @@ -3,7 +3,6 @@ package mekanism.client.jei.machine.other; import mekanism.client.jei.BaseRecipeCategory; import mekanism.common.recipe.machines.ThermalEvaporationRecipe; import mezz.jei.api.IGuiHelper; -import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiFluidStackGroup; import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.ingredients.IIngredients; @@ -12,14 +11,9 @@ import net.minecraft.client.Minecraft; public class ThermalEvaporationRecipeCategory extends BaseRecipeCategory { - private final IDrawable background; - public ThermalEvaporationRecipeCategory(IGuiHelper helper) { super(helper, "mekanism:gui/nei/GuiThermalEvaporationController.png", "thermal_evaporation_plant", - "gui.thermalEvaporationController.short", null); - xOffset = 3; - yOffset = 12; - background = guiHelper.createDrawable(guiLocation, xOffset, yOffset, 170, 62); + "gui.thermalEvaporationController.short", null, 3, 12, 170, 62); } @Override @@ -28,11 +22,6 @@ public class ThermalEvaporationRecipeCategory extends BaseRecipeCategory { drawTexturedRect(49 - xOffset, 64 - yOffset, 176, 59, 78, 8); } - @Override - public IDrawable getBackground() { - return background; - } - @Override public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { if (recipeWrapper instanceof ThermalEvaporationRecipeWrapper) {