Merged TheDarkMachine into core

At first i was going to keep the core as a simple loader but seeing that
need for content out of my DarkMachine mod i merged the two. This will
cause a bit of extra stuff for the player to deal with. However, i did
add configs to disable the ore and ore Items from the mod.
This commit is contained in:
DarkGuardsman 2013-07-21 23:43:56 -04:00
parent 609954e058
commit bb0d5b6fad
171 changed files with 1097 additions and 168 deletions

BIN
models/WIP/battery box.tcn Normal file

Binary file not shown.

BIN
models/WIP/battery.tcn Normal file

Binary file not shown.

BIN
models/WIP/coilSide.tcn Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
models/WIP/switch down.tcn Normal file

Binary file not shown.

Binary file not shown.

BIN
models/laserTransmitter.tcn Normal file

Binary file not shown.

View file

@ -0,0 +1,109 @@
# FluidMechanics Language Properties
# @author DarkGuardsman
item.dark\:WoodDust.name = Wood Dust
item.dark\:WoodPlate.name = Plank
item.dark\:WoodGears.name = Wooden Gears
item.dark\:WoodTube.name = Wooden Tube
item.dark\:WoodScraps.name = Wood Fragments
item.dark\:StoneRubble.name = Stone Cobble
item.dark\:StoneDust.name = Stone Dust
item.dark\:StonePlate.name = Stone Sheet
item.dark\:StoneGears.name = Stone Gears
item.dark\:StoneTube.name = Stone Tube
item.dark\:StoneRod.name = Stone Rod
item.dark\:StoneScraps.name = Stone Shards
item.dark\:CopperRubble.name = Copper Rubble
item.dark\:CopperDust.name = Copper Dust
item.dark\:CopperIngot.name = Copper Ingot
item.dark\:CopperPlate.name = Copper Plate
item.dark\:CopperGears.name = Copper Gears
item.dark\:CopperTube.name = Copper Tube
item.dark\:CopperRod.name = Copper Rod
item.dark\:CopperScraps.name = Copper Fragments
item.dark\:TinRubble.name = Tin Rubble
item.dark\:TinDust.name = Tin Dust
item.dark\:TinIngot.name = Tin Ingot
item.dark\:TinPlate.name = Tin Plate
item.dark\:TinTube.name = Tin Tube
item.dark\:TinRod.name = Tin Rod
item.dark\:TinScraps.name = Tin Fragments
item.dark\:IronRubble.name = Iron Rubble
item.dark\:IronDust.name = Iron Dust
item.dark\:IronIngot.name = Iron Ingot
item.dark\:IronPlate.name = Iron Plate
item.dark\:IronGears.name = Iron Gears
item.dark\:IronTube.name = Iron Tube
item.dark\:IronRod.name = Iron Rod
item.dark\:IronScraps.name = Iron Fragments
item.dark\:ObbyRubble.name = Obby Chunks
item.dark\:ObbyDust.name = Obby Dust
item.dark\:ObbyIngot.name = Obby Brick
item.dark\:ObbyPlate.name = Obby Sheet
item.dark\:ObbyGears.name = Obby Gears
item.dark\:ObbyTube.name = Obby Tube
item.dark\:ObbyRod.name = Obby Rod
item.dark\:ObbyScraps.name = Obby Shards
item.dark\:LeadRubble.name = Lead Rubble
item.dark\:LeadDust.name = Lead Dust
item.dark\:LeadIngot.name = Lead Ingot
item.dark\:LeadPlate.name = Lead Plate
item.dark\:LeadTube.name = Lead Tube
item.dark\:LeadRod.name = Lead Rod
item.dark\:LeadScraps.name = Lead Fragments
item.dark\:AluminumRubble.name = Bauxite Rocks
item.dark\:AluminumDust.name = Bauxite dust
item.dark\:AluminumIngot.name = Aluminum Ingot
item.dark\:AluminumPlate.name = Aluminum Plate
item.dark\:AluminumRod.name = Aluminum Rod
item.dark\:AluminumScraps.name = Aluminum Fragments
item.dark\:SilverRubble.name = Silver Rubble
item.dark\:SilverDust.name = Silver Dust
item.dark\:SilverIngot.name = Silver Ingot
item.dark\:SilverPlate.name = Silver Plate
item.dark\:SilverTube.name = Silver Tube
item.dark\:SilverRod.name = Silver Rod
item.dark\:SilverScraps.name = Silver Fragments
item.dark\:GoldRubble.name = Gold Rubble
item.dark\:GoldDust.name = Gold Dust
item.dark\:GoldIngot.name = Gold Ingot
item.dark\:GoldPlate.name = Gold Plate
item.dark\:GoldTube.name = Gold Tube
item.dark\:GoldRod.name = Gold Rod
item.dark\:GoldScraps.name = Gold Fragments
item.dark\:CoalDust.name = Coal Dust
item.dark\:CoalIngot.name = Coal Brick
item.dark\:SteelRubble.name = Steel Rubble
item.dark\:SteelDust.name = Steel Dust
item.dark\:SteelIngot.name = Steel Ingot
item.dark\:SteelPlate.name = Steel Plate
item.dark\:SteelGears.name = Steel Gears
item.dark\:SteelTube.name = Steel Tube
item.dark\:SteelRod.name = Steel Rod
item.dark\:SteelScraps.name = Steel Fragments
item.dark\:BronzeRubble.name = Bronze Rubble
item.dark\:BronzeDust.name = Bronze Dust
item.dark\:BronzeIngot.name = Bronze Ingot
item.dark\:BronzePlate.name = Bronze Plate
item.dark\:BronzeGears.name = Bronze Gears
item.dark\:BronzeTube.name = Bronze Tube
item.dark\:BronzeRod.name = Bronze Rod
item.dark\:BronzeScraps.name = Bronze Fragments
tile.dark\:CopperOre.name = Copper Ore
tile.dark\:TinOre.name = Tin Ore
tile.dark\:LeadOre.name = Lead Ore
tile.dark\:AluminumOre.name = Bauxite Stone
tile.dark\:SilverOre.name = Silver Ore

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
public enum ColorCode

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
public interface IColorCoded
{

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
/** This class should be applied to all tile entities (mainly machines) that can be disabled (by
* things like EMP, short circuit etc.).

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
import net.minecraftforge.common.ForgeDirection;

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
import net.minecraftforge.common.ForgeDirection;

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
import java.util.List;

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
public interface IScroll
{

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
import java.util.List;

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
import java.util.List;

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection;

View file

@ -1,4 +1,4 @@
package dark.core.api;
package dark.api;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.ForgeDirection;

View file

@ -1,29 +1,28 @@
package dark.core.api;
package dark.api;
import cpw.mods.fml.common.Loader;
public enum PowerSystems
{
INDUSTRIALCRAFT("IC2"), MEKANISM("Mekanism"), BUILDCRAFT("BuildCraft|Energy");
INDUSTRIALCRAFT("IC2"),
MEKANISM("Mekanism"),
BUILDCRAFT("BuildCraft|Energy");
public String id;
public static final PowerSystems[] UE_SUPPORTED_SYSTEMS = new PowerSystems[] { INDUSTRIALCRAFT, MEKANISM, BUILDCRAFT };
private PowerSystems(String id)
{
this.id = id;
}
public static float BC3_RATIO = 100;
public static float TO_BC_RATIO = 1 / BC3_RATIO;
private static boolean init = false;
private static Boolean[] loaded;
/**
* Checks to see if something can run powerless based on mods loaded
/** Checks to see if something can run powerless based on mods loaded
*
* @param optional - power system that the device can use
* @return true if free power is to be generated
*/
* @return true if free power is to be generated */
public static boolean runPowerLess(PowerSystems... optional)
{
for (int i = 0; i < optional.length; i++)
@ -36,9 +35,7 @@ public enum PowerSystems
return true;
}
/**
* Check to see if one of the mods listed in the PowerSystem enum is loaded
*/
/** Check to see if one of the mods listed in the PowerSystem enum is loaded */
public static boolean isPowerSystemLoaded(PowerSystems power, boolean force)
{
if (!init || force)

View file

@ -9,6 +9,8 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.world.WorldEvent;
import universalelectricity.prefab.network.PacketManager;
import universalelectricity.prefab.ore.OreGenReplaceStone;
import universalelectricity.prefab.ore.OreGenerator;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
@ -21,9 +23,15 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
import cpw.mods.fml.common.network.NetworkMod;
import dark.core.hydraulic.helpers.FluidRestrictionHandler;
import dark.library.machine.BlockMulti;
import cpw.mods.fml.common.registry.GameRegistry;
import dark.core.items.parts.BlockOre;
import dark.core.items.parts.EnumMeterials;
import dark.core.items.parts.ItemOre;
import dark.core.items.parts.ItemOreDirv;
import dark.core.recipes.RecipeManager;
import dark.helpers.FluidRestrictionHandler;
import dark.library.saving.SaveManager;
import dark.prefab.machine.BlockMulti;
/** @author HangCow, DarkGuardsman */
@Mod(modid = DarkMain.MOD_ID, name = DarkMain.MOD_NAME, version = DarkMain.VERSION, useMetadata = true)
@ -51,6 +59,7 @@ public class DarkMain extends ModPrefab
/** Main config file */
public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir(), "Dark/General.cfg"));
private static final String[] LANGUAGES_SUPPORTED = new String[] { "en_US" };
/** Can over pressure of devices do area damage */
public static boolean overPressureDamage;
/** Main mod output to console */
@ -69,6 +78,7 @@ public class DarkMain extends ModPrefab
@Override
public void preInit(FMLPreInitializationEvent event)
{
super.preInit(event);
LOGGER.setParent(FMLLog.getLogger());
LOGGER.info("Initializing...");
@ -76,7 +86,7 @@ public class DarkMain extends ModPrefab
MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(new FluidRestrictionHandler());
this.loadConfig();
proxy.preInit();
}
@ -85,14 +95,33 @@ public class DarkMain extends ModPrefab
@Override
public void init(FMLInitializationEvent event)
{
proxy.init();
super.init(event);
GameRegistry.registerBlock(RecipeManager.blockOre, ItemOre.class, "DMOre");
BlockOre.regiserOreNames();
for (int i = 0; i < EnumMeterials.values().length; i++)
{
if (EnumMeterials.values()[i].doWorldGen)
{
OreGenReplaceStone gen = EnumMeterials.values()[i].getGeneratorSettings();
if (gen != null && gen.shouldGenerate)
{
OreGenerator.addOre(gen);
}
}
}
proxy.init();
}
@EventHandler
@Override
public void postInit(FMLPostInitializationEvent event)
{
super.postInit(event);
RecipeManager.loadRecipes();
proxy.postInit();
}
@ -102,14 +131,23 @@ public class DarkMain extends ModPrefab
{
/* CONFIGS */
CONFIGURATION.load();
/* BLOCKS */
DarkMain.blockMulti = new BlockMulti(DarkMain.CONFIGURATION.getBlock("RestrictedPipes", BLOCK_ID_PREFIX++).getInt());
if (CONFIGURATION.get("general", "LoadOre", true).getBoolean(true))
{
RecipeManager.blockOre = new BlockOre(BLOCK_ID_PREFIX++, CONFIGURATION);
}
/* ITEMS */
if (CONFIGURATION.get("general", "LoadOreItems", true).getBoolean(true))
{
RecipeManager.itemMetals = new ItemOreDirv(ITEM_ID_PREFIX++, CONFIGURATION);
}
if (CONFIGURATION.hasChanged())
{
CONFIGURATION.save();
}
/* CONFIG END */
proxy.preInit();
}
@Override
@ -118,7 +156,7 @@ public class DarkMain extends ModPrefab
/* MCMOD.INFO FILE BUILDER? */
meta.modId = MOD_ID;
meta.name = MOD_NAME;
meta.description = "Main mod for several of the mods created by DarkGuardsman and his team. Doesn't add much of anything by itself but is needed for several mods to function correctly";
meta.description = "Main mod for several of the mods created by DarkGuardsman and his team. Adds basic features, functions, ores, items, and blocks";
meta.url = "www.BuiltBroken.com";
meta.logoFile = TEXTURE_DIRECTORY + "GP_Banner.png";

View file

@ -1,5 +1,9 @@
package dark.core;
import net.minecraftforge.common.Configuration;
import org.modstats.Modstats;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
@ -31,12 +35,16 @@ public abstract class ModPrefab
{
DOMAIN = domain;
this.loadModMeta();
/* UPDATE NOTIFIER */
Modstats.instance().getReporter().registerMod(this);
this.loadConfig();
/* CONFIG END */
}
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
this.loadConfig();
}
@EventHandler

View file

@ -0,0 +1,24 @@
package dark.core;
public class ServerLoad
{
public void preInit()
{
// TODO Auto-generated method stub
}
public void Init()
{
// TODO Auto-generated method stub
}
public void postInit()
{
// TODO Auto-generated method stub
}
}

View file

@ -0,0 +1,8 @@
package dark.core.client;
import dark.core.ServerLoad;
public class ClientLoad extends ServerLoad
{
}

View file

@ -0,0 +1,18 @@
package dark.core.items;
import net.minecraft.item.Item;
import net.minecraft.util.Icon;
import net.minecraftforge.common.Configuration;
import dark.core.DarkMain;
public class ItemBasic extends Item
{
public static final Icon[] ICONS = new Icon[256];
public ItemBasic(int itemID, String name, Configuration config)
{
super(config.getItem(name, itemID).getInt());
this.setUnlocalizedName(DarkMain.instance.PREFIX + name);
}
}

Some files were not shown because too many files have changed in this diff Show more