From ea3883d7c7579ff6cfe7e1f80588e9544c9dac62 Mon Sep 17 00:00:00 2001 From: DarkGuardsman Date: Wed, 18 Dec 2013 14:54:41 -0500 Subject: [PATCH] Clean up and import changes --- .gitmodules | 3 +++ Built-Broken-Lib | 2 +- CoreLibrary | 1 + bin/GitSync.bat | 5 ++++- src/dark/api/DataPack.java | 4 ++-- src/dark/api/IItemAirSupply.java | 18 ------------------ src/dark/api/ITerminal.java | 4 ++-- src/dark/core/CoreMachine.java | 7 ++++--- src/dark/core/basics/BlockGasOre.java | 6 ++++-- src/dark/core/basics/BlockOre.java | 4 ++-- src/dark/core/basics/ItemCommonTool.java | 6 +++--- src/dark/core/basics/ItemOreDirv.java | 11 ++++++----- src/dark/core/basics/ItemParts.java | 11 ++++++----- src/dark/core/prefab/ModPrefab.java | 2 -- .../core/prefab/entities/ItemVehicleSpawn.java | 10 ++++++---- src/dark/core/prefab/invgui/GuiBar.java | 9 ++++++--- .../core/prefab/invgui/GuiButtonImage.java | 4 +++- src/dark/core/prefab/invgui/GuiMessageBox.java | 4 +++- src/dark/core/prefab/machine/BlockMachine.java | 18 +++--------------- src/dark/core/prefab/machine/BlockMulti.java | 4 ++-- .../machine/TileEntityEnergyMachine.java | 5 +++-- .../core/prefab/machine/TileEntityInv.java | 14 +++++++------- .../core/prefab/sentry/BlockSentryGun.java | 4 ++-- .../core/prefab/terminal/CommandRegistry.java | 4 ++-- src/dark/core/prefab/terminal/CommandUser.java | 4 ++-- .../prefab/terminal/TileEntityTerminal.java | 1 - src/dark/machines/DarkMain.java | 10 ++++++---- src/dark/machines/client/ClientProxy.java | 8 +++++--- src/dark/machines/client/FXBeam.java | 12 +++++++----- .../machines/client/gui/GuiBatteryBox.java | 5 ++++- .../machines/client/gui/GuiMachineBase.java | 6 ++++-- .../client/renders/BlockRenderingHandler.java | 5 +++-- .../client/renders/ItemRenderFluidCan.java | 4 +++- .../client/renders/RenderBlockSolarPanel.java | 4 +++- .../client/renders/RenderSteamGen.java | 7 ++++--- .../machines/client/renders/RenderTestCar.java | 4 +++- src/dark/machines/deco/BlockBasalt.java | 6 ++++-- src/dark/machines/deco/BlockColorGlass.java | 6 ++++-- src/dark/machines/deco/BlockColorSand.java | 6 ++++-- .../generators/BlockSmallSteamGen.java | 7 ++++--- .../machines/generators/BlockSolarPanel.java | 4 ++-- src/dark/machines/items/ItemBattery.java | 11 ++++++----- src/dark/machines/items/ItemColoredDust.java | 6 ++++-- src/dark/machines/items/ItemFluidCan.java | 8 +++++--- src/dark/machines/items/ItemReadoutTools.java | 6 ++++-- src/dark/machines/items/ItemWrench.java | 9 +++++---- src/dark/machines/machines/BlockDebug.java | 4 ++-- src/dark/machines/transmit/BlockWire.java | 4 ++-- 48 files changed, 165 insertions(+), 142 deletions(-) create mode 160000 CoreLibrary delete mode 100644 src/dark/api/IItemAirSupply.java diff --git a/.gitmodules b/.gitmodules index c25862fe..498871ab 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "Built-Broken-Lib"] path = Built-Broken-Lib url = https://github.com/DarkGuardsman/Built-Broken-Lib.git +[submodule "CoreLibrary"] + path = CoreLibrary + url = https://github.com/DarksCoreMachine/CoreLibrary.git diff --git a/Built-Broken-Lib b/Built-Broken-Lib index d406da10..1bf4e4b3 160000 --- a/Built-Broken-Lib +++ b/Built-Broken-Lib @@ -1 +1 @@ -Subproject commit d406da107e1f2f97584e97fff9534b890b282570 +Subproject commit 1bf4e4b364dc01ff8634156e9cb0750769d21bc6 diff --git a/CoreLibrary b/CoreLibrary new file mode 160000 index 00000000..7449c785 --- /dev/null +++ b/CoreLibrary @@ -0,0 +1 @@ +Subproject commit 7449c78567876047b6b427c6297a45e46e4689d7 diff --git a/bin/GitSync.bat b/bin/GitSync.bat index 4a5850cb..9ac6b006 100644 --- a/bin/GitSync.bat +++ b/bin/GitSync.bat @@ -1,5 +1,5 @@ rem set defaults: -set "com=Auto-Sync" +set "com=Clean up and import changes" rem set parameters: IF NOT "a%1"=="a" (set "com=%1") @@ -23,6 +23,9 @@ cd ..\ cd GreaterProtection git commit -am "%com%" git push origin master +cd MechanizedMining +git commit -am "%com%" +git push origin master cd ..\ cd Empire-Engine git submodule foreach git pull origin master diff --git a/src/dark/api/DataPack.java b/src/dark/api/DataPack.java index 9be53ea1..e54d01f9 100644 --- a/src/dark/api/DataPack.java +++ b/src/dark/api/DataPack.java @@ -1,10 +1,10 @@ package dark.api; +import net.minecraft.nbt.NBTTagCompound; + import com.dark.save.ISaveObj; import com.dark.save.NBTFileHelper; -import net.minecraft.nbt.NBTTagCompound; - /** Wrapper for data to be sent threw a network to a device * * @author DarkGuardsman */ diff --git a/src/dark/api/IItemAirSupply.java b/src/dark/api/IItemAirSupply.java deleted file mode 100644 index f650165a..00000000 --- a/src/dark/api/IItemAirSupply.java +++ /dev/null @@ -1,18 +0,0 @@ -package dark.api; - -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; - -/** Item that supplies air to an entity and prevents them from dying when under water, in gas, or - * without air. - * - * @author DarkGuardsman */ -public interface IItemAirSupply -{ - /** Called when the entity is found to be in an area were the entity has no air. Does not work - * with vinalla blocks or blocks from other mods. To support other mods simply do a per tick - * update of the item and supply the entity with air. The reason for this method is to prevent - * potion effects from gas poisoning or potion effects from sucking in fluids */ - public boolean canSupplyAir(Entity entity, ItemStack stack); - -} diff --git a/src/dark/api/ITerminal.java b/src/dark/api/ITerminal.java index 5c9b36fd..6eda0ab6 100644 --- a/src/dark/api/ITerminal.java +++ b/src/dark/api/ITerminal.java @@ -2,10 +2,10 @@ package dark.api; import java.util.List; +import net.minecraft.entity.player.EntityPlayer; + import com.dark.access.ISpecialAccess; - -import net.minecraft.entity.player.EntityPlayer; import dark.core.interfaces.IScroll; /** Basic methods to make it easier to construct or interact with a terminal based tile. Recommend to diff --git a/src/dark/core/CoreMachine.java b/src/dark/core/CoreMachine.java index f75cbc70..6223eaba 100644 --- a/src/dark/core/CoreMachine.java +++ b/src/dark/core/CoreMachine.java @@ -1,12 +1,13 @@ package dark.core; +import net.minecraftforge.common.MinecraftForge; +import universalelectricity.compatibility.Compatibility; +import universalelectricity.core.UniversalElectricity; + import com.dark.ExternalModHandler; import com.dark.ModObjectRegistry; import com.dark.save.SaveManager; -import net.minecraftforge.common.MinecraftForge; -import universalelectricity.compatibility.Compatibility; -import universalelectricity.core.UniversalElectricity; import cpw.mods.fml.common.registry.TickRegistry; import cpw.mods.fml.relauncher.Side; import dark.core.prefab.LaserEntityDamageSource; diff --git a/src/dark/core/basics/BlockGasOre.java b/src/dark/core/basics/BlockGasOre.java index dff0fef6..1b886068 100644 --- a/src/dark/core/basics/BlockGasOre.java +++ b/src/dark/core/basics/BlockGasOre.java @@ -20,10 +20,12 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidBlock; import universalelectricity.core.vector.Vector3; + +import com.dark.DarkCore; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.core.DMCreativeTab; -import dark.core.prefab.ModPrefab; import dark.core.prefab.fluids.EnumGas; import dark.machines.DarkMain; @@ -40,7 +42,7 @@ public class BlockGasOre extends Block implements IFluidBlock public BlockGasOre() { - super(DarkMain.CONFIGURATION.getBlock("GasBlock", ModPrefab.getNextID()).getInt(), gas); + super(DarkMain.CONFIGURATION.getBlock("GasBlock", DarkCore.getNextID()).getInt(), gas); this.setUnlocalizedName("DMBlockGas"); this.setCreativeTab(DMCreativeTab.tabIndustrial()); this.setTickRandomly(true); diff --git a/src/dark/core/basics/BlockOre.java b/src/dark/core/basics/BlockOre.java index 1bb3258c..d4147861 100644 --- a/src/dark/core/basics/BlockOre.java +++ b/src/dark/core/basics/BlockOre.java @@ -17,11 +17,11 @@ import net.minecraftforge.oredict.OreDictionary; import universalelectricity.prefab.ore.OreGenReplaceStone; import com.builtbroken.common.Pair; +import com.dark.DarkCore; import com.dark.IExtraInfo.IExtraBlockInfo; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import dark.core.prefab.ModPrefab; import dark.machines.CoreRecipeLoader; import dark.machines.DarkMain; @@ -31,7 +31,7 @@ public class BlockOre extends Block implements IExtraBlockInfo public BlockOre() { - super(DarkMain.CONFIGURATION.getBlock("Ore", ModPrefab.getNextID()).getInt(), Material.rock); + super(DarkMain.CONFIGURATION.getBlock("Ore", DarkCore.getNextID()).getInt(), Material.rock); this.setCreativeTab(CreativeTabs.tabBlock); this.setUnlocalizedName(DarkMain.getInstance().PREFIX + "Ore"); this.setHardness(2.5f); diff --git a/src/dark/core/basics/ItemCommonTool.java b/src/dark/core/basics/ItemCommonTool.java index d7ddbbd7..6c2028b2 100644 --- a/src/dark/core/basics/ItemCommonTool.java +++ b/src/dark/core/basics/ItemCommonTool.java @@ -31,17 +31,17 @@ import net.minecraftforge.event.Event.Result; import net.minecraftforge.event.entity.player.UseHoeEvent; import net.minecraftforge.oredict.OreDictionary; +import com.dark.DarkCore; import com.dark.IExtraInfo.IExtraItemInfo; import com.google.common.collect.Multimap; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; /** Flexible tool class that uses NBT to store damage and effect rather than metadata. Metadata * instead is used to store sub items allowing several different tools to exist within the same item - * + * * @author DarkGuardsman */ public class ItemCommonTool extends Item implements IExtraItemInfo { @@ -54,7 +54,7 @@ public class ItemCommonTool extends Item implements IExtraItemInfo public ItemCommonTool() { - super(DarkMain.CONFIGURATION.getItem("Items", "CommonTools", ModPrefab.getNextItemId()).getInt()); + super(DarkMain.CONFIGURATION.getItem("Items", "CommonTools", DarkCore.getNextItemId()).getInt()); this.maxStackSize = 1; this.setCreativeTab(CreativeTabs.tabTools); } diff --git a/src/dark/core/basics/ItemOreDirv.java b/src/dark/core/basics/ItemOreDirv.java index 360502c9..bf9bc583 100644 --- a/src/dark/core/basics/ItemOreDirv.java +++ b/src/dark/core/basics/ItemOreDirv.java @@ -2,8 +2,6 @@ package dark.core.basics; import java.util.List; -import com.dark.IExtraInfo.IExtraItemInfo; - import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -12,21 +10,24 @@ import net.minecraft.util.Icon; import net.minecraftforge.common.Configuration; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.oredict.OreDictionary; + +import com.dark.DarkCore; +import com.dark.IExtraInfo.IExtraItemInfo; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.api.events.LaserEvent; import dark.core.prefab.ItemBasic; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; /** A series of items that are derived from a basic material - * + * * @author DarkGuardsman */ public class ItemOreDirv extends ItemBasic implements IExtraItemInfo { public ItemOreDirv() { - super(ModPrefab.getNextItemId(), "Metal_Parts", DarkMain.CONFIGURATION); + super(DarkCore.getNextItemId(), "Metal_Parts", DarkMain.CONFIGURATION); this.setHasSubtypes(true); this.setCreativeTab(CreativeTabs.tabMaterials); } diff --git a/src/dark/core/basics/ItemParts.java b/src/dark/core/basics/ItemParts.java index aa68dabb..7ef36781 100644 --- a/src/dark/core/basics/ItemParts.java +++ b/src/dark/core/basics/ItemParts.java @@ -2,29 +2,30 @@ package dark.core.basics; import java.util.List; -import com.dark.IExtraInfo.IExtraItemInfo; - import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraftforge.common.Configuration; import net.minecraftforge.oredict.OreDictionary; + +import com.dark.DarkCore; +import com.dark.IExtraInfo.IExtraItemInfo; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.core.prefab.ItemBasic; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; /** A meta data item containing parts of various crafting recipes. These parts do not do anything but * allow new crafting recipes to be created. - * + * * @author DarkGuardsman */ public class ItemParts extends ItemBasic implements IExtraItemInfo { public ItemParts() { - super(ModPrefab.getNextItemId(), "DMParts", DarkMain.CONFIGURATION); + super(DarkCore.getNextItemId(), "DMParts", DarkMain.CONFIGURATION); this.setHasSubtypes(true); this.setMaxDamage(0); this.setMaxStackSize(64); diff --git a/src/dark/core/prefab/ModPrefab.java b/src/dark/core/prefab/ModPrefab.java index 0440ffad..2aa2490c 100644 --- a/src/dark/core/prefab/ModPrefab.java +++ b/src/dark/core/prefab/ModPrefab.java @@ -3,8 +3,6 @@ package dark.core.prefab; import java.util.Calendar; import java.util.Date; -import net.minecraft.block.Block; -import net.minecraft.item.Item; import net.minecraft.server.MinecraftServer; import net.minecraftforge.common.MinecraftForge; diff --git a/src/dark/core/prefab/entities/ItemVehicleSpawn.java b/src/dark/core/prefab/entities/ItemVehicleSpawn.java index 2f406cde..d212dbb0 100644 --- a/src/dark/core/prefab/entities/ItemVehicleSpawn.java +++ b/src/dark/core/prefab/entities/ItemVehicleSpawn.java @@ -12,17 +12,19 @@ import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; + +import com.dark.DarkCore; + import dark.core.DMCreativeTab; -import dark.core.prefab.ModPrefab; /** Basic item used to spawn a vehicle - * + * * @author DarkGuardsman */ public class ItemVehicleSpawn extends Item { public ItemVehicleSpawn() { - super(ModPrefab.getNextItemId()); + super(DarkCore.getNextItemId()); this.setUnlocalizedName("Vehicle"); this.setCreativeTab(DMCreativeTab.tabIndustrial()); } @@ -41,7 +43,7 @@ public class ItemVehicleSpawn extends Item Vec3 start = world.getWorldVec3Pool().getVecFromPool(lookX, lookY, lookZ); - //Find the vector X blocks away from the player in the same direction as the player is looking + //Find the vector X blocks away from the player in the same direction as the player is looking double searchRange = 5.0D; float deltaX = net.minecraft.util.MathHelper.sin(-playerYaw * 0.017453292F - (float) Math.PI) * -net.minecraft.util.MathHelper.cos(-playerPitch * 0.017453292F); float deltaY = net.minecraft.util.MathHelper.sin(-playerPitch * 0.017453292F); diff --git a/src/dark/core/prefab/invgui/GuiBar.java b/src/dark/core/prefab/invgui/GuiBar.java index 2cf5cebd..e0bbb3d9 100644 --- a/src/dark/core/prefab/invgui/GuiBar.java +++ b/src/dark/core/prefab/invgui/GuiBar.java @@ -10,14 +10,17 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import universalelectricity.core.vector.Vector2; + +import com.dark.DarkCore; + import dark.machines.DarkMain; /** When done should be a prefab that can be used to render a power bar on the screen - * + * * @author DarkGuardsman */ public class GuiBar extends Gui { - public static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.GUI_DIRECTORY + "bar.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.GUI_DIRECTORY + "bar.png"); protected float currentLevel = 0; protected float maxLevel = 10; @@ -45,7 +48,7 @@ public class GuiBar extends Gui } /** Sets the parms for the bar that determ the length of the bar - * + * * @param current - current level of the reading * @param max - max level of the reading; */ public GuiBar setMeter(float current, float max) diff --git a/src/dark/core/prefab/invgui/GuiButtonImage.java b/src/dark/core/prefab/invgui/GuiButtonImage.java index 7b38d7f6..d7a760e0 100644 --- a/src/dark/core/prefab/invgui/GuiButtonImage.java +++ b/src/dark/core/prefab/invgui/GuiButtonImage.java @@ -6,6 +6,8 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.dark.DarkCore; + import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -14,7 +16,7 @@ import dark.machines.DarkMain; @SideOnly(Side.CLIENT) public class GuiButtonImage extends GuiButton { - public static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.GUI_DIRECTORY + "gui_button.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.GUI_DIRECTORY + "gui_button.png"); private ButtonIcon buttonIcon = ButtonIcon.BLANK; diff --git a/src/dark/core/prefab/invgui/GuiMessageBox.java b/src/dark/core/prefab/invgui/GuiMessageBox.java index 57890372..dd029452 100644 --- a/src/dark/core/prefab/invgui/GuiMessageBox.java +++ b/src/dark/core/prefab/invgui/GuiMessageBox.java @@ -5,13 +5,15 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.dark.DarkCore; + import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.FMLCommonHandler; import dark.machines.DarkMain; public class GuiMessageBox extends GuiBase { - public static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.GUI_DIRECTORY + "gui_message_box.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.GUI_DIRECTORY + "gui_message_box.png"); GuiBase returnGuiYes, returnGuiNo; int id; diff --git a/src/dark/core/prefab/machine/BlockMachine.java b/src/dark/core/prefab/machine/BlockMachine.java index 95d53dc7..3fc39fcf 100644 --- a/src/dark/core/prefab/machine/BlockMachine.java +++ b/src/dark/core/prefab/machine/BlockMachine.java @@ -19,8 +19,8 @@ import net.minecraftforge.oredict.OreDictionary; import universalelectricity.prefab.block.BlockTile; import com.builtbroken.common.Pair; +import com.dark.DarkCore; import com.dark.IExtraInfo.IExtraBlockInfo; -import com.dark.ModObjectRegistry.BlockBuildData; import com.dark.access.AccessUser; import com.dark.access.ISpecialAccess; @@ -28,13 +28,12 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.api.tilenetwork.INetworkPart; import dark.core.interfaces.IBlockActivated; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; /** Basic TileEntity Container class designed to be used by generic machines. It is suggested that * each mod using this create there own basic block extending this to reduce need to use build data * per block. - * + * * @author Darkguardsman */ public abstract class BlockMachine extends BlockTile implements IExtraBlockInfo { @@ -44,20 +43,9 @@ public abstract class BlockMachine extends BlockTile implements IExtraBlockInfo public Icon iconInput, iconOutput; - public BlockMachine(BlockBuildData data) - { - super(data.config.getBlock(data.blockName, ModPrefab.getNextID()).getInt(), data.blockMaterial); - this.setUnlocalizedName(data.blockName); - this.setResistance(100f); - if (data.creativeTab != null) - { - this.setCreativeTab(data.creativeTab); - } - } - public BlockMachine(Configuration config, String blockName, Material material) { - super(config.getBlock(blockName, ModPrefab.getNextID()).getInt(), material); + super(config.getBlock(blockName, DarkCore.getNextID()).getInt(), material); this.setUnlocalizedName(blockName); this.setResistance(100f); } diff --git a/src/dark/core/prefab/machine/BlockMulti.java b/src/dark/core/prefab/machine/BlockMulti.java index c2f2aba7..a730ade0 100644 --- a/src/dark/core/prefab/machine/BlockMulti.java +++ b/src/dark/core/prefab/machine/BlockMulti.java @@ -18,11 +18,11 @@ import universalelectricity.core.UniversalElectricity; import universalelectricity.core.vector.Vector3; import com.builtbroken.common.Pair; +import com.dark.DarkCore; import com.dark.IExtraInfo.IExtraBlockInfo; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; public class BlockMulti extends BlockContainer implements IExtraBlockInfo @@ -32,7 +32,7 @@ public class BlockMulti extends BlockContainer implements IExtraBlockInfo public BlockMulti() { - super(DarkMain.CONFIGURATION.getBlock("MultiBlock", ModPrefab.getNextID()).getInt(), UniversalElectricity.machine); + super(DarkMain.CONFIGURATION.getBlock("MultiBlock", DarkCore.getNextID()).getInt(), UniversalElectricity.machine); this.setHardness(0.8F); this.setUnlocalizedName("multiBlock"); this.setChannel(DarkMain.CHANNEL); diff --git a/src/dark/core/prefab/machine/TileEntityEnergyMachine.java b/src/dark/core/prefab/machine/TileEntityEnergyMachine.java index 38308338..49187348 100644 --- a/src/dark/core/prefab/machine/TileEntityEnergyMachine.java +++ b/src/dark/core/prefab/machine/TileEntityEnergyMachine.java @@ -2,8 +2,6 @@ package dark.core.prefab.machine; import java.util.EnumSet; -import com.dark.ExternalModHandler; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -17,6 +15,9 @@ import universalelectricity.core.electricity.ElectricityPack; import universalelectricity.core.grid.IElectricityNetwork; import universalelectricity.core.vector.Vector3; import universalelectricity.core.vector.VectorHelper; + +import com.dark.ExternalModHandler; + import dark.api.IPowerLess; /** Basic energy tile that can consume power diff --git a/src/dark/core/prefab/machine/TileEntityInv.java b/src/dark/core/prefab/machine/TileEntityInv.java index 294374a7..30704d26 100644 --- a/src/dark/core/prefab/machine/TileEntityInv.java +++ b/src/dark/core/prefab/machine/TileEntityInv.java @@ -3,13 +3,6 @@ package dark.core.prefab.machine; import java.util.ArrayList; import java.util.List; -import com.dark.access.AccessGroup; -import com.dark.access.AccessUser; -import com.dark.access.GroupRegistry; -import com.dark.access.ISpecialAccess; -import com.dark.access.Nodes; - - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.ISidedInventory; @@ -19,6 +12,13 @@ import net.minecraft.nbt.NBTTagList; import net.minecraftforge.common.ForgeDirection; import universalelectricity.core.vector.Vector3; import universalelectricity.prefab.tile.TileEntityAdvanced; + +import com.dark.access.AccessGroup; +import com.dark.access.AccessUser; +import com.dark.access.GroupRegistry; +import com.dark.access.ISpecialAccess; +import com.dark.access.Nodes; + import dark.core.interfaces.IExternalInv; import dark.core.interfaces.IInvBox; import dark.core.prefab.invgui.InvChest; diff --git a/src/dark/core/prefab/sentry/BlockSentryGun.java b/src/dark/core/prefab/sentry/BlockSentryGun.java index f7ded669..ac43fb73 100644 --- a/src/dark/core/prefab/sentry/BlockSentryGun.java +++ b/src/dark/core/prefab/sentry/BlockSentryGun.java @@ -16,7 +16,7 @@ import dark.machines.DarkMain; /** Actual block that is the sentry gun. Mainly a place holder as the sentry guns need something to * exist threw that is not an entity. Renders need to still be handled by the respective mod. * Especial item renders as this just creates the block and reservers the meta slot - * + * * @author DarkGuardsman */ public class BlockSentryGun extends BlockMachine { @@ -98,7 +98,7 @@ public class BlockSentryGun extends BlockMachine { ModObjectRegistry.registredBlocks.put(block, "DMSentryGun" + b); ModObjectRegistry.proxy.registerBlock(block, ItemBlockHolder.class, "DMSentryGun" + b, DarkMain.MOD_ID); - ModObjectRegistry.finishCreation(block, null); + ModObjectRegistry.finishCreation(block); sentryBlockIds[b] = block.blockID; } } diff --git a/src/dark/core/prefab/terminal/CommandRegistry.java b/src/dark/core/prefab/terminal/CommandRegistry.java index 4a497997..09436515 100644 --- a/src/dark/core/prefab/terminal/CommandRegistry.java +++ b/src/dark/core/prefab/terminal/CommandRegistry.java @@ -3,10 +3,10 @@ package dark.core.prefab.terminal; import java.util.ArrayList; import java.util.List; +import net.minecraft.entity.player.EntityPlayer; + import com.dark.access.GroupRegistry; - -import net.minecraft.entity.player.EntityPlayer; import dark.api.ITerminal; import dark.api.ITerminalCommand; diff --git a/src/dark/core/prefab/terminal/CommandUser.java b/src/dark/core/prefab/terminal/CommandUser.java index ff7ffe0c..cbad4439 100644 --- a/src/dark/core/prefab/terminal/CommandUser.java +++ b/src/dark/core/prefab/terminal/CommandUser.java @@ -3,10 +3,10 @@ package dark.core.prefab.terminal; import java.util.HashSet; import java.util.Set; +import net.minecraft.entity.player.EntityPlayer; + import com.dark.access.ISpecialAccess; - -import net.minecraft.entity.player.EntityPlayer; import dark.api.ITerminal; import dark.api.ITerminalCommand; diff --git a/src/dark/core/prefab/terminal/TileEntityTerminal.java b/src/dark/core/prefab/terminal/TileEntityTerminal.java index ec30b3fe..ae78659b 100644 --- a/src/dark/core/prefab/terminal/TileEntityTerminal.java +++ b/src/dark/core/prefab/terminal/TileEntityTerminal.java @@ -8,7 +8,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.packet.Packet; import net.minecraft.util.AxisAlignedBB; -import com.dark.access.GroupRegistry; import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.common.network.PacketDispatcher; diff --git a/src/dark/machines/DarkMain.java b/src/dark/machines/DarkMain.java index 131b1651..1e73b044 100644 --- a/src/dark/machines/DarkMain.java +++ b/src/dark/machines/DarkMain.java @@ -4,8 +4,6 @@ import java.awt.Color; import java.io.File; import java.util.Arrays; -import com.dark.ModObjectRegistry; - import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.common.Configuration; @@ -17,6 +15,10 @@ import net.minecraftforge.oredict.OreDictionary; import universalelectricity.prefab.TranslationHelper; import universalelectricity.prefab.ore.OreGenReplaceStone; import universalelectricity.prefab.ore.OreGenerator; + +import com.dark.DarkCore; +import com.dark.ModObjectRegistry; + import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.Loader; @@ -249,7 +251,7 @@ public class DarkMain extends ModPrefab CoreRecipeLoader.itemVehicleTest = ModObjectRegistry.createNewItem("ItemVehicleTest", DarkMain.MOD_ID, ItemVehicleSpawn.class, true); CoreRecipeLoader.itemFluidCan = ModObjectRegistry.createNewItem("ItemFluidCan", DarkMain.MOD_ID, ItemFluidCan.class, true); //Config saves in post init to allow for other feature to access it - + } @Override @@ -261,7 +263,7 @@ public class DarkMain extends ModPrefab 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 = "http://www.universalelectricity.com/coremachine"; - meta.logoFile = TEXTURE_DIRECTORY + "GP_Banner.png"; + meta.logoFile = DarkCore.TEXTURE_DIRECTORY + "GP_Banner.png"; meta.version = VERSION; meta.authorList = Arrays.asList(new String[] { "DarkGuardsman", "HangCow", "Elrath18", "Archadia" }); meta.credits = "Please see the website."; diff --git a/src/dark/machines/client/ClientProxy.java b/src/dark/machines/client/ClientProxy.java index 0660accb..7cdadee9 100644 --- a/src/dark/machines/client/ClientProxy.java +++ b/src/dark/machines/client/ClientProxy.java @@ -7,12 +7,14 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; import universalelectricity.core.vector.Vector3; + +import com.dark.DarkCore; + import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import dark.core.prefab.ModPrefab; import dark.core.prefab.entities.EntityTestCar; import dark.machines.CommonProxy; import dark.machines.CoreRecipeLoader; @@ -27,7 +29,7 @@ public class ClientProxy extends CommonProxy { /** Renders a laser beam from one power to another by a set color for a set time - * + * * @param world - world this laser is to be rendered in * @param position - start vector3 * @param target - end vector3 @@ -38,7 +40,7 @@ public class ClientProxy extends CommonProxy { if (world.isRemote || FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { - FMLClientHandler.instance().getClient().effectRenderer.addEffect(new FXBeam(world, position, target, color, ModPrefab.TEXTURE_DIRECTORY + "", age)); + FMLClientHandler.instance().getClient().effectRenderer.addEffect(new FXBeam(world, position, target, color, DarkCore.TEXTURE_DIRECTORY + "", age)); } } diff --git a/src/dark/machines/client/FXBeam.java b/src/dark/machines/client/FXBeam.java index 11ae2197..6d6a3d59 100644 --- a/src/dark/machines/client/FXBeam.java +++ b/src/dark/machines/client/FXBeam.java @@ -13,13 +13,15 @@ import net.minecraft.world.World; import org.lwjgl.opengl.GL11; import universalelectricity.core.vector.Vector3; + +import com.dark.DarkCore; + import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import dark.machines.DarkMain; /** Based off Thaumcraft's Beam Renderer. - * + * * @author Calclavia, Azanor */ @SideOnly(Side.CLIENT) public class FXBeam extends EntityFX @@ -45,7 +47,7 @@ public class FXBeam extends EntityFX /** beam diameter */ private float beamD = 0.08f; - private String texture = DarkMain.TEXTURE_DIRECTORY + ""; + private String texture = DarkCore.TEXTURE_DIRECTORY + ""; public FXBeam(World world, Vector3 start, Vector3 end, Color color, String texture, int age, boolean pulse) { @@ -142,7 +144,7 @@ public class FXBeam extends EntityFX //Clear tessellator.draw(); GL11.glPushMatrix(); - + //Start drawing try { @@ -230,7 +232,7 @@ public class FXBeam extends EntityFX { e.printStackTrace(); } - + //Reset GL11.glPopMatrix(); tessellator.startDrawingQuads(); diff --git a/src/dark/machines/client/gui/GuiBatteryBox.java b/src/dark/machines/client/gui/GuiBatteryBox.java index 17133d1d..24b57a9d 100644 --- a/src/dark/machines/client/gui/GuiBatteryBox.java +++ b/src/dark/machines/client/gui/GuiBatteryBox.java @@ -9,6 +9,9 @@ import org.lwjgl.opengl.GL11; import universalelectricity.core.electricity.ElectricityDisplay; import universalelectricity.core.electricity.ElectricityDisplay.ElectricUnit; + +import com.dark.DarkCore; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.machines.DarkMain; @@ -18,7 +21,7 @@ import dark.machines.machines.TileEntityBatteryBox; @SideOnly(Side.CLIENT) public class GuiBatteryBox extends GuiContainer { - private static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.GUI_DIRECTORY + "battery_box.png"); + private static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.GUI_DIRECTORY + "battery_box.png"); private TileEntityBatteryBox tileEntity; diff --git a/src/dark/machines/client/gui/GuiMachineBase.java b/src/dark/machines/client/gui/GuiMachineBase.java index c6fb4f54..8b263ba4 100644 --- a/src/dark/machines/client/gui/GuiMachineBase.java +++ b/src/dark/machines/client/gui/GuiMachineBase.java @@ -8,6 +8,8 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import com.dark.DarkCore; + import cpw.mods.fml.client.FMLClientHandler; import dark.core.prefab.invgui.GuiBase; import dark.core.prefab.invgui.GuiButtonImage; @@ -16,12 +18,12 @@ import dark.core.prefab.machine.TileEntityMachine; import dark.machines.DarkMain; /** To be used with all machine that have a gui to allow generic settings and feature all all devices - * + * * @author DarkGuardsman */ public class GuiMachineBase extends GuiBase { - public static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.GUI_DIRECTORY + "gui_grey.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.GUI_DIRECTORY + "gui_grey.png"); protected static final int MAX_BUTTON_ID = 3; protected TileEntityMachine tileEntity; diff --git a/src/dark/machines/client/renders/BlockRenderingHandler.java b/src/dark/machines/client/renders/BlockRenderingHandler.java index 12dd836c..9fe9d2bb 100644 --- a/src/dark/machines/client/renders/BlockRenderingHandler.java +++ b/src/dark/machines/client/renders/BlockRenderingHandler.java @@ -7,12 +7,13 @@ import net.minecraft.world.IBlockAccess; import org.lwjgl.opengl.GL11; +import com.dark.DarkCore; + import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import dark.core.prefab.ModPrefab; import dark.machines.CoreRecipeLoader; import dark.machines.DarkMain; import dark.machines.client.models.ModelMachine; @@ -31,7 +32,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler GL11.glPushMatrix(); if (CoreRecipeLoader.blockSolar != null && block.blockID == CoreRecipeLoader.blockSolar.blockID) { - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(DarkMain.getInstance().DOMAIN, ModPrefab.MODEL_DIRECTORY + "solarPanel.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.MODEL_DIRECTORY + "solarPanel.png")); GL11.glTranslatef(0.0F, 1.1F, 0.0F); GL11.glRotatef(180f, 0f, 0f, 1f); solarPanelModel.render(0.0625F); diff --git a/src/dark/machines/client/renders/ItemRenderFluidCan.java b/src/dark/machines/client/renders/ItemRenderFluidCan.java index 6e25ad4f..25d8e202 100644 --- a/src/dark/machines/client/renders/ItemRenderFluidCan.java +++ b/src/dark/machines/client/renders/ItemRenderFluidCan.java @@ -8,6 +8,8 @@ import net.minecraftforge.fluids.FluidStack; import org.lwjgl.opengl.GL11; +import com.dark.DarkCore; + import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -21,7 +23,7 @@ public class ItemRenderFluidCan implements IItemRenderer { public static final ModelSmallFluidCan CAN_MODEL = new ModelSmallFluidCan(); - public static final ResourceLocation CAN_TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.MODEL_DIRECTORY + "FluidCanA.png"); + public static final ResourceLocation CAN_TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.MODEL_DIRECTORY + "FluidCanA.png"); @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) diff --git a/src/dark/machines/client/renders/RenderBlockSolarPanel.java b/src/dark/machines/client/renders/RenderBlockSolarPanel.java index dc33f787..51829509 100644 --- a/src/dark/machines/client/renders/RenderBlockSolarPanel.java +++ b/src/dark/machines/client/renders/RenderBlockSolarPanel.java @@ -5,6 +5,8 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.dark.DarkCore; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.machines.DarkMain; @@ -13,7 +15,7 @@ import dark.machines.client.models.ModelSolarPanel; @SideOnly(Side.CLIENT) public class RenderBlockSolarPanel extends RenderTileMachine { - private static final ResourceLocation solarPanelTexture = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.MODEL_DIRECTORY + "SolarPanel.png"); + private static final ResourceLocation solarPanelTexture = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.MODEL_DIRECTORY + "SolarPanel.png"); public static final ModelSolarPanel model = new ModelSolarPanel(); diff --git a/src/dark/machines/client/renders/RenderSteamGen.java b/src/dark/machines/client/renders/RenderSteamGen.java index 81676393..ad3f5146 100644 --- a/src/dark/machines/client/renders/RenderSteamGen.java +++ b/src/dark/machines/client/renders/RenderSteamGen.java @@ -6,9 +6,10 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.dark.DarkCore; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import dark.core.prefab.ModPrefab; import dark.core.prefab.machine.TileEntityMachine; import dark.machines.DarkMain; import dark.machines.client.models.ModelMachine; @@ -21,8 +22,8 @@ public class RenderSteamGen extends RenderTileMachine public static final ModelSteamTurbine TURBINE_MODEL = new ModelSteamTurbine(); public static final ModelSteamGen STEAM_GEN_MODEL = new ModelSteamGen(); - public static final ResourceLocation TURBINE_TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, ModPrefab.MODEL_DIRECTORY + "SmallSteamFan.png"); - public static final ResourceLocation STEAM_GEN_TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, ModPrefab.MODEL_DIRECTORY + "SteamGenerator.png"); + public static final ResourceLocation TURBINE_TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.MODEL_DIRECTORY + "SmallSteamFan.png"); + public static final ResourceLocation STEAM_GEN_TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.MODEL_DIRECTORY + "SteamGenerator.png"); private static float rot1 = 0; @Override diff --git a/src/dark/machines/client/renders/RenderTestCar.java b/src/dark/machines/client/renders/RenderTestCar.java index 70cf55bf..438b918c 100644 --- a/src/dark/machines/client/renders/RenderTestCar.java +++ b/src/dark/machines/client/renders/RenderTestCar.java @@ -8,6 +8,8 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.dark.DarkCore; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.core.prefab.entities.EntityAdvanced; @@ -17,7 +19,7 @@ import dark.machines.client.models.ModelTestCar; @SideOnly(Side.CLIENT) public class RenderTestCar extends Render { - private static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.MODEL_DIRECTORY + "TestCar.png"); + private static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkCore.MODEL_DIRECTORY + "TestCar.png"); /** instance of ModelBoat for rendering */ protected ModelBase modelBoat; diff --git a/src/dark/machines/deco/BlockBasalt.java b/src/dark/machines/deco/BlockBasalt.java index 32a19fe4..580abb3c 100644 --- a/src/dark/machines/deco/BlockBasalt.java +++ b/src/dark/machines/deco/BlockBasalt.java @@ -7,9 +7,11 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.Icon; + +import com.dark.DarkCore; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; public class BlockBasalt extends Block @@ -36,7 +38,7 @@ public class BlockBasalt extends Block public BlockBasalt() { - super(DarkMain.CONFIGURATION.getBlock("basalt", ModPrefab.getNextID()).getInt(), Material.rock); + super(DarkMain.CONFIGURATION.getBlock("basalt", DarkCore.getNextID()).getInt(), Material.rock); this.setCreativeTab(CreativeTabs.tabDecorations); this.setHardness(2f); this.setResistance(2f); diff --git a/src/dark/machines/deco/BlockColorGlass.java b/src/dark/machines/deco/BlockColorGlass.java index 00397f28..6faa72c3 100644 --- a/src/dark/machines/deco/BlockColorGlass.java +++ b/src/dark/machines/deco/BlockColorGlass.java @@ -4,9 +4,11 @@ import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; + +import com.dark.DarkCore; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; public class BlockColorGlass extends BlockColored @@ -14,7 +16,7 @@ public class BlockColorGlass extends BlockColored public BlockColorGlass(String name) { - super(name, DarkMain.CONFIGURATION.getBlock(name, ModPrefab.getNextID()).getInt(), Material.glass); + super(name, DarkMain.CONFIGURATION.getBlock(name, DarkCore.getNextID()).getInt(), Material.glass); this.setCreativeTab(CreativeTabs.tabDecorations); this.setHardness(.5f); this.setResistance(.5f); diff --git a/src/dark/machines/deco/BlockColorSand.java b/src/dark/machines/deco/BlockColorSand.java index ba8ecfff..729025a0 100644 --- a/src/dark/machines/deco/BlockColorSand.java +++ b/src/dark/machines/deco/BlockColorSand.java @@ -6,7 +6,9 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.world.World; -import dark.core.prefab.ModPrefab; + +import com.dark.DarkCore; + import dark.machines.DarkMain; //TODO fix instant falling sand @@ -14,7 +16,7 @@ public class BlockColorSand extends BlockColored { public BlockColorSand() { - super("colorSand", DarkMain.CONFIGURATION.getBlock("colorSand", ModPrefab.getNextID()).getInt(), Material.sand); + super("colorSand", DarkMain.CONFIGURATION.getBlock("colorSand", DarkCore.getNextID()).getInt(), Material.sand); this.setCreativeTab(CreativeTabs.tabDecorations); this.setHardness(1f); this.setResistance(.5f); diff --git a/src/dark/machines/generators/BlockSmallSteamGen.java b/src/dark/machines/generators/BlockSmallSteamGen.java index dfe30b11..b5e27828 100644 --- a/src/dark/machines/generators/BlockSmallSteamGen.java +++ b/src/dark/machines/generators/BlockSmallSteamGen.java @@ -16,12 +16,12 @@ import net.minecraftforge.common.Configuration; import universalelectricity.core.UniversalElectricity; import com.builtbroken.common.Pair; -import com.dark.ModObjectRegistry.BlockBuildData; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.core.DMCreativeTab; import dark.core.prefab.machine.BlockMachine; +import dark.machines.DarkMain; import dark.machines.client.renders.BlockRenderingHandler; import dark.machines.client.renders.RenderSteamGen; @@ -29,15 +29,16 @@ import dark.machines.client.renders.RenderSteamGen; * A) the generator B) the collector The generator creates the steam and burns the fuel. The * collector uses the steam to generate a small amount of constant power. This setup is not very * powerful but is easy to create and doesn't take much to keep running - * + * * @author DarkGuardsman */ public class BlockSmallSteamGen extends BlockMachine { public BlockSmallSteamGen() { - super(new BlockBuildData(BlockSmallSteamGen.class, "StarterSteamGen", UniversalElectricity.machine).setCreativeTab(DMCreativeTab.tabIndustrial())); + super(DarkMain.CONFIGURATION, "StarterSteamGen", UniversalElectricity.machine); this.setStepSound(soundMetalFootstep); + this.setCreativeTab(DMCreativeTab.tabIndustrial()); } @Override diff --git a/src/dark/machines/generators/BlockSolarPanel.java b/src/dark/machines/generators/BlockSolarPanel.java index 0fd3fcb1..2724add7 100644 --- a/src/dark/machines/generators/BlockSolarPanel.java +++ b/src/dark/machines/generators/BlockSolarPanel.java @@ -12,12 +12,12 @@ import net.minecraftforge.oredict.OreDictionary; import universalelectricity.core.UniversalElectricity; import com.builtbroken.common.Pair; -import com.dark.ModObjectRegistry.BlockBuildData; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.core.DMCreativeTab; import dark.core.prefab.machine.BlockMachine; +import dark.machines.DarkMain; import dark.machines.client.renders.BlockRenderingHandler; import dark.machines.client.renders.RenderBlockSolarPanel; @@ -30,7 +30,7 @@ public class BlockSolarPanel extends BlockMachine public BlockSolarPanel() { - super(new BlockBuildData(BlockSolarPanel.class, "BlockSolarPanel", UniversalElectricity.machine)); + super(DarkMain.CONFIGURATION, "BlockSolarPanel", UniversalElectricity.machine); this.setBlockBounds(0, 0, 0, 1f, .6f, 1f); this.setCreativeTab(DMCreativeTab.tabIndustrial()); } diff --git a/src/dark/machines/items/ItemBattery.java b/src/dark/machines/items/ItemBattery.java index dd2b2760..67fd44c3 100644 --- a/src/dark/machines/items/ItemBattery.java +++ b/src/dark/machines/items/ItemBattery.java @@ -1,26 +1,27 @@ package dark.machines.items; -import com.dark.IExtraInfo.IExtraItemInfo; - import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.ItemStack; import net.minecraftforge.common.Configuration; import net.minecraftforge.oredict.OreDictionary; import universalelectricity.core.item.ItemElectric; + +import com.dark.DarkCore; +import com.dark.IExtraInfo.IExtraItemInfo; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.core.DMCreativeTab; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; /** Simple battery to store energy - * + * * @author DarkGuardsman */ public class ItemBattery extends ItemElectric implements IExtraItemInfo { public ItemBattery() { - super(DarkMain.CONFIGURATION.getItem("Battery", ModPrefab.getNextItemId()).getInt()); + super(DarkMain.CONFIGURATION.getItem("Battery", DarkCore.getNextItemId()).getInt()); this.setUnlocalizedName(DarkMain.getInstance().PREFIX + "Battery"); this.setCreativeTab(DMCreativeTab.tabIndustrial()); } diff --git a/src/dark/machines/items/ItemColoredDust.java b/src/dark/machines/items/ItemColoredDust.java index dc5ab1be..42a24220 100644 --- a/src/dark/machines/items/ItemColoredDust.java +++ b/src/dark/machines/items/ItemColoredDust.java @@ -6,10 +6,12 @@ import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; + +import com.dark.DarkCore; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.core.prefab.ItemBasic; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; public class ItemColoredDust extends ItemBasic @@ -19,7 +21,7 @@ public class ItemColoredDust extends ItemBasic public ItemColoredDust() { - super(ModPrefab.getNextItemId(), "GlowRefinedSand", DarkMain.CONFIGURATION); + super(DarkCore.getNextItemId(), "GlowRefinedSand", DarkMain.CONFIGURATION); this.setMaxDamage(0); this.setHasSubtypes(true); this.setCreativeTab(CreativeTabs.tabMaterials); diff --git a/src/dark/machines/items/ItemFluidCan.java b/src/dark/machines/items/ItemFluidCan.java index 9f97319c..facc5f24 100644 --- a/src/dark/machines/items/ItemFluidCan.java +++ b/src/dark/machines/items/ItemFluidCan.java @@ -12,15 +12,17 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.ItemFluidContainer; import universalelectricity.core.item.ElectricItemHelper; + +import com.dark.DarkCore; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.core.DMCreativeTab; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; /** Small fluid can that is designed to store up to one bucket of fluid. Doesn't work like a bucket * as it is sealed with a pressure cap. This can is designed to work with tools or machines only. - * + * * @author DarkGuardsman */ public class ItemFluidCan extends ItemFluidContainer { @@ -31,7 +33,7 @@ public class ItemFluidCan extends ItemFluidContainer public ItemFluidCan() { - super(DarkMain.CONFIGURATION.getItem("FluidCan", ModPrefab.getNextItemId()).getInt()); + super(DarkMain.CONFIGURATION.getItem("FluidCan", DarkCore.getNextItemId()).getInt()); this.setUnlocalizedName("FluidCan"); this.setCreativeTab(DMCreativeTab.tabHydraulic()); this.setMaxStackSize(1); diff --git a/src/dark/machines/items/ItemReadoutTools.java b/src/dark/machines/items/ItemReadoutTools.java index a57165f9..eb1eff35 100644 --- a/src/dark/machines/items/ItemReadoutTools.java +++ b/src/dark/machines/items/ItemReadoutTools.java @@ -19,12 +19,14 @@ import universalelectricity.core.block.IElectrical; import universalelectricity.core.block.IElectricalStorage; import universalelectricity.core.electricity.ElectricityDisplay; import universalelectricity.core.electricity.ElectricityDisplay.ElectricUnit; + +import com.dark.DarkCore; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dark.api.IToolReadOut; import dark.api.IToolReadOut.EnumTools; import dark.core.prefab.ItemBasic; -import dark.core.prefab.ModPrefab; import dark.core.prefab.fluids.FluidHelper; import dark.machines.DarkMain; @@ -34,7 +36,7 @@ public class ItemReadoutTools extends ItemBasic public ItemReadoutTools() { - super(ModPrefab.getNextItemId(), "DMTools", DarkMain.CONFIGURATION); + super(DarkCore.getNextItemId(), "DMTools", DarkMain.CONFIGURATION); this.setHasSubtypes(true); this.setCreativeTab(CreativeTabs.tabTools); this.setMaxStackSize(1); diff --git a/src/dark/machines/items/ItemWrench.java b/src/dark/machines/items/ItemWrench.java index 80fedefd..43df9d7e 100644 --- a/src/dark/machines/items/ItemWrench.java +++ b/src/dark/machines/items/ItemWrench.java @@ -1,7 +1,5 @@ package dark.machines.items; -import com.dark.IExtraInfo.IExtraItemInfo; - import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -11,8 +9,11 @@ import net.minecraftforge.common.Configuration; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; import buildcraft.api.tools.IToolWrench; + +import com.dark.DarkCore; +import com.dark.IExtraInfo.IExtraItemInfo; + import dark.core.prefab.ItemBasic; -import dark.core.prefab.ModPrefab; import dark.machines.DarkMain; public class ItemWrench extends ItemBasic implements IToolWrench, IExtraItemInfo @@ -21,7 +22,7 @@ public class ItemWrench extends ItemBasic implements IToolWrench, IExtraItemInfo public ItemWrench() { - super(ModPrefab.getNextItemId(), "wrench", DarkMain.CONFIGURATION); + super(DarkCore.getNextItemId(), "wrench", DarkMain.CONFIGURATION); this.setMaxStackSize(1); this.setCreativeTab(CreativeTabs.tabTools); this.setTextureName(DarkMain.getInstance().PREFIX + "wrench"); diff --git a/src/dark/machines/machines/BlockDebug.java b/src/dark/machines/machines/BlockDebug.java index 6447595f..fa588f33 100644 --- a/src/dark/machines/machines/BlockDebug.java +++ b/src/dark/machines/machines/BlockDebug.java @@ -14,7 +14,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.Configuration; import com.builtbroken.common.Pair; -import com.dark.ModObjectRegistry.BlockBuildData; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -28,7 +27,8 @@ public class BlockDebug extends BlockMachine public BlockDebug() { - super(new BlockBuildData(BlockDebug.class, "DebugBlock", Material.clay).setCreativeTab(DMCreativeTab.tabIndustrial())); + super(DarkMain.CONFIGURATION, "DebugBlock", Material.clay); + this.setCreativeTab(DMCreativeTab.tabIndustrial()); } @Override diff --git a/src/dark/machines/transmit/BlockWire.java b/src/dark/machines/transmit/BlockWire.java index ce0e2569..a8657db7 100644 --- a/src/dark/machines/transmit/BlockWire.java +++ b/src/dark/machines/transmit/BlockWire.java @@ -21,7 +21,6 @@ import universalelectricity.core.vector.Vector3; import universalelectricity.prefab.tile.TileEntityConductor; import com.builtbroken.common.Pair; -import com.dark.ModObjectRegistry.BlockBuildData; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -43,12 +42,13 @@ public class BlockWire extends BlockMachine public BlockWire() { - super(new BlockBuildData(BlockWire.class, "DMWire", Material.cloth).setCreativeTab(DMCreativeTab.tabIndustrial())); + super(DarkMain.CONFIGURATION, "DMWire", Material.cloth); this.setStepSound(soundClothFootstep); this.setResistance(0.2F); this.setHardness(0.1f); this.setBlockBounds(0.3f, 0.3f, 0.3f, 0.7f, 0.7f, 0.7f); Block.setBurnProperties(this.blockID, 30, 60); + this.setCreativeTab(DMCreativeTab.tabIndustrial()); } @Override