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

Part1: Gendustry & Binnie's Mods integration #257

Merged
merged 15 commits into from
Apr 23, 2024
Merged
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ jobs:
avaritia-1-1x-kedition(recommended)
thaumcraft(recommended)
forestry(recommended)
gendustry(recommended)
binnies-mods-patched(recommended)
ulv-covers(incompatible)
files: |
build/libs/!(*-@(dev|sources|javadoc)).jar
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
- I also borrowed some contents from [Impact-Core](https://github.com/GT-IMPACT/Impact-Core) under [MIT](https://github.com/GT-IMPACT/Impact-Core/blob/master/LICENSE) License
- Piston Boots are from [Adventure Backpack](https://www.curseforge.com/minecraft/mc-mods/adventure-backpack) under [LGPL-3.0](https://github.com/Darkona/AdventureBackpack2/blob/master/LICENSE.md) License
- Primitive(ULV) Motor/Pump/ConveyorModule/Piston/RobotArm from [ULV-Covers](https://github.com/Cosmic-Chaos/ULV-Covers) under [LGPL-2.1](https://github.com/Cosmic-Chaos/ULV-Covers/blob/main/LICENSE.txt) License
- DepLoader from [NewHorizonsCoreMod](https://github.com/GTNewHorizons/NewHorizonsCoreMod)
- DepLoader from [NewHorizonsCoreMod](https://github.com/GTNewHorizons/NewHorizonsCoreMod) under [LGPL-3.0](https://github.com/GTNewHorizons/NewHorizonsCoreMod/blob/master/LICENSE) License
- Industrial Apiary some textures & codes from [NewHorizonsCoreMod](https://github.com/GTNewHorizons/NewHorizonsCoreMod) under [LGPL-3.0](https://github.com/GTNewHorizons/NewHorizonsCoreMod/blob/master/LICENSE) License
5 changes: 4 additions & 1 deletion src/main/java/gtexpert/GTExpertMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"after:" + Mods.Names.ENDER_CONDUITS + ";" + "after:" + Mods.Names.ENDER_AE2_CONDUITS + ";" +
"after:" + Mods.Names.DRACONIC_EVOLUTION + ";" + "after:" + Mods.Names.DRACONIC_ADDITIONS + ";" +
"after:" + Mods.Names.CHISEL + ";" + "after:" + Mods.Names.AVARITIA + ";" +
"after:" + Mods.Names.THAUMCRAFT + ";" + "after:" + Mods.Names.FORESTRY + ";")
"after:" + Mods.Names.THAUMCRAFT + ";" + "after:" + Mods.Names.FORESTRY + ";" +
"after:" + Mods.Names.GENDUSTRY + ";" + "after:" + Mods.Names.GENETICS + ";" +
"after:" + Mods.Names.BOTANY + ";" + "after:" + Mods.Names.EXTRA_BEES + ";" +
"after:" + Mods.Names.EXTRA_TREES + ";")
@Mod.EventBusSubscriber(modid = GTEValues.MODID)
public class GTExpertMod {

Expand Down
6 changes: 2 additions & 4 deletions src/main/java/gtexpert/api/util/Mods.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

import gregtech.api.GTValues;

import gtexpert.api.GTEValues;

public enum Mods {

AEAdditions(Names.AE_ADDITIONS),
Expand All @@ -31,6 +29,7 @@ public enum Mods {
Avaritia(Names.AVARITIA),
Avaritiaaddons(Names.AVARITIAADDONS),
Baubles(Names.BAUBLES),
Botany(Names.BOTANY),
Chisel(Names.CHISEL),
CTM(Names.CONNECTED_TEXTURES_MOD),
CraftTweaker(Names.CRAFT_TWEAKER),
Expand Down Expand Up @@ -73,7 +72,6 @@ public enum Mods {
GregicalityMultiblocks(Names.GREGICALITY_MULTIBLOCKS),
GregTech(Names.GREGTECH),
GregTechFoodOption(Names.GREGTECH_FOOD_OPTION),
GregTechExpertCore(Names.GREGTECH_EXPERT_CORE),
GroovyScript(Names.GROOVY_SCRIPT),
HWYLA(Names.HWYLA),
InventoryTweaks(Names.INVENTORY_TWEAKS),
Expand Down Expand Up @@ -123,6 +121,7 @@ public static class Names {
public static final String AVARITIA = "avaritia";
public static final String AVARITIAADDONS = "avaritiaddons";
public static final String BAUBLES = "baubles";
public static final String BOTANY = "botany";
public static final String CHISEL = "chisel";
public static final String CONNECTED_TEXTURES_MOD = "ctm";
public static final String CRAFT_TWEAKER = "crafttweaker";
Expand Down Expand Up @@ -165,7 +164,6 @@ public static class Names {
public static final String GREGICALITY_MULTIBLOCKS = "gcym";
public static final String GREGTECH = GTValues.MODID;
public static final String GREGTECH_FOOD_OPTION = "gregtechfoodoption";
public static final String GREGTECH_EXPERT_CORE = GTEValues.MODID;
public static final String GROOVY_SCRIPT = "groovyscript";
public static final String HWYLA = "hwyla";
public static final String INVENTORY_TWEAKS = "inventorytweaks";
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/gtexpert/client/GTETextures.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public class GTETextures {
public static SimpleOverlayRenderer DRACONIUM_CASING;
public static SimpleOverlayRenderer AWAKENED_DRACONIUM_CASING;

// Gendustry
public static OrientedOverlayRenderer INDUSTRIAL_APIARY_OVERLAY = new OrientedOverlayRenderer(
"machines/industrial_apiary");

public static void preInit() {
// Core
SAWMILL_CASING = new SimpleOverlayRenderer("casings/sawmill_casing");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public MetaTileEntityLargeCrackingUnit(ResourceLocation metaTileEntityId) {

@Override
public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) {
return new MetaTileEntityLargeCrackingUnit(this.metaTileEntityId);
return new MetaTileEntityLargeCrackingUnit(metaTileEntityId);
}

@NotNull
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/gtexpert/integration/binnies/BinniesModule.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package gtexpert.integration.binnies;

import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

import gtexpert.api.GTEValues;
import gtexpert.api.modules.GTEModule;
import gtexpert.api.util.Mods;
import gtexpert.integration.GTEIntegrationSubmodule;
import gtexpert.integration.binnies.recipes.BinniesItemsRecipe;
import gtexpert.modules.GTEModules;

@GTEModule(
moduleID = GTEModules.MODULE_BINNIES,
containerID = GTEValues.MODID,
modDependencies = { Mods.Names.FORESTRY, Mods.Names.GENETICS, Mods.Names.BOTANY,
Mods.Names.EXTRA_BEES, Mods.Names.EXTRA_TREES },
name = "GTExpert Binnie's Mods Integration",
description = "Binnie's Mods Integration Module")
public class BinniesModule extends GTEIntegrationSubmodule {

@Override
public void postInit(FMLPostInitializationEvent event) {
BinniesItemsRecipe.init();
}

@Override
public void registerRecipesNormal(RegistryEvent.Register<IRecipe> event) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package gtexpert.integration.binnies.botany;

import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

import gtexpert.api.GTEValues;
import gtexpert.api.modules.GTEModule;
import gtexpert.api.util.Mods;
import gtexpert.integration.GTEIntegrationSubmodule;
import gtexpert.integration.binnies.botany.recipes.BotanyItemsRecipe;
import gtexpert.modules.GTEModules;

@GTEModule(
moduleID = GTEModules.MODULE_BOTANY,
containerID = GTEValues.MODID,
modDependencies = { Mods.Names.FORESTRY, Mods.Names.BOTANY },
name = "GTExpert Botany(Binnie's Mods) Integration",
description = "Botany(Binnie's Mods) Integration Module")
public class BotanyModule extends GTEIntegrationSubmodule {

@Override
public void postInit(FMLPostInitializationEvent event) {
BotanyItemsRecipe.init();
}

@Override
public void registerRecipesNormal(RegistryEvent.Register<IRecipe> event) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package gtexpert.integration.binnies.botany.recipes;

import static gregtech.api.unification.ore.OrePrefix.*;

import gregtech.api.recipes.ModHandler;
import gregtech.api.unification.material.MarkerMaterials;
import gregtech.api.unification.material.Materials;
import gregtech.api.unification.stack.UnificationEntry;

import gtexpert.api.util.Mods;
import gtexpert.integration.ffm.FFMConfigHolder;
import gtexpert.integration.ffm.FFMUtility;
import gtexpert.integration.ffm.recipes.machines.CarpenterLoader;

import forestry.api.recipes.RecipeManagers;

public class BotanyItemsRecipe {

public static void init() {
Enum<FFMUtility.recipeMode> recipeMode = FFMUtility.recipeMode.safeValueOf(FFMConfigHolder.gameMode);

// Botanist Database
ModHandler.addShapelessNBTClearingRecipe("botanist_database_nbt",
Mods.Botany.getItem("database"),
Mods.Botany.getItem("database"));

if (recipeMode == FFMUtility.recipeMode.HARD) {
// Botanist Database
CarpenterLoader.removeCarpenterRecipe(Mods.Botany.getItem("database"));
RecipeManagers.carpenterManager.addRecipe(
20, Materials.Redstone.getFluid(1440),
Mods.Forestry.getItem("portable_alyzer"), Mods.Botany.getItem("database"),
"SPS", "DCE", "SPS",
'S', new UnificationEntry(screw, Materials.Silver).toString(),
'D', new UnificationEntry(plate, Materials.Diamond).toString(),
'E', new UnificationEntry(plate, Materials.Emerald).toString(),
'P', new UnificationEntry(plate, Materials.Gold).toString(),
'C', new UnificationEntry(circuit, MarkerMaterials.Tier.HV).toString());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package gtexpert.integration.binnies.extrabees;

import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

import gtexpert.api.GTEValues;
import gtexpert.api.modules.GTEModule;
import gtexpert.api.util.Mods;
import gtexpert.integration.GTEIntegrationSubmodule;
import gtexpert.integration.binnies.extrabees.recipes.ExtraBeesItemsRecipe;
import gtexpert.modules.GTEModules;

@GTEModule(
moduleID = GTEModules.MODULE_EXBEES,
containerID = GTEValues.MODID,
modDependencies = { Mods.Names.FORESTRY, Mods.Names.EXTRA_BEES },
name = "GTExpert Extra Bees(Binnie's Mods) Integration",
description = "Extra Bees(Binnie's Mods) Integration Module")
public class ExtraBeesModule extends GTEIntegrationSubmodule {

@Override
public void postInit(FMLPostInitializationEvent event) {
ExtraBeesItemsRecipe.init();
}

@Override
public void registerRecipesNormal(RegistryEvent.Register<IRecipe> event) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package gtexpert.integration.binnies.extrabees.recipes;

import static gregtech.api.unification.ore.OrePrefix.*;

import gregtech.api.recipes.ModHandler;
import gregtech.api.unification.material.MarkerMaterials;
import gregtech.api.unification.material.Materials;
import gregtech.api.unification.stack.UnificationEntry;

import gtexpert.api.util.Mods;
import gtexpert.integration.ffm.FFMConfigHolder;
import gtexpert.integration.ffm.FFMUtility;
import gtexpert.integration.ffm.recipes.machines.CarpenterLoader;

import forestry.api.recipes.RecipeManagers;

public class ExtraBeesItemsRecipe {

public static void init() {
Enum<FFMUtility.recipeMode> recipeMode = FFMUtility.recipeMode.safeValueOf(FFMConfigHolder.gameMode);

// Apiarist Database
ModHandler.addShapelessNBTClearingRecipe("apiarist_database_nbt",
Mods.ExtraBees.getItem("dictionary"),
Mods.ExtraBees.getItem("dictionary"));

if (recipeMode == FFMUtility.recipeMode.HARD) {
// Apiarist Database
CarpenterLoader.removeCarpenterRecipe(Mods.ExtraBees.getItem("dictionary"));
RecipeManagers.carpenterManager.addRecipe(
20, Materials.Redstone.getFluid(1440),
Mods.Forestry.getItem("portable_alyzer"), Mods.ExtraBees.getItem("dictionary"),
"SPS", "DCE", "SPS",
'S', new UnificationEntry(screw, Materials.Lead).toString(),
'D', new UnificationEntry(plate, Materials.Diamond).toString(),
'E', new UnificationEntry(plate, Materials.Emerald).toString(),
'P', new UnificationEntry(plate, Materials.Gold).toString(),
'C', new UnificationEntry(circuit, MarkerMaterials.Tier.HV).toString());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package gtexpert.integration.binnies.extratrees;

import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

import gtexpert.api.GTEValues;
import gtexpert.api.modules.GTEModule;
import gtexpert.api.util.Mods;
import gtexpert.integration.GTEIntegrationSubmodule;
import gtexpert.integration.binnies.extratrees.recipes.*;
import gtexpert.modules.GTEModules;

@GTEModule(
moduleID = GTEModules.MODULE_EXTREES,
containerID = GTEValues.MODID,
modDependencies = { Mods.Names.FORESTRY, Mods.Names.EXTRA_TREES },
name = "GTExpert Extra Trees(Binnie's Mods) Integration",
description = "Extra Trees(Binnie's Mods) Integration Module")
public class ExtraTreesModule extends GTEIntegrationSubmodule {

@Override
public void postInit(FMLPostInitializationEvent event) {
ExtraTreesItemsRecipe.init();
ExtraTreesWoodRecipe.init();
}

@Override
public void registerRecipesNormal(RegistryEvent.Register<IRecipe> event) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package gtexpert.integration.binnies.extratrees.recipes;

import static gregtech.api.unification.ore.OrePrefix.*;

import gregtech.api.recipes.ModHandler;
import gregtech.api.unification.material.MarkerMaterials;
import gregtech.api.unification.material.Materials;
import gregtech.api.unification.stack.UnificationEntry;

import gtexpert.api.util.Mods;
import gtexpert.integration.ffm.FFMConfigHolder;
import gtexpert.integration.ffm.FFMUtility;
import gtexpert.integration.ffm.recipes.machines.CarpenterLoader;

import forestry.api.recipes.RecipeManagers;

public class ExtraTreesItemsRecipe {

public static void init() {
Enum<FFMUtility.recipeMode> recipeMode = FFMUtility.recipeMode.safeValueOf(FFMConfigHolder.gameMode);

// Arborist Database
ModHandler.addShapelessNBTClearingRecipe("arborist_database_nbt",
Mods.ExtraTrees.getItem("databasetree"),
Mods.ExtraTrees.getItem("databasetree"));

// Lepidopterist Database
ModHandler.addShapelessNBTClearingRecipe("lepidopterist_database_nbt",
Mods.ExtraTrees.getItem("databaselepi"),
Mods.ExtraTrees.getItem("databaselepi"));

if (recipeMode == FFMUtility.recipeMode.HARD) {
// Arborist Database
CarpenterLoader.removeCarpenterRecipe(Mods.ExtraTrees.getItem("databasetree"));
RecipeManagers.carpenterManager.addRecipe(
20, Materials.Redstone.getFluid(1440),
Mods.Forestry.getItem("portable_alyzer"), Mods.ExtraTrees.getItem("databasetree"),
"SPS", "DCE", "SPS",
'S', new UnificationEntry(screw, Materials.Copper).toString(),
'D', new UnificationEntry(plate, Materials.Diamond).toString(),
'E', new UnificationEntry(plate, Materials.Emerald).toString(),
'P', new UnificationEntry(plate, Materials.Gold).toString(),
'C', new UnificationEntry(circuit, MarkerMaterials.Tier.HV).toString());

// Lepidopterist Database
CarpenterLoader.removeCarpenterRecipe(Mods.ExtraTrees.getItem("databaselepi"));
RecipeManagers.carpenterManager.addRecipe(
20, Materials.Redstone.getFluid(1440),
Mods.Forestry.getItem("portable_alyzer"), Mods.ExtraTrees.getItem("databaselepi"),
"SPS", "DCE", "SPS",
'S', new UnificationEntry(screw, Materials.Tin).toString(),
'D', new UnificationEntry(plate, Materials.Diamond).toString(),
'E', new UnificationEntry(plate, Materials.Emerald).toString(),
'P', new UnificationEntry(plate, Materials.Gold).toString(),
'C', new UnificationEntry(circuit, MarkerMaterials.Tier.HV).toString());
}
}
}
Loading
Loading