This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
forge/src/main/java/muramasa/gregtech/integration/forge/tfc/MachineRecipes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package muramasa.gregtech.integration.forge.tfc; | ||
|
||
import muramasa.antimatter.data.AntimatterMaterialTypes; | ||
import muramasa.antimatter.data.AntimatterMaterials; | ||
import muramasa.antimatter.material.Material; | ||
import muramasa.antimatter.util.Utils; | ||
import muramasa.gregtech.data.Materials; | ||
import muramasa.gregtech.data.RecipeMaps; | ||
import net.dries007.tfc.common.blocks.TFCMaterials; | ||
import net.dries007.tfc.common.blocks.rock.Ore; | ||
import net.dries007.tfc.common.items.TFCItems; | ||
import net.dries007.tfc.util.Metal; | ||
import net.minecraft.world.item.ItemStack; | ||
|
||
import static muramasa.antimatter.data.AntimatterMaterialTypes.DUST; | ||
import static muramasa.antimatter.data.AntimatterMaterials.*; | ||
import static muramasa.antimatter.material.MaterialTags.MACERATE_INTO; | ||
import static muramasa.antimatter.material.MaterialTags.ORE_MULTI; | ||
import static muramasa.gregtech.data.Materials.*; | ||
import static net.dries007.tfc.common.blocks.rock.Ore.*; | ||
|
||
public class MachineRecipes { | ||
public static void init(){ | ||
initMaceratorRecipes(); | ||
} | ||
|
||
public static void initMaceratorRecipes(){ | ||
addMaceratorRecipe(NATIVE_COPPER, Copper); | ||
addMaceratorRecipe(NATIVE_GOLD, Gold); | ||
addMaceratorRecipe(NATIVE_SILVER, Silver); | ||
addMaceratorRecipe(HEMATITE, Iron); | ||
addMaceratorRecipe(CASSITERITE, Cassiterite); | ||
addMaceratorRecipe(BISMUTHINITE, Bismuth); | ||
addMaceratorRecipe(GARNIERITE, Garnierite); | ||
addMaceratorRecipe(MALACHITE, Malachite); | ||
addMaceratorRecipe(MAGNETITE, Magnetite); | ||
addMaceratorRecipe(LIMONITE, YellowLimonite); | ||
addMaceratorRecipe(SPHALERITE, Sphalerite); | ||
addMaceratorRecipe(TETRAHEDRITE, Tetrahedrite); | ||
addMaceratorRecipe(BITUMINOUS_COAL, Coal); | ||
addMaceratorRecipe(LIGNITE, Lignite); | ||
//addMaceratorRecipe(KAOLINITE); | ||
//addMaceratorRecipe(GYPSUM,); | ||
addMaceratorRecipe(GRAPHITE, Graphite); | ||
addMaceratorRecipe(SULFUR, Sulfur); | ||
addMaceratorRecipe(CINNABAR, Cinnabar); | ||
addMaceratorRecipe(CRYOLITE, Redstone); | ||
addMaceratorRecipe(SALTPETER, Saltpeter); | ||
addMaceratorRecipe(HALITE, Salt); | ||
addMaceratorRecipe(LAPIS_LAZULI, Lapis); | ||
addMaceratorRecipe(EMERALD, Emerald); | ||
addMaceratorRecipe(DIAMOND, Diamond); | ||
addMaceratorRecipe(PYRITE, Pyrite); | ||
addMaceratorRecipe(RUBY, Ruby); | ||
addMaceratorRecipe(SAPPHIRE, Sapphire); | ||
addMaceratorRecipe(TOPAZ, Topaz); | ||
addMaceratorRecipe(OPAL, Opal); | ||
addMaceratorRecipe(AMETHYST, Amethyst); | ||
} | ||
|
||
private static void addMaceratorRecipe(Ore input, Material material){ | ||
int multiplier = ORE_MULTI.getInt(material); | ||
ItemStack crushedStack = AntimatterMaterialTypes.CRUSHED.get(MACERATE_INTO.getMapping(material), multiplier); | ||
Material oreByProduct1 = !material.getByProducts().isEmpty() ? material.getByProducts().get(0) : MACERATE_INTO.getMapping(material); | ||
if (input.isGraded()){ | ||
RecipeMaps.MACERATING.RB().ii(TFCItems.GRADED_ORES.get(input).get(Ore.Grade.POOR).get()).io(crushedStack, DUST.get(oreByProduct1, 1)).chances(1.0, 0.05 * multiplier).add("poor_" + material.getId() + "_tfc", 400, 2); | ||
RecipeMaps.MACERATING.RB().ii(TFCItems.GRADED_ORES.get(input).get(Ore.Grade.NORMAL).get()).io(Utils.ca(multiplier * 2, crushedStack), DUST.get(oreByProduct1, 1)).chances(1.0, 0.1 * multiplier).add("normal_" + material.getId() + "_tfc", 400, 2); | ||
RecipeMaps.MACERATING.RB().ii(TFCItems.GRADED_ORES.get(input).get(Ore.Grade.RICH).get()).io(Utils.ca(multiplier * 3, crushedStack), DUST.get(oreByProduct1, 1)).chances(1.0, 0.15 * multiplier).add("rich_" + material.getId() + "_tfc", 400, 2); | ||
} else { | ||
RecipeMaps.MACERATING.RB().ii(TFCItems.ORES.get(input).get()).io(Utils.ca(multiplier * 2, crushedStack), DUST.get(oreByProduct1, 1)).chances(1.0, 0.1 * multiplier).add("normal_" + material.getId() + "_tfc", 400, 2); | ||
} | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters