Made all modules sub-mods

This commit is contained in:
Calclavia 2014-02-13 20:06:37 +08:00
parent 09306760d6
commit 6031f8181f
6 changed files with 16 additions and 6 deletions

View file

@ -98,6 +98,7 @@ public class Archaic
itemHammer = contentRegistry.createItem(ItemHammer.class); itemHammer = contentRegistry.createItem(ItemHammer.class);
proxy.preInit(); proxy.preInit();
Settings.save(); Settings.save();
TabRI.ITEMSTACK = new ItemStack(blockEngineeringTable);
PacketAnnotation.register(TileFirebox.class); PacketAnnotation.register(TileFirebox.class);
} }
@ -105,7 +106,7 @@ public class Archaic
@EventHandler @EventHandler
public void init(FMLInitializationEvent evt) public void init(FMLInitializationEvent evt)
{ {
Settings.setModMetadata(metadata, ID, NAME); Settings.setModMetadata(metadata, ID, NAME, ResonantInduction.ID);
proxy.init(); proxy.init();
} }

View file

@ -12,7 +12,6 @@ buildscript {
} }
apply plugin: 'forge' apply plugin: 'forge'
apply plugin: 'maven'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
ext.buildProps = file "build.properties" ext.buildProps = file "build.properties"

View file

@ -58,7 +58,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
* @author Calclavia * @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) @NetworkMod(channels = Reference.CHANNEL, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
public class Electrical public class Electrical
{ {
@ -147,7 +147,7 @@ public class Electrical
@EventHandler @EventHandler
public void init(FMLInitializationEvent evt) public void init(FMLInitializationEvent evt)
{ {
Settings.setModMetadata(metadata, ID, NAME); Settings.setModMetadata(metadata, ID, NAME, ResonantInduction.ID);
MultipartElectrical.INSTANCE = new MultipartElectrical(); MultipartElectrical.INSTANCE = new MultipartElectrical();
proxy.init(); proxy.init();
} }

View file

@ -137,6 +137,8 @@ public class Mechanical
proxy.preInit(); proxy.preInit();
Settings.save(); Settings.save();
TabRI.ITEMSTACK = new ItemStack(blockGrinderWheel);
PacketAnnotation.register(TileWindTurbine.class); PacketAnnotation.register(TileWindTurbine.class);
PacketAnnotation.register(TileWaterTurbine.class); PacketAnnotation.register(TileWaterTurbine.class);
} }
@ -145,7 +147,7 @@ public class Mechanical
public void init(FMLInitializationEvent evt) public void init(FMLInitializationEvent evt)
{ {
MultipartMechanical.INSTANCE = new MultipartMechanical(); MultipartMechanical.INSTANCE = new MultipartMechanical();
Settings.setModMetadata(metadata, ID, NAME); Settings.setModMetadata(metadata, ID, NAME, ResonantInduction.ID);
proxy.init(); proxy.init();
} }

View file

@ -5,6 +5,7 @@ import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
@ -52,7 +53,7 @@ public class ResonantInduction
{ {
/** Mod Information */ /** Mod Information */
public static final String ID = "ResonantInduction|Core"; public static final String ID = "ResonantInduction|Core";
public static final String NAME = Reference.NAME + " Core"; public static final String NAME = Reference.NAME;
@Instance(ID) @Instance(ID)
public static ResonantInduction INSTANCE; public static ResonantInduction INSTANCE;
@ -119,6 +120,7 @@ public class ResonantInduction
// GameRegistry.registerTileEntity(TileMaterial.class, "ri_material"); // GameRegistry.registerTileEntity(TileMaterial.class, "ri_material");
GameRegistry.registerTileEntity(TileFluidMixture.class, "ri_fluid_mixture"); GameRegistry.registerTileEntity(TileFluidMixture.class, "ri_fluid_mixture");
proxy.preInit(); proxy.preInit();
TabRI.ITEMSTACK = new ItemStack(blockMachinePart);
} }
@EventHandler @EventHandler

View file

@ -76,6 +76,11 @@ public class Settings
} }
public static void setModMetadata(ModMetadata metadata, String id, String name) 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.modId = id;
metadata.name = name; metadata.name = name;
@ -85,6 +90,7 @@ public class Settings
metadata.version = Reference.VERSION + "." + Reference.BUILD_VERSION; metadata.version = Reference.VERSION + "." + Reference.BUILD_VERSION;
metadata.authorList = Arrays.asList(new String[] { "Calclavia", "DarkCow" }); metadata.authorList = Arrays.asList(new String[] { "Calclavia", "DarkCow" });
metadata.credits = LanguageUtility.getLocal("meta.resonantinduction.credits"); metadata.credits = LanguageUtility.getLocal("meta.resonantinduction.credits");
metadata.parent = parent;
metadata.autogenerated = false; metadata.autogenerated = false;
} }