Skip to content

Commit d9bba3f

Browse files
authored
Merge pull request #2 from GTModpackTeam/add-advrocketry
2 parents ae966de + 7e5e429 commit d9bba3f

9 files changed

Lines changed: 102 additions & 3 deletions

File tree

dependencies.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dependencies {
5757
// Debug Forestry
5858
compileOnly rfg.deobf("curse.maven:forestry-59751:2684780") // Forestry 5.8.2.387
5959
compileOnly rfg.deobf("curse.maven:binnies-mods-patched-899182:5492997") // Binnie's Mods Patched 2.5.1.212
60-
if (project.debug_all.toBoolean() || project.debug_ffm.toBoolean()) {
60+
if (project.debug_all.toBoolean() || project.debug_forestry.toBoolean()) {
6161
runtimeOnlyNonPublishable rfg.deobf("curse.maven:forestry-59751:2684780") // Forestry 5.8.2.387
6262

6363
// Debug Binnies
@@ -70,4 +70,10 @@ dependencies {
7070
if (project.debug_all.toBoolean() || project.debug_gtfo.toBoolean()) {
7171
runtimeOnlyNonPublishable rfg.deobf("curse.maven:gregtech-food-option-477021:5487400") // GTFO 1.11.2.1
7272
}
73+
74+
// Advanced Rocketry
75+
if (project.debug_all.toBoolean() || project.debug_advrocket.toBoolean()) {
76+
runtimeOnlyNonPublishable rfg.deobf("curse.maven:libvulpes-236541:3801015") // LibVulpes 0.4.2-25
77+
runtimeOnlyNonPublishable rfg.deobf("curse.maven:advanced-rocketry-236542:4671856") // Advanced Rocketry 2.0.0-17
78+
}
7379
}

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ minecraftVersion = 1.12.2
2323
# Debug mod compatibility
2424
debug_all = false
2525
debug_thaumcraft = false
26-
debug_ffm = false
26+
debug_forestry = false
2727
debug_binnies = false
2828
debug_gtfo = false
29+
debug_advrocket = false
2930

3031
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
3132
# restart Minecraft in development. Choose this dependent on your mod:

src/main/java/gtexpert/gtwp/GTWPMod.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,23 @@
1818
import net.minecraftforge.fml.common.eventhandler.EventPriority;
1919
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
2020

21+
import gregtech.GTInternalTags;
2122
import gtexpert.gtwp.api.ModValues;
2223
import gtexpert.gtwp.api.util.ModLog;
24+
import gtexpert.gtwp.api.util.Mods;
2325
import gtexpert.gtwp.module.ModuleManager;
2426
import gtexpert.gtwp.module.Modules;
2527

2628
@Mod(
2729
modid = Tags.MODID,
2830
name = Tags.MODNAME,
2931
version = Tags.VERSION,
30-
dependencies = "")
32+
updateJSON = "https://forge.curseupdate.com/1093753/gtwoodprocessing",
33+
acceptedMinecraftVersions = "[1.12.2,1.13)",
34+
dependencies = GTInternalTags.DEP_VERSION_STRING + "after:" + Mods.Names.GREGTECH_FOOD_OPTION + ";" +
35+
"after:" + Mods.Names.THAUMCRAFT + ";" + "after:" + Mods.Names.FORESTRY + ";" +
36+
"after:" + Mods.Names.EXTRA_TREES + ";" + "after:" + Mods.Names.ADVANCED_ROCKETRY + ";")
37+
@Mod.EventBusSubscriber(modid = ModValues.MODID)
3138
public class GTWPMod {
3239

3340
private ModuleManager moduleManager;

src/main/java/gtexpert/gtwp/api/util/Mods.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public enum Mods {
2626
AEAdditions(Names.AE_ADDITIONS),
2727
AE2FluidCrafting(Names.AE2_FLUID_CRAFTING),
2828
AppliedEnergistics2(Names.APPLIED_ENERGISTICS2),
29+
AdvancedRocketry(Names.ADVANCED_ROCKETRY),
2930
Avaritia(Names.AVARITIA),
3031
Avaritiaaddons(Names.AVARITIAADDONS),
3132
Baubles(Names.BAUBLES),
@@ -122,6 +123,7 @@ public static class Names {
122123
public static final String AE_ADDITIONS = "aeadditions";
123124
public static final String AE2_FLUID_CRAFTING = "ae2fc";
124125
public static final String APPLIED_ENERGISTICS2 = "appliedenergistics2";
126+
public static final String ADVANCED_ROCKETRY = "advancedrocketry";
125127
public static final String AVARITIA = "avaritia";
126128
public static final String AVARITIAADDONS = "avaritiaddons";
127129
public static final String BAUBLES = "baubles";

src/main/java/gtexpert/gtwp/integration/GTWPIntegrationModule.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@
99
import org.apache.logging.log4j.Logger;
1010
import org.jetbrains.annotations.NotNull;
1111

12+
import gtexpert.gtwp.api.ModValues;
13+
import gtexpert.gtwp.api.modules.TModule;
1214
import gtexpert.gtwp.module.BaseModule;
15+
import gtexpert.gtwp.module.Modules;
1316

17+
@TModule(
18+
moduleID = Modules.MODULE_INTEGRATION,
19+
containerID = ModValues.MODID,
20+
name = "GTWoodProcessing Integration",
21+
description = "General GTWoodProcessing Integration Module. Disabling this disables all integration modules.")
1422
public class GTWPIntegrationModule extends BaseModule {
1523

1624
public static final Logger logger = LogManager.getLogger("GTWoodProcessing Mod Integration");
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package gtexpert.gtwp.integration.advrocketry;
2+
3+
import net.minecraftforge.common.config.Config;
4+
5+
import gtexpert.gtwp.api.ModValues;
6+
import gtexpert.gtwp.module.Modules;
7+
8+
@Config.LangKey(ModValues.MODID + ".config.integration.advrocketry")
9+
@Config(modid = ModValues.MODID,
10+
name = ModValues.MODID + "/integration/" + Modules.MODULE_ADVROCKETRY,
11+
category = "AdvancedRocketry")
12+
public class AdvancedRocketryConfigHolder {}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package gtexpert.gtwp.integration.advrocketry;
2+
3+
import net.minecraft.item.crafting.IRecipe;
4+
import net.minecraftforge.event.RegistryEvent;
5+
6+
import gtexpert.gtwp.api.ModValues;
7+
import gtexpert.gtwp.api.modules.TModule;
8+
import gtexpert.gtwp.api.util.Mods;
9+
import gtexpert.gtwp.integration.GTWPIntegrationSubmodule;
10+
import gtexpert.gtwp.integration.advrocketry.recipes.AdvancedRocketryWoodRecipe;
11+
import gtexpert.gtwp.module.Modules;
12+
13+
@TModule(
14+
moduleID = Modules.MODULE_ADVROCKETRY,
15+
containerID = ModValues.MODID,
16+
modDependencies = Mods.Names.ADVANCED_ROCKETRY,
17+
name = "GTWoodProcessing Advanced Rocketry Integration",
18+
description = "Advanced Rocketry Integration Module")
19+
public class AdvancedRocketryModule extends GTWPIntegrationSubmodule {
20+
21+
@Override
22+
public void registerRecipesLowest(RegistryEvent.Register<IRecipe> event) {
23+
AdvancedRocketryWoodRecipe.init();
24+
}
25+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package gtexpert.gtwp.integration.advrocketry.recipes;
2+
3+
import java.util.Arrays;
4+
import java.util.List;
5+
6+
import gregtech.api.recipes.ModHandler;
7+
import gregtech.loaders.WoodTypeEntry;
8+
import gtexpert.gtwp.api.util.Mods;
9+
import gtexpert.gtwp.loaders.GTWPWoodRecipeLoader;
10+
11+
public class AdvancedRocketryWoodRecipe {
12+
13+
private static List<WoodTypeEntry> DEFAULT_ENTRIES;
14+
15+
private static List<WoodTypeEntry> getDefaultEntries() {
16+
if (DEFAULT_ENTRIES == null) {
17+
final String mcModId = Mods.AdvancedRocketry.name();
18+
return DEFAULT_ENTRIES = Arrays.asList(
19+
new WoodTypeEntry.Builder(mcModId, "alien")
20+
.planks(Mods.AdvancedRocketry.getItem("planks", 1), null)
21+
.log(Mods.AdvancedRocketry.getItem("alienwood", 1))
22+
.registerAllUnificationInfo()
23+
.build());
24+
}
25+
return DEFAULT_ENTRIES;
26+
}
27+
28+
public static void init() {
29+
ModHandler.removeRecipeByName(Mods.AdvancedRocketry.getResource("alienwoodplanks"));
30+
31+
for (WoodTypeEntry entry : getDefaultEntries()) {
32+
GTWPWoodRecipeLoader.registerWoodTypeRecipe(false, entry);
33+
GTWPWoodRecipeLoader.addCuttingRecipe(entry);
34+
GTWPWoodRecipeLoader.addSawmillRecipe(entry);
35+
}
36+
}
37+
}

src/main/java/gtexpert/gtwp/module/Modules.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class Modules implements IModuleContainer {
1818
public static final String MODULE_CHISEL = "chisel_integration";
1919
public static final String MODULE_AE = "ae_integration";
2020
public static final String MODULE_AEA = "aeadditions_integration";
21+
public static final String MODULE_ADVROCKETRY = "advrocketry_integration";
2122
public static final String MODULE_NAE2 = "nae2_integration";
2223
public static final String MODULE_BINNIES = "binnies_integration";
2324
public static final String MODULE_BOTANY = "botany_integration";

0 commit comments

Comments
 (0)