aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ggfab/GigaGramFab.java
diff options
context:
space:
mode:
authorNotAPenguin <michiel.vandeginste@gmail.com>2024-09-02 23:17:17 +0200
committerGitHub <noreply@github.com>2024-09-02 23:17:17 +0200
commit1b820de08a05070909a267e17f033fcf58ac8710 (patch)
tree02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/ggfab/GigaGramFab.java
parentafd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff)
downloadGT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip
The Great Renaming (#3014)
* move kekztech to a single root dir * move detrav to a single root dir * move gtnh-lanthanides to a single root dir * move tectech and delete some gross reflection in gt++ * remove more reflection inside gt5u * delete more reflection in gt++ * fix imports * move bartworks and bwcrossmod * fix proxies * move galactigreg and ggfab * move gtneioreplugin * try to fix gt++ bee loader * apply the rename rules to BW * apply rename rules to bwcrossmod * apply rename rules to detrav scanner mod * apply rename rules to galacticgreg * apply rename rules to ggfab * apply rename rules to goodgenerator * apply rename rules to gtnh-lanthanides * apply rename rules to gt++ * apply rename rules to kekztech * apply rename rules to kubatech * apply rename rules to tectech * apply rename rules to gt apply the rename rules to gt * fix tt import * fix mui hopefully * fix coremod except intergalactic * rename assline recipe class * fix a class name i stumbled on * rename StructureUtility to GTStructureUtility to prevent conflict with structurelib * temporary rename of GTTooltipDataCache to old name * fix gt client/server proxy names
Diffstat (limited to 'src/main/java/ggfab/GigaGramFab.java')
-rw-r--r--src/main/java/ggfab/GigaGramFab.java185
1 files changed, 185 insertions, 0 deletions
diff --git a/src/main/java/ggfab/GigaGramFab.java b/src/main/java/ggfab/GigaGramFab.java
new file mode 100644
index 0000000000..8fc8ef26a9
--- /dev/null
+++ b/src/main/java/ggfab/GigaGramFab.java
@@ -0,0 +1,185 @@
+package ggfab;
+
+import static gregtech.api.enums.ToolDictNames.*;
+import static gregtech.common.items.IDMetaTool01.*;
+import static gregtech.common.items.MetaGeneratedTool01.*;
+
+import net.minecraft.item.ItemStack;
+
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import ggfab.api.GGFabRecipeMaps;
+import ggfab.api.GigaGramFabAPI;
+import ggfab.items.GGMetaItemDumbItems;
+import ggfab.mte.MTEAdvAssLine;
+import ggfab.mte.MTELinkedInputBus;
+import ggfab.util.GGUtils;
+import gregtech.api.GregTechAPI;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SoundResource;
+import gregtech.api.metatileentity.implementations.MTEBasicMachineWithRecipe;
+import gregtech.api.util.ProcessingArrayManager;
+
+@Mod(
+ modid = GGConstants.MODID,
+ version = GGConstants.VERSION,
+ name = GGConstants.MODNAME,
+ acceptedMinecraftVersions = "[1.7.10]",
+ dependencies = "required-after:IC2;required-before:gregtech")
+public class GigaGramFab {
+
+ public GigaGramFab() {
+ // initialize the textures
+ // noinspection ResultOfMethodCallIgnored
+ BlockIcons.OVERLAY_FRONT_ADV_ASSLINE.name();
+ }
+
+ @Mod.EventHandler
+ public void preInit(FMLPreInitializationEvent event) {
+ GregTechAPI.sAfterGTPreload.add(() -> {
+ GGItemList.AdvAssLine
+ .set(new MTEAdvAssLine(13532, "ggfab.machine.adv_assline", "Advanced Assembly Line").getStackForm(1));
+ GGItemList.LinkedInputBus.set(
+ new MTELinkedInputBus(13533, "ggfab.machine.linked_input_bus", "Linked Input Bus", 5).getStackForm(1));
+ GGItemList.ToolCast_MV.set(
+ new MTEBasicMachineWithRecipe(
+ 13534,
+ "ggfab.toolcast.tier.mv",
+ "Basic Tool Casting Machine",
+ 2,
+ "Cheap Crafting Tool for you!",
+ GGFabRecipeMaps.toolCastRecipes,
+ 1,
+ 4,
+ 32000,
+ SoundResource.NONE,
+ MTEBasicMachineWithRecipe.SpecialEffects.MAIN_RANDOM_SPARKS,
+ "TOOL_CAST",
+ new Object[] { "PGP", "WMW", "CBC", 'M', MTEBasicMachineWithRecipe.X.HULL, 'P',
+ MTEBasicMachineWithRecipe.X.PUMP, 'C', MTEBasicMachineWithRecipe.X.CIRCUIT, 'W',
+ MTEBasicMachineWithRecipe.X.WIRE, 'G', MTEBasicMachineWithRecipe.X.GLASS, 'B',
+ ItemList.Shape_Empty.get(1L) }).getStackForm(1L));
+ GGItemList.ToolCast_HV.set(
+ new MTEBasicMachineWithRecipe(
+ 13535,
+ "ggfab.toolcast.tier.hv",
+ "Advanced Tool Casting Machine",
+ 3,
+ "Cheap Crafting Tool for you!",
+ GGFabRecipeMaps.toolCastRecipes,
+ 1,
+ 4,
+ 64000,
+ SoundResource.NONE,
+ MTEBasicMachineWithRecipe.SpecialEffects.MAIN_RANDOM_SPARKS,
+ "TOOL_CAST",
+ new Object[] { "PGP", "WMW", "CBC", 'M', MTEBasicMachineWithRecipe.X.HULL, 'P',
+ MTEBasicMachineWithRecipe.X.PUMP, 'C', MTEBasicMachineWithRecipe.X.CIRCUIT, 'W',
+ MTEBasicMachineWithRecipe.X.WIRE, 'G', MTEBasicMachineWithRecipe.X.GLASS, 'B',
+ ItemList.Shape_Empty.get(1L) }).getStackForm(1L));
+ GGItemList.ToolCast_EV.set(
+ new MTEBasicMachineWithRecipe(
+ 13536,
+ "ggfab.toolcast.tier.ev",
+ "Master Tool Casting Machine",
+ 4,
+ "Cheap Crafting Tool for you!",
+ GGFabRecipeMaps.toolCastRecipes,
+ 1,
+ 4,
+ 128000,
+ SoundResource.NONE,
+ MTEBasicMachineWithRecipe.SpecialEffects.MAIN_RANDOM_SPARKS,
+ "TOOL_CAST",
+ new Object[] { "PGP", "WMW", "CBC", 'M', MTEBasicMachineWithRecipe.X.HULL, 'P',
+ MTEBasicMachineWithRecipe.X.PUMP, 'C', MTEBasicMachineWithRecipe.X.CIRCUIT, 'W',
+ MTEBasicMachineWithRecipe.X.WIRE, 'G', MTEBasicMachineWithRecipe.X.GLASS, 'B',
+ ItemList.Shape_Empty.get(1L) }).getStackForm(1L));
+ long plate = OrePrefixes.plate.mMaterialAmount, ingot = OrePrefixes.ingot.mMaterialAmount,
+ screw = OrePrefixes.screw.mMaterialAmount, rod = OrePrefixes.stick.mMaterialAmount;
+ GigaGramFabAPI.addSingleUseToolType(craftingToolFile, INSTANCE.mToolStats.get((short) FILE.ID), 2 * plate);
+ GigaGramFabAPI
+ .addSingleUseToolType(craftingToolWrench, INSTANCE.mToolStats.get((short) WRENCH.ID), 6 * ingot);
+ GigaGramFabAPI
+ .addSingleUseToolType(craftingToolCrowbar, INSTANCE.mToolStats.get((short) CROWBAR.ID), 3 * rod);
+ GigaGramFabAPI.addSingleUseToolType(
+ craftingToolWireCutter,
+ INSTANCE.mToolStats.get((short) WIRECUTTER.ID),
+ 3 * plate + 2 * rod + screw);
+ GigaGramFabAPI.addSingleUseToolType(
+ craftingToolHardHammer,
+ INSTANCE.mToolStats.get((short) HARDHAMMER.ID),
+ 6 * ingot);
+ GigaGramFabAPI.addSingleUseToolType(
+ craftingToolSoftHammer,
+ INSTANCE.mToolStats.get((short) SOFTMALLET.ID),
+ 6 * ingot);
+ GigaGramFabAPI.addSingleUseToolType(
+ craftingToolScrewdriver,
+ INSTANCE.mToolStats.get((short) SCREWDRIVER.ID),
+ 2 * rod);
+ GigaGramFabAPI.addSingleUseToolType(craftingToolSaw, INSTANCE.mToolStats.get((short) SAW.ID), 2 * plate);
+ ProcessingArrayManager.addRecipeMapToPA("ggfab.toolcast", GGFabRecipeMaps.toolCastRecipes);
+ });
+ GregTechAPI.sBeforeGTPostload.add(new ComponentRecipeLoader());
+ GregTechAPI.sBeforeGTPostload.add(new SingleUseToolRecipeLoader());
+ ConfigurationHandler.INSTANCE.init(event.getSuggestedConfigurationFile());
+
+ initDumbItem1();
+ }
+
+ @Mod.EventHandler
+ public void init(FMLInitializationEvent event) {}
+
+ @Mod.EventHandler
+ public void postInit(FMLPostInitializationEvent event) {}
+
+ private void initDumbItem1() {
+ GGMetaItemDumbItems i1 = new GGMetaItemDumbItems("ggfab.d1");
+ int id = 0;
+ {
+ int idShape = 30;
+ final int budget = idShape;
+ String prefix = "One_Use_craftingTool";
+ String prefix2 = "Shape_One_Use_craftingTool";
+ for (GGItemList i : GGItemList.values()) {
+ ItemStack stack = null;
+ if (i.name()
+ .startsWith(prefix)) {
+ stack = i1.addItem(
+ id++,
+ "Single Use " + GGUtils.processSentence(
+ i.name()
+ .substring(prefix.length()),
+ ' ',
+ true,
+ true),
+ null,
+ i,
+ i.name()
+ .substring("One_Use_".length()));
+ } else if (i.name()
+ .startsWith(prefix2)) {
+ stack = i1.addItem(
+ idShape++,
+ "Tool Casting Mold (" + GGUtils.processSentence(
+ i.name()
+ .substring(prefix2.length()),
+ ' ',
+ true,
+ true) + ")",
+ null,
+ i);
+ }
+ if (stack != null) {
+ i.set(stack);
+ }
+ }
+ if (id >= budget || idShape >= 2 * budget || idShape - id != budget) throw new AssertionError();
+ id = budget * 2;
+ }
+ }
+}