Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assembling Machine recipes for Lootbag upgrading and downgrading #654

Merged
merged 5 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions src/main/java/com/dreammaster/gthandler/recipes/AssemblerRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static com.dreammaster.gthandler.GT_CoreModSupport.Xenoxene;
import static gregtech.api.enums.GT_Values.W;
import static gregtech.api.enums.Mods.*;
import static gregtech.api.util.GT_ModHandler.getModItem;
import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sAssemblerRecipes;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;

Expand Down Expand Up @@ -34,10 +35,15 @@ public class AssemblerRecipes implements Runnable {
// put the soldering Materials in this array
final Materials[] solderingMaterials = new Materials[] { Materials.Lead, Materials.SolderingAlloy, Materials.Tin };

ItemStack missing = new ItemStack(Blocks.fire);

@Override
public void run() {
makeCoilRecipes();
makePistonRecipes();
if (EnhancedLootBags.isModLoaded()) {
makeLootBagRecipes();
}
registerMixedMetalIngotRecipes();
registerReinforcedIronAlloyPlates();
registerNEIPlanetRecipes();
Expand Down Expand Up @@ -6804,6 +6810,105 @@ private static final void registerMixedMetalIngotRecipes() {
30);
}

private void makeLootBagRecipes() {
// Basic -> Steam Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 1, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 2, missing)).noFluidInputs().noFluidOutputs()
.duration(SECONDS * 30).eut(TierEU.RECIPE_LV).addTo(sAssemblerRecipes);
// Steam -> LV Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 2, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 4, missing)).noFluidInputs().noFluidOutputs()
.duration(SECONDS * 30).eut(TierEU.RECIPE_LV).addTo(sAssemblerRecipes);
// LV -> MV Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 4, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 5, missing)).noFluidInputs().noFluidOutputs()
.duration(SECONDS * 30).eut(TierEU.RECIPE_MV).addTo(sAssemblerRecipes);
// MV -> HV Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 5, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 6, missing)).noFluidInputs().noFluidOutputs()
.duration(SECONDS * 30).eut(TierEU.RECIPE_HV).addTo(sAssemblerRecipes);
// HV -> EV Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 6, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 7, missing)).noFluidInputs().noFluidOutputs()
.duration(SECONDS * 30).eut(TierEU.RECIPE_EV).addTo(sAssemblerRecipes);
// EV -> IV Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 7, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 8, missing)).noFluidInputs().noFluidOutputs()
.duration(SECONDS * 30).eut(TierEU.RECIPE_IV).addTo(sAssemblerRecipes);
// IV -> LuV Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 8, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 41, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_LuV).addTo(sAssemblerRecipes);
// Forest Ranger Basic -> Forest Ranger Advanced Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 19, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 20, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_LV).addTo(sAssemblerRecipes);
// Forest Ranger Advanced -> Forest Ranger Expert Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 20, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 21, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_MV).addTo(sAssemblerRecipes);
// BM Novice -> BM Adept Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 16, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 17, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_MV).addTo(sAssemblerRecipes);
// BM Adept -> BM Master Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 17, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 18, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_MV).addTo(sAssemblerRecipes);
// Bees Basic -> Bees Advanced Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 25, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 26, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_LV).addTo(sAssemblerRecipes);
// Bees Advanced -> Bees Expert Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 26, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 27, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_HV).addTo(sAssemblerRecipes);
// Space Invaders Moon -> Space Invaders Mars Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 22, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 23, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_EV).addTo(sAssemblerRecipes);
// Space Invaders Mars -> Space Invaders Asteroids Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 23, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 24, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_EV).addTo(sAssemblerRecipes);
// Fast Food -> Slow Food Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 28, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 29, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_LV).addTo(sAssemblerRecipes);
// Slow Food -> Haute Cuisine Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 29, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 30, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_LV).addTo(sAssemblerRecipes);
// Haute Cuisine -> Dessert Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 30, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 31, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_LV).addTo(sAssemblerRecipes);
// Transportation 3 -> 2 Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 32, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 33, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_LV).addTo(sAssemblerRecipes);
// Transportation 2 -> 1 Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 33, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 34, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_LV).addTo(sAssemblerRecipes);
// Magic Novice -> Magic Adept Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 9, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 10, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_LV).addTo(sAssemblerRecipes);
// Magic Adept -> Magic Master Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 10, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 11, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_MV).addTo(sAssemblerRecipes);
// Magic Master -> Magic Grandmaster Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 3, 11, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 12, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_MV).addTo(sAssemblerRecipes);
// Magic Grandmaster -> Magic Grandmaster Unique Lootbags
GT_Values.RA.stdBuilder().itemInputs(getModItem(EnhancedLootBags.ID, "lootbag", 16, 12, missing))
.itemOutputs(getModItem(EnhancedLootBags.ID, "lootbag", 1, 13, missing)).noFluidInputs()
.noFluidOutputs().duration(SECONDS * 30).eut(TierEU.RECIPE_MV).addTo(sAssemblerRecipes);
}

private void makePistonRecipes() {
// Vanilla Piston Assembler recipe
List<ItemStack> fenceWood = OreDictionary.getOres("fenceWood");
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/dreammaster/scripts/ScriptCoreMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,5 @@ public void loadRecipes() {
GT_Values.RA.stdBuilder().itemInputs(getModItem(ProjectRedCore.ID, "projectred.core.part", 1, 55, missing))
.itemOutputs(getModItem(NewHorizonsCoreMod.ID, "item.ElectrotineWire", 2, 0, missing)).noFluidInputs()
.noFluidOutputs().duration(100).eut(4).addTo(sWiremillRecipes);

}
}