Skip to content

Commit

Permalink
use addItemData for recycling recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ableytner committed Nov 28, 2024
1 parent 39a0801 commit a0cbdcd
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.dreammaster.gthandler.recipes;

import static com.dreammaster.scripts.IScriptLoader.missing;
import static com.dreammaster.scripts.IScriptLoader.wildcard;
import static gregtech.api.enums.Mods.AdvancedSolarPanel;
import static gregtech.api.enums.Mods.Avaritia;
Expand All @@ -20,7 +19,6 @@
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;

import com.dreammaster.block.BlockList;
import com.dreammaster.gthandler.CustomItemList;

import gregtech.api.enums.GTValues;
Expand Down Expand Up @@ -94,60 +92,6 @@ public void run() {
GTOreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 1L))
.outputChances(10000, 2500, 2000, 1500).duration(10 * SECONDS).eut(8).addTo(maceratorRecipes);

GTValues.RA.stdBuilder().itemInputs(GTModHandler.getModItem(IndustrialCraft2.ID, "blockAlloy", 1, 0, missing))
.itemOutputs(
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Concrete, 1L))
.outputChances(10000, 10000).duration(10 * SECONDS).eut(4).addTo(maceratorRecipes);

GTValues.RA.stdBuilder().itemInputs(BlockList.BronzePlatedReinforcedStone.getIS())
.itemOutputs(
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 6L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 3L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Concrete, 1L))
.outputChances(10000, 10000, 10000).duration(10 * SECONDS).eut(4).addTo(maceratorRecipes);

GTValues.RA.stdBuilder().itemInputs(BlockList.SteelPlatedReinforcedStone.getIS())
.itemOutputs(
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 8L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Concrete, 1L))
.outputChances(10000, 10000, 10000).duration(12 * SECONDS + 10 * TICKS).eut(16).addTo(maceratorRecipes);

GTValues.RA.stdBuilder().itemInputs(BlockList.TitaniumPlatedReinforcedStone.getIS())
.itemOutputs(
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 6L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 1L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Concrete, 1L))
.outputChances(10000, 10000, 10000, 10000).duration(15 * SECONDS).eut(30).addTo(maceratorRecipes);

GTValues.RA.stdBuilder().itemInputs(BlockList.TungstensteelPlatedReinforcedStone.getIS())
.itemOutputs(
GTOreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 6L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 1L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Concrete, 1L))
.outputChances(10000, 10000, 10000, 10000).duration(17 * SECONDS + 10 * TICKS).eut(64)
.addTo(maceratorRecipes);

GTValues.RA.stdBuilder().itemInputs(BlockList.NaquadahPlatedReinforcedStone.getIS())
.itemOutputs(
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 6L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 1L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Concrete, 1L))
.outputChances(10000, 10000, 10000, 10000).duration(22 * SECONDS + 10 * TICKS).eut(256)
.addTo(maceratorRecipes);

GTValues.RA.stdBuilder().itemInputs(BlockList.NeutroniumPlatedReinforcedStone.getIS())
.itemOutputs(
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Neutronium, 6L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 1L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Concrete, 1L))
.outputChances(10000, 10000, 10000, 10000).duration(25 * SECONDS).eut(480).addTo(maceratorRecipes);

if (OpenPrinters.isModLoaded()) {

// Open Printers
Expand Down
43 changes: 43 additions & 0 deletions src/main/java/com/dreammaster/scripts/ScriptCoreMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TierEU;
import gregtech.api.objects.ItemData;
import gregtech.api.util.GTModHandler;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTUtility;
Expand Down Expand Up @@ -1061,6 +1062,7 @@ public void loadRecipes() {
GTOreDictUnificator.get(OrePrefixes.plate, Materials.Bedrockium, 18))
.itemOutputs(com.dreammaster.item.ItemList.EnrichedXSunnariumAlloy.getIS(1))
.duration(2 * MINUTES + 20 * SECONDS).eut(TierEU.RECIPE_UEV).addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
getModItem(IndustrialCraft2.ID, "blockAlloy", 1, 0, missing),
Expand Down Expand Up @@ -1103,6 +1105,47 @@ public void loadRecipes() {
.itemOutputs(BlockList.NeutroniumPlatedReinforcedStone.getIS())
.fluidInputs(FluidRegistry.getFluidStack("molten.naquadria", 144)).duration(25 * SECONDS).eut(480)
.addTo(assemblerRecipes);
GTOreDictUnificator.addItemData(
BlockList.BronzePlatedReinforcedStone.getIS(),
new ItemData(
new ItemData(Materials.Bronze, 6 * GTValues.M),
new ItemData(Materials.Steel, 3 * GTValues.M),
new ItemData(Materials.Concrete, 1 * GTValues.M)));
GTOreDictUnificator.addItemData(
BlockList.SteelPlatedReinforcedStone.getIS(),
new ItemData(
new ItemData(Materials.Steel, 8 * GTValues.M),
new ItemData(Materials.Aluminium, 1 * GTValues.M),
new ItemData(Materials.Concrete, 1 * GTValues.M)));
GTOreDictUnificator.addItemData(
BlockList.TitaniumPlatedReinforcedStone.getIS(),
new ItemData(
new ItemData(Materials.Titanium, 6 * GTValues.M),
new ItemData(Materials.Platinum, 1 * GTValues.M),
new ItemData(Materials.Steel, 2 * GTValues.M),
new ItemData(Materials.Concrete, 1 * GTValues.M)));
GTOreDictUnificator.addItemData(
BlockList.TungstensteelPlatedReinforcedStone.getIS(),
new ItemData(
new ItemData(Materials.TungstenSteel, 6 * GTValues.M),
new ItemData(Materials.Iridium, 1 * GTValues.M),
new ItemData(Materials.Steel, 2 * GTValues.M),
new ItemData(Materials.Concrete, 1 * GTValues.M)));
GTOreDictUnificator.addItemData(
BlockList.NaquadahPlatedReinforcedStone.getIS(),
new ItemData(
new ItemData(Materials.Naquadah, 6 * GTValues.M),
new ItemData(Materials.Osmium, 1 * GTValues.M),
new ItemData(Materials.Steel, 2 * GTValues.M),
new ItemData(Materials.Concrete, 1 * GTValues.M)));
GTOreDictUnificator.addItemData(
BlockList.NeutroniumPlatedReinforcedStone.getIS(),
new ItemData(
new ItemData(Materials.Neutronium, 6 * GTValues.M),
new ItemData(Materials.Naquadria, 1 * GTValues.M),
new ItemData(Materials.Steel, 2 * GTValues.M),
new ItemData(Materials.Concrete, 1 * GTValues.M)));

GTValues.RA.stdBuilder()
.itemInputs(
getModItem(GalacticraftMars.ID, "item.itemBasicAsteroids", 2, 6, missing),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.objects.ItemData;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTUtility;
import gtPlusPlus.xmod.ic2.item.IC2Items;
Expand Down Expand Up @@ -1620,6 +1621,11 @@ public void loadRecipes() {
GTOreDictUnificator.get(OrePrefixes.plate, Materials.Lead, 2L))
.itemOutputs(getModItem(IndustrialCraft2.ID, "blockreactorvessel", 1, 0, missing))
.duration(10 * SECONDS).eut(120).addTo(assemblerRecipes);
GTOreDictUnificator.addItemData(
getModItem(IndustrialCraft2.ID, "blockAlloy", 1, 0, missing),
new ItemData(
new ItemData(Materials.Steel, 2 * GTValues.M),
new ItemData(Materials.Concrete, 1 * GTValues.M)));
GTValues.RA.stdBuilder()
.itemInputs(
getModItem(IndustrialCraft2.ID, "blockreactorvessel", 1, 0, missing),
Expand Down

0 comments on commit a0cbdcd

Please sign in to comment.