Fix using wrong recipe category string in places, and broken IMC

This commit is contained in:
pupnewfster authored and Dave Smith committed 2019-03-21 14:23:22 -06:00
1 parent e34e92a344
commit 610254c5d1
12 files changed
+62 -40

No files matched your search

@@ -3,6 +3,7 @@ package mekanism.client.jei.machine.chemical;
import mekanism.api.gas.GasStack;
import mekanism.client.jei.BaseRecipeCategory;
import mekanism.client.jei.MekanismJEI;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.CrystallizerRecipe;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IGuiIngredientGroup;
@@ -15,7 +16,7 @@ import net.minecraft.client.Minecraft;
public class ChemicalCrystallizerRecipeCategory extends BaseRecipeCategory {
public ChemicalCrystallizerRecipeCategory(IGuiHelper helper) {
super(helper, "mekanism:gui/nei/GuiChemicalCrystallizer.png", "chemical_crystallizer",
super(helper, "mekanism:gui/nei/GuiChemicalCrystallizer.png", Recipe.CHEMICAL_CRYSTALLIZER.getJEICategory(),
"tile.MachineBlock2.ChemicalCrystallizer.name", null, 5, 3, 147, 79);
}
@@ -4,6 +4,7 @@ import mekanism.api.gas.GasStack;
import mekanism.client.jei.BaseRecipeCategory;
import mekanism.client.jei.MekanismJEI;
import mekanism.common.MekanismFluids;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.DissolutionRecipe;
import mekanism.common.tile.TileEntityChemicalDissolutionChamber;
import mezz.jei.api.IGuiHelper;
@@ -17,8 +18,9 @@ import net.minecraft.client.Minecraft;
public class ChemicalDissolutionChamberRecipeCategory extends BaseRecipeCategory {
public ChemicalDissolutionChamberRecipeCategory(IGuiHelper helper) {
super(helper, "mekanism:gui/nei/GuiChemicalDissolutionChamber.png", "chemical_dissolution_chamber",
"gui.chemicalDissolutionChamber.short", null, 3, 3, 170, 79);
super(helper, "mekanism:gui/nei/GuiChemicalDissolutionChamber.png",
Recipe.CHEMICAL_DISSOLUTION_CHAMBER.getJEICategory(), "gui.chemicalDissolutionChamber.short", null, 3, 3,
170, 79);
}
@Override
@@ -3,6 +3,7 @@ package mekanism.client.jei.machine.chemical;
import mekanism.api.gas.GasStack;
import mekanism.client.jei.BaseRecipeCategory;
import mekanism.client.jei.MekanismJEI;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.ChemicalInfuserRecipe;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IGuiIngredientGroup;
@@ -14,7 +15,7 @@ import net.minecraft.client.Minecraft;
public class ChemicalInfuserRecipeCategory extends BaseRecipeCategory {
public ChemicalInfuserRecipeCategory(IGuiHelper helper) {
super(helper, "mekanism:gui/nei/GuiChemicalInfuser.png", "chemical_infuser",
super(helper, "mekanism:gui/nei/GuiChemicalInfuser.png", Recipe.CHEMICAL_INFUSER.getJEICategory(),
"tile.MachineBlock2.ChemicalInfuser.name", null, 3, 3, 170, 80);
}
@@ -10,6 +10,7 @@ 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.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.OxidationRecipe;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IGuiIngredientGroup;
@@ -21,7 +22,7 @@ import mezz.jei.api.recipe.IRecipeWrapper;
public class ChemicalOxidizerRecipeCategory extends BaseRecipeCategory {
public ChemicalOxidizerRecipeCategory(IGuiHelper helper) {
super(helper, "mekanism:gui/GuiChemicalOxidizer.png", "chemical_oxidizer",
super(helper, "mekanism:gui/GuiChemicalOxidizer.png", Recipe.CHEMICAL_OXIDIZER.getJEICategory(),
"tile.MachineBlock2.ChemicalOxidizer.name", ProgressBar.LARGE_RIGHT, 20, 12, 132, 62);
}
@@ -3,6 +3,7 @@ package mekanism.client.jei.machine.chemical;
import mekanism.api.gas.GasStack;
import mekanism.client.jei.BaseRecipeCategory;
import mekanism.client.jei.MekanismJEI;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.WasherRecipe;
import mekanism.common.tile.TileEntityChemicalWasher;
import mezz.jei.api.IGuiHelper;
@@ -17,7 +18,7 @@ import net.minecraft.client.Minecraft;
public class ChemicalWasherRecipeCategory extends BaseRecipeCategory {
public ChemicalWasherRecipeCategory(IGuiHelper helper) {
super(helper, "mekanism:gui/nei/GuiChemicalWasher.png", "chemical_washer",
super(helper, "mekanism:gui/nei/GuiChemicalWasher.png", Recipe.CHEMICAL_WASHER.getJEICategory(),
"tile.MachineBlock2.ChemicalWasher.name", null, 3, 3, 170, 70);
}
@@ -14,6 +14,7 @@ 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.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.SeparatorRecipe;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IGuiFluidStackGroup;
@@ -26,7 +27,7 @@ import mezz.jei.api.recipe.IRecipeWrapper;
public class ElectrolyticSeparatorRecipeCategory extends BaseRecipeCategory {
public ElectrolyticSeparatorRecipeCategory(IGuiHelper helper) {
super(helper, "mekanism:gui/GuiElectrolyticSeparator.png", "electrolytic_separator",
super(helper, "mekanism:gui/GuiElectrolyticSeparator.png", Recipe.ELECTROLYTIC_SEPARATOR.getJEICategory(),
"tile.MachineBlock2.ElectrolyticSeparator.name", ProgressBar.BI, 4, 9, 167, 62);
}
@@ -14,6 +14,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.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.MetallurgicInfuserRecipe;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IGuiItemStackGroup;
@@ -25,7 +26,7 @@ import net.minecraft.item.ItemStack;
public class MetallurgicInfuserRecipeCategory extends BaseRecipeCategory {
public MetallurgicInfuserRecipeCategory(IGuiHelper helper) {
super(helper, "mekanism:gui/GuiMetallurgicInfuser.png", "metallurgic_infuser",
super(helper, "mekanism:gui/GuiMetallurgicInfuser.png", Recipe.METALLURGIC_INFUSER.getJEICategory(),
"tile.MachineBlock.MetallurgicInfuser.name", ProgressBar.MEDIUM, 5, 16, 166, 54);
}
@@ -14,6 +14,7 @@ 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.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.PressurizedRecipe;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IGuiFluidStackGroup;
@@ -26,7 +27,7 @@ import mezz.jei.api.recipe.IRecipeWrapper;
public class PRCRecipeCategory extends BaseRecipeCategory {
public PRCRecipeCategory(IGuiHelper helper) {
super(helper, "mekanism:gui/nei/GuiPRC.png", "pressurized_reaction_chamber",
super(helper, "mekanism:gui/nei/GuiPRC.png", Recipe.PRESSURIZED_REACTION_CHAMBER.getJEICategory(),
"tile.MachineBlock2.PressurizedReactionChamber.short.name", ProgressBar.MEDIUM, 3, 11, 170, 68);
}
@@ -3,6 +3,7 @@ package mekanism.client.jei.machine.other;
import mekanism.api.gas.GasStack;
import mekanism.client.jei.BaseRecipeCategory;
import mekanism.client.jei.MekanismJEI;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.SolarNeutronRecipe;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IGuiIngredientGroup;
@@ -14,7 +15,7 @@ import net.minecraft.client.Minecraft;
public class SolarNeutronRecipeCategory extends BaseRecipeCategory {
public SolarNeutronRecipeCategory(IGuiHelper helper) {
super(helper, "mekanism:gui/nei/GuiSolarNeutronActivator.png", "solar_neutron_activator",
super(helper, "mekanism:gui/nei/GuiSolarNeutronActivator.png", Recipe.SOLAR_NEUTRON_ACTIVATOR.getJEICategory(),
"tile.MachineBlock3.SolarNeutronActivator.name", null, 3, 12, 170, 70);
}
@@ -1,6 +1,7 @@
package mekanism.client.jei.machine.other;
import mekanism.client.jei.BaseRecipeCategory;
import mekanism.common.recipe.RecipeHandler.Recipe;
import mekanism.common.recipe.machines.ThermalEvaporationRecipe;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IGuiFluidStackGroup;
@@ -12,8 +13,9 @@ import net.minecraft.client.Minecraft;
public class ThermalEvaporationRecipeCategory extends BaseRecipeCategory {
public ThermalEvaporationRecipeCategory(IGuiHelper helper) {
super(helper, "mekanism:gui/nei/GuiThermalEvaporationController.png", "thermal_evaporation_plant",
"gui.thermalEvaporationController.short", null, 3, 12, 170, 62);
super(helper, "mekanism:gui/nei/GuiThermalEvaporationController.png",
Recipe.THERMAL_EVAPORATION_PLANT.getJEICategory(), "gui.thermalEvaporationController.short", null, 3, 12,
170, 62);
}
@Override
@@ -33,7 +33,8 @@ public class IMCHandler {
}
for (Recipe type : Recipe.values()) {
if (message.equalsIgnoreCase(type.getRecipeName() + "Recipe")) {
if (message.equalsIgnoreCase(type.getRecipeName() + "Recipe") ||
message.equalsIgnoreCase(type.getOldRecipeName() + "Recipe")) {
MachineInput input = type.createInput(msg.getNBTValue());
if (input != null && input.isValid()) {
@@ -593,76 +593,79 @@ public final class RecipeHandler {
private static final List<Recipe> values = new ArrayList<>();
public static final Recipe<ItemStackInput, ItemStackOutput, SmeltingRecipe> ENERGIZED_SMELTER = new Recipe<>(
MachineType.ENERGIZED_SMELTER.blockName, ItemStackInput.class, ItemStackOutput.class,
MachineType.ENERGIZED_SMELTER.blockName, "ENERGIZED_SMELTER", ItemStackInput.class, ItemStackOutput.class,
SmeltingRecipe.class);
public static final Recipe<ItemStackInput, ItemStackOutput, EnrichmentRecipe> ENRICHMENT_CHAMBER = new Recipe<>(
MachineType.ENRICHMENT_CHAMBER.blockName, ItemStackInput.class, ItemStackOutput.class,
EnrichmentRecipe.class);
MachineType.ENRICHMENT_CHAMBER.blockName, "ENRICHMENT_CHAMBER", ItemStackInput.class,
ItemStackOutput.class, EnrichmentRecipe.class);
public static final Recipe<AdvancedMachineInput, ItemStackOutput, OsmiumCompressorRecipe> OSMIUM_COMPRESSOR = new Recipe<>(
MachineType.OSMIUM_COMPRESSOR.blockName, AdvancedMachineInput.class, ItemStackOutput.class,
OsmiumCompressorRecipe.class);
MachineType.OSMIUM_COMPRESSOR.blockName, "OSMIUM_COMPRESSOR", AdvancedMachineInput.class,
ItemStackOutput.class, OsmiumCompressorRecipe.class);
public static final Recipe<DoubleMachineInput, ItemStackOutput, CombinerRecipe> COMBINER = new Recipe<>(
MachineType.COMBINER.blockName, DoubleMachineInput.class, ItemStackOutput.class, CombinerRecipe.class);
MachineType.COMBINER.blockName, "COMBINER", DoubleMachineInput.class, ItemStackOutput.class,
CombinerRecipe.class);
public static final Recipe<ItemStackInput, ItemStackOutput, CrusherRecipe> CRUSHER = new Recipe<>(
MachineType.CRUSHER.blockName, ItemStackInput.class, ItemStackOutput.class, CrusherRecipe.class);
MachineType.CRUSHER.blockName, "CRUSHER", ItemStackInput.class, ItemStackOutput.class,
CrusherRecipe.class);
public static final Recipe<AdvancedMachineInput, ItemStackOutput, PurificationRecipe> PURIFICATION_CHAMBER = new Recipe<>(
MachineType.PURIFICATION_CHAMBER.blockName, AdvancedMachineInput.class,
MachineType.PURIFICATION_CHAMBER.blockName, "PURIFICATION_CHAMBER", AdvancedMachineInput.class,
ItemStackOutput.class, PurificationRecipe.class);
public static final Recipe<InfusionInput, ItemStackOutput, MetallurgicInfuserRecipe> METALLURGIC_INFUSER = new Recipe<>(
MachineType.METALLURGIC_INFUSER.blockName, InfusionInput.class, ItemStackOutput.class,
MetallurgicInfuserRecipe.class);
MachineType.METALLURGIC_INFUSER.blockName, "METALLURGIC_INFUSER", InfusionInput.class,
ItemStackOutput.class, MetallurgicInfuserRecipe.class);
public static final Recipe<ChemicalPairInput, GasOutput, ChemicalInfuserRecipe> CHEMICAL_INFUSER = new Recipe<>(
MachineType.CHEMICAL_INFUSER.blockName, ChemicalPairInput.class, GasOutput.class,
MachineType.CHEMICAL_INFUSER.blockName, "CHEMICAL_INFUSER", ChemicalPairInput.class, GasOutput.class,
ChemicalInfuserRecipe.class);
public static final Recipe<ItemStackInput, GasOutput, OxidationRecipe> CHEMICAL_OXIDIZER = new Recipe<>(
MachineType.CHEMICAL_OXIDIZER.blockName, ItemStackInput.class, GasOutput.class,
MachineType.CHEMICAL_OXIDIZER.blockName, "CHEMICAL_OXIDIZER", ItemStackInput.class, GasOutput.class,
OxidationRecipe.class);
public static final Recipe<AdvancedMachineInput, ItemStackOutput, InjectionRecipe> CHEMICAL_INJECTION_CHAMBER = new Recipe<>(
MachineType.CHEMICAL_INJECTION_CHAMBER.blockName, AdvancedMachineInput.class,
ItemStackOutput.class, InjectionRecipe.class);
MachineType.CHEMICAL_INJECTION_CHAMBER.blockName, "CHEMICAL_INJECTION_CHAMBER",
AdvancedMachineInput.class, ItemStackOutput.class, InjectionRecipe.class);
public static final Recipe<FluidInput, ChemicalPairOutput, SeparatorRecipe> ELECTROLYTIC_SEPARATOR = new Recipe<>(
MachineType.ELECTROLYTIC_SEPARATOR.blockName, FluidInput.class, ChemicalPairOutput.class,
SeparatorRecipe.class);
MachineType.ELECTROLYTIC_SEPARATOR.blockName, "ELECTROLYTIC_SEPARATOR", FluidInput.class,
ChemicalPairOutput.class, SeparatorRecipe.class);
public static final Recipe<ItemStackInput, ChanceOutput, SawmillRecipe> PRECISION_SAWMILL = new Recipe<>(
MachineType.PRECISION_SAWMILL.blockName, ItemStackInput.class, ChanceOutput.class,
MachineType.PRECISION_SAWMILL.blockName, "PRECISION_SAWMILL", ItemStackInput.class, ChanceOutput.class,
SawmillRecipe.class);
public static final Recipe<ItemStackInput, GasOutput, DissolutionRecipe> CHEMICAL_DISSOLUTION_CHAMBER = new Recipe<>(
MachineType.CHEMICAL_DISSOLUTION_CHAMBER.blockName, ItemStackInput.class,
MachineType.CHEMICAL_DISSOLUTION_CHAMBER.blockName, "CHEMICAL_DISSOLUTION_CHAMBER", ItemStackInput.class,
GasOutput.class, DissolutionRecipe.class);
public static final Recipe<GasInput, GasOutput, WasherRecipe> CHEMICAL_WASHER = new Recipe<>(
MachineType.CHEMICAL_WASHER.blockName, GasInput.class, GasOutput.class, WasherRecipe.class);
MachineType.CHEMICAL_WASHER.blockName, "CHEMICAL_WASHER", GasInput.class, GasOutput.class,
WasherRecipe.class);
public static final Recipe<GasInput, ItemStackOutput, CrystallizerRecipe> CHEMICAL_CRYSTALLIZER = new Recipe<>(
MachineType.CHEMICAL_CRYSTALLIZER.blockName, GasInput.class, ItemStackOutput.class,
CrystallizerRecipe.class);
MachineType.CHEMICAL_CRYSTALLIZER.blockName, "CHEMICAL_CRYSTALLIZER", GasInput.class,
ItemStackOutput.class, CrystallizerRecipe.class);
public static final Recipe<PressurizedInput, PressurizedOutput, PressurizedRecipe> PRESSURIZED_REACTION_CHAMBER = new Recipe<>(
MachineType.PRESSURIZED_REACTION_CHAMBER.blockName, PressurizedInput.class,
PressurizedOutput.class, PressurizedRecipe.class);
MachineType.PRESSURIZED_REACTION_CHAMBER.blockName, "PRESSURIZED_REACTION_CHAMBER",
PressurizedInput.class, PressurizedOutput.class, PressurizedRecipe.class);
public static final Recipe<IntegerInput, GasOutput, AmbientGasRecipe> AMBIENT_ACCUMULATOR = new Recipe<>(
MachineType.AMBIENT_ACCUMULATOR.blockName, IntegerInput.class, GasOutput.class,
MachineType.AMBIENT_ACCUMULATOR.blockName, "AMBIENT_ACCUMULATOR", IntegerInput.class, GasOutput.class,
AmbientGasRecipe.class);
public static final Recipe<FluidInput, FluidOutput, ThermalEvaporationRecipe> THERMAL_EVAPORATION_PLANT = new Recipe<>(
"ThermalEvaporationPlant", FluidInput.class, FluidOutput.class,
"ThermalEvaporationPlant", "THERMAL_EVAPORATION_PLANT", FluidInput.class, FluidOutput.class,
ThermalEvaporationRecipe.class);
public static final Recipe<GasInput, GasOutput, SolarNeutronRecipe> SOLAR_NEUTRON_ACTIVATOR = new Recipe<>(
MachineType.SOLAR_NEUTRON_ACTIVATOR.blockName, GasInput.class, GasOutput.class,
MachineType.SOLAR_NEUTRON_ACTIVATOR.blockName, "SOLAR_NEUTRON_ACTIVATOR", GasInput.class, GasOutput.class,
SolarNeutronRecipe.class);
//TODO: Replace this with Recipe being Iterable
@@ -672,6 +675,7 @@ public final class RecipeHandler {
private final Map<INPUT, RECIPE> recipes = new HashMap<>();
private final String recipeName;
private final String oldRecipeName;
private final String jeiCategory;
private Class<? extends MachineInput> inputClass;
@@ -679,8 +683,9 @@ public final class RecipeHandler {
private Class<? extends MachineRecipe> recipeClass;
private Recipe(String name, Class<INPUT> input, Class<OUTPUT> output, Class<RECIPE> recipe) {
private Recipe(String name, String oldName, Class<INPUT> input, Class<OUTPUT> output, Class<RECIPE> recipe) {
recipeName = name;
oldRecipeName = oldName;
jeiCategory = "mekanism." + recipeName.toLowerCase(Locale.ROOT);
inputClass = input;
@@ -702,6 +707,10 @@ public final class RecipeHandler {
return recipeName;
}
public String getOldRecipeName() {
return oldRecipeName;
}
public String getJEICategory() {
return jeiCategory;
}