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

Updated Twilight Forest compatibility #781

Merged
merged 9 commits into from
Feb 10, 2024
8 changes: 8 additions & 0 deletions src/main/java/com/dreammaster/recipes/RecipeRemover.java
Original file line number Diff line number Diff line change
Expand Up @@ -2744,6 +2744,14 @@ public static void run() {
removeRecipeByOutputDelayed(getModItem("TwilightForest", "item.emptyMagicMap", 1, 0, missing));
removeRecipeByOutputDelayed(getModItem("TwilightForest", "item.ironwoodRaw", 1, 0, missing));
removeRecipeByOutputDelayed(getModItem("TwilightForest", "tile.TFUncraftingTable", 1, 0, missing));

String[] materials = new String[] { "Twilight", "Canopy", "Mangrove", "Darkwood", "Time", "Trans", "Mine",
"Sort" };
for (int i = 0; i < materials.length; i++) {
removeRecipeByOutputDelayed(getModItem("TwilightForest", "tile.TFTrapDoor" + materials[i], 1, 0, missing));
removeRecipeByOutputDelayed(getModItem("TwilightForest", "item.door" + materials[i], 1, 0, missing));
}

removeRecipeByOutputDelayed(getModItem("WR-CBE|Core", "obsidianStick", 1, 0, missing));
removeRecipeByOutputDelayed(getModItem("WR-CBE|Core", "stoneBowl", 1, 0, missing));
removeRecipeByOutputDelayed(getModItem("WR-CBE|Core", "retherPearl", 1, 0, missing));
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/dreammaster/scripts/ScriptChisel.java
Original file line number Diff line number Diff line change
Expand Up @@ -598,5 +598,14 @@ public void loadRecipes() {
getModItem(TwilightForest.ID, "tile.KnightmetalBlock", 1, 0, missing));
ChiselHelper
.addVariationFromStack("knightmetalblock", getModItem(GregTech.ID, "gt.blockmetal4", 1, 0, missing));
ChiselHelper.addGroup("ironwoodblock");
ChiselHelper.addVariationFromStack(
"ironwoodblock",
getModItem(TwilightForest.ID, "tile.IronwoodBlock", 1, 0, missing));
ChiselHelper.addVariationFromStack("ironwoodblock", getModItem(GregTech.ID, "gt.blockmetal3", 1, 14, missing));
ChiselHelper.addGroup("fieryblock");
ChiselHelper
.addVariationFromStack("fieryblock", getModItem(TwilightForest.ID, "tile.FieryBlock", 1, 0, missing));
ChiselHelper.addVariationFromStack("fieryblock", getModItem(GregTech.ID, "gt.blockmetal3", 1, 4, missing));
}
}
109 changes: 109 additions & 0 deletions src/main/java/com/dreammaster/scripts/ScriptTwilightForest.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,115 @@ public void loadRecipes() {
getModItem(TwilightForest.ID, "item.carminite", 1, 0, missing),
getModItem(TwilightForest.ID, "tile.TFTowerStone", 1, 1, missing));

String[] materials = new String[] { "Twilight", "Canopy", "Mangrove", "Darkwood", "Time", "Trans", "Mine",
"Sort" };

for (int i = 0; i < materials.length; i++) {
addShapedRecipe(
getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 1, 0, missing),
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing),
"stickWood",
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing),
"stickWood",
getModItem(Minecraft.ID, "flint", 1, 0, missing),
"stickWood",
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing),
"stickWood",
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing));
addShapedRecipe(
getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 2, 0, missing),
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing),
"stickWood",
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing),
"stickWood",
"screwAnyIron",
"stickWood",
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing),
"stickWood",
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing));
addShapedRecipe(
getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 3, 0, missing),
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing),
"stickWood",
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing),
"stickWood",
"screwSteel",
"stickWood",
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing),
"stickWood",
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 1, i, missing));

addShapedRecipe(
getModItem(TwilightForest.ID, "item.door" + materials[i], 1, 0, missing),
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 1, 0, missing),
"craftingToolScrewdriver",
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
"ringAnyIron",
"screwAnyIron",
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
"craftingToolSaw");
addShapedRecipe(
getModItem(TwilightForest.ID, "item.door" + materials[i], 1, 0, missing),
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 1, 0, missing),
"craftingToolScrewdriver",
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
"ringCopper",
"screwCopper",
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
"craftingToolSaw");
addShapedRecipe(
getModItem(TwilightForest.ID, "item.door" + materials[i], 1, 0, missing),
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 1, 0, missing),
"craftingToolSaw",
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
"ringAnyIron",
"screwAnyIron",
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
"craftingToolScrewdriver");
addShapedRecipe(
getModItem(TwilightForest.ID, "item.door" + materials[i], 1, 0, missing),
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 1, 0, missing),
"craftingToolSaw",
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
"ringCopper",
"screwCopper",
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
getModItem(TwilightForest.ID, "tile.TFPlanks", 1, i, missing),
"craftingToolScrewdriver");

GT_Values.RA.stdBuilder()
.itemInputs(
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 4L),
getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 1, 0, missing))
.itemOutputs(getModItem(TwilightForest.ID, "item.TFDoor" + materials[i], 1, 0, missing))
.fluidInputs(Materials.Iron.getMolten(16)).duration(20 * SECONDS).eut(4).addTo(assemblerRecipes);
GT_Values.RA.stdBuilder()
.itemInputs(
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 4L),
getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 1, 0, missing))
.itemOutputs(getModItem(TwilightForest.ID, "item.TFDoor" + materials[i], 1, 0, missing))
.fluidInputs(Materials.Copper.getMolten(16)).duration(20 * SECONDS).eut(4).addTo(assemblerRecipes);
GT_Values.RA.stdBuilder()
.itemInputs(
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 4, i, missing),
GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 4L))
.itemOutputs(getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 4, 0, missing))
.fluidInputs(Materials.Iron.getMolten(16)).duration(30 * SECONDS).eut(4).addTo(assemblerRecipes);
GT_Values.RA.stdBuilder()
.itemInputs(
getModItem(TwilightForest.ID, "tile.TFWoodSlab", 4, i, missing),
GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 4L))
.itemOutputs(getModItem(TwilightForest.ID, "tile.TFTrapDoor" + materials[i], 6, 0, missing))
.fluidInputs(Materials.Steel.getMolten(16)).duration(30 * SECONDS).eut(4).addTo(assemblerRecipes);
}

GT_Values.RA.stdBuilder()
.itemInputs(
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steeleaf, 1L),
Expand Down