diff --git a/src/dark/common/debug/TileEntityInfLoad.java b/src/dark/common/debug/TileEntityInfLoad.java index b74d66583..d751ed47d 100644 --- a/src/dark/common/debug/TileEntityInfLoad.java +++ b/src/dark/common/debug/TileEntityInfLoad.java @@ -20,7 +20,7 @@ public class TileEntityInfLoad extends TileEntity implements IElectrical { if(receive != null) { - System.out.print("Burning off "+receive.getWatts()+" watts of energy"); + System.out.println("Burning off "+receive.getWatts()+" watts of energy"); } return this.canConnect(from) && receive != null ? receive.getWatts() : 0; } diff --git a/src/dark/common/transmit/BlockWire.java b/src/dark/common/transmit/BlockWire.java index 094d87ef8..27749925b 100644 --- a/src/dark/common/transmit/BlockWire.java +++ b/src/dark/common/transmit/BlockWire.java @@ -1,6 +1,25 @@ package dark.common.transmit; -public class BlockWire +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.Configuration; +import dark.core.blocks.BlockMachine; + +public class BlockWire extends BlockMachine { + public BlockWire(Configuration config, int blockID) + { + super("DMWire", config, blockID, Material.cloth); + this.setCreativeTab(CreativeTabs.tabRedstone); + this.setBlockBounds(0, 0, 0, 1, .3f, 1); + } + + @Override + public TileEntity createNewTileEntity(World world) + { + return new TileEntityWire(); + } } diff --git a/src/dark/core/CoreRecipeLoader.java b/src/dark/core/CoreRecipeLoader.java index 20eb63e11..e678db027 100644 --- a/src/dark/core/CoreRecipeLoader.java +++ b/src/dark/core/CoreRecipeLoader.java @@ -4,25 +4,28 @@ import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; +import dark.core.RecipeLoader.RecipeGrid; import dark.core.items.EnumMeterials; import dark.core.items.EnumOreParts; +import dark.core.items.ItemTools; import dark.core.items.ItemWrench; public class CoreRecipeLoader extends RecipeLoader { /* BLOCKS */ - public static Block blockOre, blockDebug; + public static Block blockOre, blockDebug, blockWire; /* ITEMS */ - public static Item itemMetals; + public static Item itemMetals, battery, itemTool; public static ItemWrench wrench; - public static Item battery; @Override public void loadRecipes() { super.loadRecipes(); + new RecipeGrid(new ItemStack(itemTool, 1, 0), 3, 2).setRowOne("ironTube", "valvePart", "ironTube").setRowTwo(null, "ironTube", null).RegisterRecipe(); + loadSmeltingRecipes(); } diff --git a/src/dark/core/DarkMain.java b/src/dark/core/DarkMain.java index 40999d2ab..a5572ba91 100644 --- a/src/dark/core/DarkMain.java +++ b/src/dark/core/DarkMain.java @@ -25,6 +25,8 @@ import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import dark.common.debug.BlockDebug; import dark.common.debug.BlockDebug.debugBlocks; +import dark.common.transmit.BlockWire; +import dark.common.transmit.TileEntityWire; import dark.core.blocks.BlockMulti; import dark.core.blocks.BlockOre; import dark.core.blocks.TileEntityMulti; @@ -34,6 +36,7 @@ import dark.core.items.ItemBattery; import dark.core.items.ItemBlockHolder; import dark.core.items.ItemOre; import dark.core.items.ItemOreDirv; +import dark.core.items.ItemTools; import dark.core.items.ItemWrench; /** @author HangCow, DarkGuardsman */ @@ -104,6 +107,24 @@ public class DarkMain extends ModPrefab if (CoreRecipeLoader.blockOre != null) { GameRegistry.registerBlock(CoreRecipeLoader.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); + } + } + } + } + if (CoreRecipeLoader.blockWire != null) + { + GameRegistry.registerBlock(CoreRecipeLoader.blockWire, ItemBlockHolder.class, "DMWire"); + GameRegistry.registerTileEntity(TileEntityWire.class, "DMWire"); } if (CoreRecipeLoader.blockDebug != null) { @@ -113,23 +134,10 @@ public class DarkMain extends ModPrefab GameRegistry.registerTileEntity(debugBlocks.values()[i].clazz, "DMDebug" + i); } } + //TODO look at possibility of having this only be enabled if needed but still no option to disable manually GameRegistry.registerBlock(blockMulti, "multiBlock"); - GameRegistry.registerTileEntity(TileEntityMulti.class, "DMMultiBlock"); - 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(); } @@ -156,18 +164,15 @@ public class DarkMain extends ModPrefab CONFIGURATION.load(); /* BLOCKS */ blockMulti = new BlockMulti(DarkMain.CONFIGURATION.getBlock("MultiBlock", getNextID()).getInt()); - if (CONFIGURATION.get("general", "EnableBattery", true).getBoolean(true)) - { - CoreRecipeLoader.battery = new ItemBattery("Battery", ITEM_ID_PREFIX++); - } - if (CONFIGURATION.get("general", "EnableWrench", true).getBoolean(true)) - { - CoreRecipeLoader.wrench = new ItemWrench(ITEM_ID_PREFIX++, DarkMain.CONFIGURATION); - } + if (CONFIGURATION.get("general", "LoadOre", true).getBoolean(true)) { CoreRecipeLoader.blockOre = new BlockOre(getNextID(), CONFIGURATION); } + if (CONFIGURATION.get("general", "EnableWires", true).getBoolean(true)) + { + CoreRecipeLoader.blockWire = new BlockWire(CONFIGURATION, getNextID()); + } if (CONFIGURATION.get("general", "enableDebugBlocks", false).getBoolean(false)) { CoreRecipeLoader.blockDebug = new BlockDebug(getNextID(), CONFIGURATION); @@ -177,6 +182,18 @@ public class DarkMain extends ModPrefab { CoreRecipeLoader.itemMetals = new ItemOreDirv(ITEM_ID_PREFIX++, CONFIGURATION); } + if (CONFIGURATION.get("general", "EnableBattery", true).getBoolean(true)) + { + CoreRecipeLoader.battery = new ItemBattery("Battery", ITEM_ID_PREFIX++); + } + if (CONFIGURATION.get("general", "EnableWrench", true).getBoolean(true)) + { + CoreRecipeLoader.wrench = new ItemWrench(ITEM_ID_PREFIX++, DarkMain.CONFIGURATION); + } + if (CONFIGURATION.get("general", "EnableWrench", true).getBoolean(true)) + { + CoreRecipeLoader.itemTool = new ItemTools(ITEM_ID_PREFIX++, DarkMain.CONFIGURATION); + } CONFIGURATION.save(); /* CONFIG END */ diff --git a/src/dark/core/items/ItemTools.java b/src/dark/core/items/ItemTools.java index 65f774d53..b29c55f97 100644 --- a/src/dark/core/items/ItemTools.java +++ b/src/dark/core/items/ItemTools.java @@ -1,6 +1,5 @@ package dark.core.items; -import java.util.HashMap; import java.util.List; import net.minecraft.creativetab.CreativeTabs; @@ -82,7 +81,7 @@ public class ItemTools extends ItemBasic FluidTankInfo[] tanks = ((IFluidHandler) tileEntity).getTankInfo(ForgeDirection.getOrientation(side)); if (tanks != null) { - player.sendChatToPlayer(ChatMessageComponent.func_111066_d("FluidHandler> Side:"+ForgeDirection.getOrientation(side).toString()+" Tanks:" + tanks.length)); + player.sendChatToPlayer(ChatMessageComponent.func_111066_d("FluidHandler> Side:" + ForgeDirection.getOrientation(side).toString() + " Tanks:" + tanks.length)); for (FluidStack stack : FluidHelper.getFluidList(tanks)) { player.sendChatToPlayer(ChatMessageComponent.func_111066_d("Fluid>" + stack.amount + "mb of " + stack.getFluid().getName()));