diff options
author | Martin Robertz <dream-master@gmx.net> | 2021-01-07 17:01:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 17:01:01 +0100 |
commit | 67074a4aaf64a6d43f893c2860113dbc336d3e45 (patch) | |
tree | 536815ece1c0007fe1a1f315866d90eb11c4a8eb /src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java | |
parent | 326ed7e748c228fa330f5806504eba4914e6bb24 (diff) | |
parent | 083d45487ef5419483eb2d654e3ce17d240af835 (diff) | |
download | GT5-Unofficial-67074a4aaf64a6d43f893c2860113dbc336d3e45.tar.gz GT5-Unofficial-67074a4aaf64a6d43f893c2860113dbc336d3e45.tar.bz2 GT5-Unofficial-67074a4aaf64a6d43f893c2860113dbc336d3e45.zip |
Merge pull request #393 from GTNewHorizons/cleanup_and_speedup
Cleanup and speedup
Diffstat (limited to 'src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java')
-rw-r--r-- | src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java | 64 |
1 files changed, 37 insertions, 27 deletions
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java index ac38b2843b..5033164732 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java @@ -14,33 +14,43 @@ public class ProcessingCrop implements gregtech.api.interfaces.IOreRecipeRegistr } public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, net.minecraft.item.ItemStack aStack) { - GT_ModHandler.addCompressionRecipe(gregtech.api.util.GT_Utility.copyAmount(8L, new Object[]{aStack}), ItemList.IC2_PlantballCompressed.get(1L, new Object[0])); - if (aOreDictName.equals("cropTea")) { - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.tea"), false); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.tea"), false); - } else if (aOreDictName.equals("cropGrape")) { - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.grapejuice"), false); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.grapejuice"), false); - } else if (aOreDictName.equals("cropChilipepper")) { - GT_ModHandler.addPulverisationRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L)); - } else if (aOreDictName.equals("cropCoffee")) { - GT_ModHandler.addPulverisationRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L)); - } else if (aOreDictName.equals("cropPotato")) { - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Raw_PotatoChips.get(1L, new Object[0]), 64, 4); - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Stripes.get(0L, new Object[0]), ItemList.Food_Raw_Fries.get(1L, new Object[0]), 64, 4); - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.potatojuice"), true); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.potatojuice"), true); - } else if (aOreDictName.equals("cropLemon")) { - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Lemon.get(4L, new Object[0]), 64, 4); - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.lemonjuice"), false); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.lemonjuice"), false); - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.getFluid("potion.vodka"), FluidRegistry.getFluid("potion.leninade"), true); - } else if (aOreDictName.equals("cropTomato")) { - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Tomato.get(4L, new Object[0]), 64, 4); - } else if (aOreDictName.equals("cropCucumber")) { - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Cucumber.get(4L, new Object[0]), 64, 4); - } else if (aOreDictName.equals("cropOnion")) { - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Onion.get(4L, new Object[0]), 64, 4); + GT_ModHandler.addCompressionRecipe(gregtech.api.util.GT_Utility.copyAmount(8L, aStack), ItemList.IC2_PlantballCompressed.get(1L)); + switch (aOreDictName) { + case "cropTea": + GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.tea"), false); + GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.tea"), false); + break; + case "cropGrape": + GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.grapejuice"), false); + GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.grapejuice"), false); + break; + case "cropChilipepper": + GT_ModHandler.addPulverisationRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L)); + break; + case "cropCoffee": + GT_ModHandler.addPulverisationRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L)); + break; + case "cropPotato": + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Raw_PotatoChips.get(1L), 64, 4); + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Stripes.get(0L), ItemList.Food_Raw_Fries.get(1L), 64, 4); + GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.potatojuice"), true); + GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.potatojuice"), true); + break; + case "cropLemon": + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Lemon.get(4L), 64, 4); + GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.lemonjuice"), false); + GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.lemonjuice"), false); + GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.getFluid("potion.vodka"), FluidRegistry.getFluid("potion.leninade"), true); + break; + case "cropTomato": + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Tomato.get(4L), 64, 4); + break; + case "cropCucumber": + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Cucumber.get(4L), 64, 4); + break; + case "cropOnion": + GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Onion.get(4L), 64, 4); + break; } } } |