From 6031f8181f706259d5dc99924ab97cc5acd5d7e5 Mon Sep 17 00:00:00 2001 From: Calclavia Date: Thu, 13 Feb 2014 20:06:37 +0800 Subject: [PATCH] Made all modules sub-mods --- .../src/main/java/resonantinduction/archaic/Archaic.java | 3 ++- build.gradle | 1 - .../main/java/resonantinduction/electrical/Electrical.java | 4 ++-- .../main/java/resonantinduction/mechanical/Mechanical.java | 4 +++- src/main/java/resonantinduction/core/ResonantInduction.java | 4 +++- src/main/java/resonantinduction/core/Settings.java | 6 ++++++ 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/archaic/src/main/java/resonantinduction/archaic/Archaic.java b/archaic/src/main/java/resonantinduction/archaic/Archaic.java index 1cc488184..4b12e78d2 100644 --- a/archaic/src/main/java/resonantinduction/archaic/Archaic.java +++ b/archaic/src/main/java/resonantinduction/archaic/Archaic.java @@ -98,6 +98,7 @@ public class Archaic itemHammer = contentRegistry.createItem(ItemHammer.class); proxy.preInit(); Settings.save(); + TabRI.ITEMSTACK = new ItemStack(blockEngineeringTable); PacketAnnotation.register(TileFirebox.class); } @@ -105,7 +106,7 @@ public class Archaic @EventHandler public void init(FMLInitializationEvent evt) { - Settings.setModMetadata(metadata, ID, NAME); + Settings.setModMetadata(metadata, ID, NAME, ResonantInduction.ID); proxy.init(); } diff --git a/build.gradle b/build.gradle index c8b4d4523..9a08d467a 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,6 @@ buildscript { } apply plugin: 'forge' -apply plugin: 'maven' apply plugin: 'maven-publish' ext.buildProps = file "build.properties" diff --git a/electrical/src/main/java/resonantinduction/electrical/Electrical.java b/electrical/src/main/java/resonantinduction/electrical/Electrical.java index 394724e74..5731d2968 100644 --- a/electrical/src/main/java/resonantinduction/electrical/Electrical.java +++ b/electrical/src/main/java/resonantinduction/electrical/Electrical.java @@ -58,7 +58,7 @@ import cpw.mods.fml.common.registry.GameRegistry; * @author Calclavia * */ -@Mod(modid = Electrical.ID, name = Electrical.NAME, version = Reference.VERSION, dependencies = "before:ThermalExpansion;after:" + ResonantInduction.ID + "|Mechanical;required-after:" + ResonantInduction.ID) +@Mod(modid = Electrical.ID, name = Electrical.NAME, version = Reference.VERSION, dependencies = "before:ThermalExpansion;after:ResonantInduction|Mechanical;required-after:" + ResonantInduction.ID) @NetworkMod(channels = Reference.CHANNEL, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class) public class Electrical { @@ -147,7 +147,7 @@ public class Electrical @EventHandler public void init(FMLInitializationEvent evt) { - Settings.setModMetadata(metadata, ID, NAME); + Settings.setModMetadata(metadata, ID, NAME, ResonantInduction.ID); MultipartElectrical.INSTANCE = new MultipartElectrical(); proxy.init(); } diff --git a/mechanical/src/main/java/resonantinduction/mechanical/Mechanical.java b/mechanical/src/main/java/resonantinduction/mechanical/Mechanical.java index 3f768bba8..2ebb02496 100644 --- a/mechanical/src/main/java/resonantinduction/mechanical/Mechanical.java +++ b/mechanical/src/main/java/resonantinduction/mechanical/Mechanical.java @@ -136,6 +136,8 @@ public class Mechanical proxy.preInit(); Settings.save(); + + TabRI.ITEMSTACK = new ItemStack(blockGrinderWheel); PacketAnnotation.register(TileWindTurbine.class); PacketAnnotation.register(TileWaterTurbine.class); @@ -145,7 +147,7 @@ public class Mechanical public void init(FMLInitializationEvent evt) { MultipartMechanical.INSTANCE = new MultipartMechanical(); - Settings.setModMetadata(metadata, ID, NAME); + Settings.setModMetadata(metadata, ID, NAME, ResonantInduction.ID); proxy.init(); } diff --git a/src/main/java/resonantinduction/core/ResonantInduction.java b/src/main/java/resonantinduction/core/ResonantInduction.java index 057b5f791..9fd6ac51f 100644 --- a/src/main/java/resonantinduction/core/ResonantInduction.java +++ b/src/main/java/resonantinduction/core/ResonantInduction.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.logging.Logger; import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fluids.Fluid; @@ -52,7 +53,7 @@ public class ResonantInduction { /** Mod Information */ public static final String ID = "ResonantInduction|Core"; - public static final String NAME = Reference.NAME + " Core"; + public static final String NAME = Reference.NAME; @Instance(ID) public static ResonantInduction INSTANCE; @@ -119,6 +120,7 @@ public class ResonantInduction // GameRegistry.registerTileEntity(TileMaterial.class, "ri_material"); GameRegistry.registerTileEntity(TileFluidMixture.class, "ri_fluid_mixture"); proxy.preInit(); + TabRI.ITEMSTACK = new ItemStack(blockMachinePart); } @EventHandler diff --git a/src/main/java/resonantinduction/core/Settings.java b/src/main/java/resonantinduction/core/Settings.java index 75790ef60..b49aa5d96 100644 --- a/src/main/java/resonantinduction/core/Settings.java +++ b/src/main/java/resonantinduction/core/Settings.java @@ -76,6 +76,11 @@ public class Settings } public static void setModMetadata(ModMetadata metadata, String id, String name) + { + setModMetadata(metadata, id, name, ""); + } + + public static void setModMetadata(ModMetadata metadata, String id, String name, String parent) { metadata.modId = id; metadata.name = name; @@ -85,6 +90,7 @@ public class Settings metadata.version = Reference.VERSION + "." + Reference.BUILD_VERSION; metadata.authorList = Arrays.asList(new String[] { "Calclavia", "DarkCow" }); metadata.credits = LanguageUtility.getLocal("meta.resonantinduction.credits"); + metadata.parent = parent; metadata.autogenerated = false; }