diff --git a/src/main/java/com/builtbroken/assemblyline/AssemblyLine.java b/src/main/java/com/builtbroken/assemblyline/AssemblyLine.java index 2e511b718..10fe1a399 100644 --- a/src/main/java/com/builtbroken/assemblyline/AssemblyLine.java +++ b/src/main/java/com/builtbroken/assemblyline/AssemblyLine.java @@ -16,6 +16,10 @@ import net.minecraftforge.oredict.OreDictionary; import org.modstats.ModstatInfo; import org.modstats.Modstats; +import calclavia.lib.network.PacketHandler; +import calclavia.lib.ore.OreGenReplaceStone; +import calclavia.lib.ore.OreGenerator; + import com.builtbroken.assemblyline.api.coding.TaskRegistry; import com.builtbroken.assemblyline.armbot.BlockArmbot; import com.builtbroken.assemblyline.armbot.command.TaskBreak; @@ -49,6 +53,7 @@ import com.builtbroken.assemblyline.entities.EntityFarmEgg; import com.builtbroken.assemblyline.entities.EnumBird; import com.builtbroken.assemblyline.entities.prefab.EntityTestCar; import com.builtbroken.assemblyline.entities.prefab.ItemVehicleSpawn; +import com.builtbroken.assemblyline.fluid.EnumGas; import com.builtbroken.assemblyline.fluid.pipes.BlockPipe; import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial; import com.builtbroken.assemblyline.fluid.pipes.ItemBlockPipe; @@ -88,6 +93,7 @@ import com.builtbroken.assemblyline.machine.belt.BlockConveyorBelt; import com.builtbroken.assemblyline.machine.encoder.BlockEncoder; import com.builtbroken.assemblyline.machine.encoder.ItemDisk; import com.builtbroken.assemblyline.machine.processor.BlockProcessor; +import com.builtbroken.assemblyline.network.PacketIDTile; import com.builtbroken.assemblyline.redstone.BlockAdvancedHopper; import com.builtbroken.assemblyline.transmit.BlockWire; import com.builtbroken.assemblyline.transmit.ItemBlockWire; @@ -95,12 +101,13 @@ import com.builtbroken.minecraft.CoreRegistry; import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.EnumMaterial; import com.builtbroken.minecraft.EnumOrePart; +import com.builtbroken.minecraft.FluidHelper; +import com.builtbroken.minecraft.LaserEntityDamageSource; import com.builtbroken.minecraft.TranslationHelper; -import com.builtbroken.minecraft.fluid.EnumGas; -import com.builtbroken.minecraft.network.PacketHandler; +import com.builtbroken.minecraft.helpers.PlayerKeyHandler; import com.builtbroken.minecraft.prefab.ItemBlockHolder; -import com.builtbroken.minecraft.worldgen.OreGenReplaceStone; -import com.builtbroken.minecraft.worldgen.OreGenerator; +import com.builtbroken.minecraft.save.SaveManager; +import com.builtbroken.minecraft.tilenetwork.prefab.NetworkUpdateHandler; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.Loader; @@ -117,12 +124,20 @@ import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.TickRegistry; +import cpw.mods.fml.relauncher.Side; @ModstatInfo(prefix = "asmline") @Mod(modid = AssemblyLine.MOD_ID, name = AssemblyLine.MOD_NAME, version = AssemblyLine.VERSION, useMetadata = true) -@NetworkMod(channels = { DarkCore.CHANNEL }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class) +@NetworkMod(channels = { AssemblyLine.CHANNEL }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class) public class AssemblyLine { + public static final String TEXTURE_DIRECTORY = "textures/"; + public static final String BLOCK_DIRECTORY = TEXTURE_DIRECTORY + "blocks/"; + public static final String ITEM_DIRECTORY = TEXTURE_DIRECTORY + "items/"; + public static final String MODEL_DIRECTORY = TEXTURE_DIRECTORY + "models/"; + public static final String GUI_DIRECTORY = TEXTURE_DIRECTORY + "gui/"; + public static final String CHANNEL = "ALChannel"; public static final String MAJOR_VERSION = "@MAJOR@"; public static final String MINOR_VERSION = "@MINOR@"; @@ -160,6 +175,17 @@ public class AssemblyLine public static int entitiesIds = 60; + private static PacketIDTile tilePacket; + + public static PacketIDTile getTilePacket() + { + if (tilePacket == null) + { + tilePacket = new PacketIDTile(AssemblyLine.CHANNEL); + } + return tilePacket; + } + @EventHandler public void preInit(FMLPreInitializationEvent event) { @@ -169,6 +195,11 @@ public class AssemblyLine DarkCore.instance().preLoad(); Modstats.instance().getReporter().registerMod(this); MinecraftForge.EVENT_BUS.register(this); + MinecraftForge.EVENT_BUS.register(new FluidHelper()); + MinecraftForge.EVENT_BUS.register(SaveManager.instance()); + TickRegistry.registerTickHandler(NetworkUpdateHandler.instance(), Side.SERVER); + TickRegistry.registerScheduledTickHandler(new PlayerKeyHandler(AssemblyLine.CHANNEL), Side.CLIENT); + MinecraftForge.EVENT_BUS.register(new LaserEntityDamageSource(null)); NetworkRegistry.instance().registerGuiHandler(this, proxy); TaskRegistry.registerCommand(new TaskDrop()); diff --git a/src/main/java/com/builtbroken/assemblyline/armbot/TileEntityArmbot.java b/src/main/java/com/builtbroken/assemblyline/armbot/TileEntityArmbot.java index 433c34191..e59953ce6 100644 --- a/src/main/java/com/builtbroken/assemblyline/armbot/TileEntityArmbot.java +++ b/src/main/java/com/builtbroken/assemblyline/armbot/TileEntityArmbot.java @@ -11,8 +11,10 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import universalelectricity.api.vector.Vector2; import universalelectricity.api.vector.Vector3; +import calclavia.lib.network.PacketHandler; import com.builtbroken.assemblyline.ALRecipeLoader; +import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.api.IArmbot; import com.builtbroken.assemblyline.api.coding.IProgram; import com.builtbroken.assemblyline.api.coding.ProgramHelper; @@ -29,7 +31,6 @@ import com.builtbroken.minecraft.helpers.HelperMethods; import com.builtbroken.minecraft.helpers.MathHelper; import com.builtbroken.minecraft.interfaces.IBlockActivated; import com.builtbroken.minecraft.interfaces.IMultiBlock; -import com.builtbroken.minecraft.network.PacketHandler; import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.common.FMLCommonHandler; @@ -108,7 +109,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, this.programHelper.onUpdate(this.worldObj, new Vector3(this)); if (this.targetYaw != preYaw || this.targetPitch != prePitch) { - PacketHandler.instance().sendPacketToClients(this.getDescriptionPacket(), worldObj, new Vector3(this).translate(new Vector3(.5f, 1f, .5f)), 64); + PacketHandler.sendPacketToClients(this.getDescriptionPacket(), worldObj, new Vector3(this).translate(new Vector3(.5f, 1f, .5f)), 64); } } this.updateRotation(); @@ -299,18 +300,18 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, @Override public Packet getDescriptionPacket() { - return PacketHandler.instance().getTilePacket(this.getChannel(), "armbot", this, this.functioning, this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch); + return AssemblyLine.getTilePacket().getPacket(this, "armbot", this.functioning, this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch); } public void sendGrabItemToClient() { if (this.grabbedObject instanceof ItemStack) { - PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(this.getChannel(), "armbotItem", this, true, ((ItemStack) this.grabbedObject).writeToNBT(new NBTTagCompound())), worldObj, new Vector3(this), 64); + PacketHandler.sendPacketToClients(AssemblyLine.getTilePacket().getPacket(this, "armbotItem", true, ((ItemStack) this.grabbedObject).writeToNBT(new NBTTagCompound())), worldObj, new Vector3(this), 64); } else { - PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(this.getChannel(), "armbotItem", this, false), worldObj, new Vector3(this), 64); + PacketHandler.sendPacketToClients(AssemblyLine.getTilePacket().getPacket(this, "armbotItem", false), worldObj, new Vector3(this), 64); } } @@ -334,7 +335,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, { if (dis.readBoolean()) { - this.grabbedObject = ItemStack.loadItemStackFromNBT(PacketHandler.instance().readNBTTagCompound(dis)); + this.grabbedObject = ItemStack.loadItemStackFromNBT(PacketHandler.readNBTTagCompound(dis)); } else { @@ -537,5 +538,4 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, { return this.location; } - } diff --git a/src/main/java/com/builtbroken/assemblyline/blocks/BlockGasOre.java b/src/main/java/com/builtbroken/assemblyline/blocks/BlockGasOre.java index 9345801a1..a62c8d2d6 100644 --- a/src/main/java/com/builtbroken/assemblyline/blocks/BlockGasOre.java +++ b/src/main/java/com/builtbroken/assemblyline/blocks/BlockGasOre.java @@ -23,8 +23,8 @@ import universalelectricity.api.vector.Vector3; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.IndustryTabs; +import com.builtbroken.assemblyline.fluid.EnumGas; import com.builtbroken.minecraft.DarkCore; -import com.builtbroken.minecraft.fluid.EnumGas; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/com/builtbroken/assemblyline/blocks/BlockOre.java b/src/main/java/com/builtbroken/assemblyline/blocks/BlockOre.java index 0cbc6d07b..2b60e6490 100644 --- a/src/main/java/com/builtbroken/assemblyline/blocks/BlockOre.java +++ b/src/main/java/com/builtbroken/assemblyline/blocks/BlockOre.java @@ -14,6 +14,7 @@ import net.minecraft.util.Icon; import net.minecraft.world.World; import net.minecraftforge.common.Configuration; import net.minecraftforge.oredict.OreDictionary; +import calclavia.lib.ore.OreGenReplaceStone; import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.assemblyline.AssemblyLine; @@ -21,7 +22,6 @@ import com.builtbroken.common.Pair; import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.EnumMaterial; import com.builtbroken.minecraft.IExtraInfo.IExtraBlockInfo; -import com.builtbroken.minecraft.worldgen.OreGenReplaceStone; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiBatteryBox.java b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiBatteryBox.java index ebaf34587..8ae9f1479 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiBatteryBox.java +++ b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiBatteryBox.java @@ -13,7 +13,6 @@ import universalelectricity.api.energy.UnitDisplay.Unit; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.machine.ContainerBatteryBox; import com.builtbroken.assemblyline.machine.TileEntityBatteryBox; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -21,7 +20,7 @@ import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class GuiBatteryBox extends GuiContainer { - private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.GUI_DIRECTORY + "battery_box.png"); + private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.GUI_DIRECTORY + "battery_box.png"); private TileEntityBatteryBox tileEntity; diff --git a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEditTask.java b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEditTask.java index 10e3f78e4..ffa421ec9 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEditTask.java +++ b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEditTask.java @@ -13,7 +13,6 @@ import universalelectricity.api.vector.Vector2; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.api.coding.ITask; import com.builtbroken.assemblyline.api.coding.args.ArgumentData; -import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.prefab.invgui.GuiBase; import com.builtbroken.minecraft.prefab.invgui.GuiMessageBox; import com.builtbroken.minecraft.prefab.invgui.IMessageBoxDialog; @@ -23,7 +22,7 @@ import cpw.mods.fml.common.FMLCommonHandler; public class GuiEditTask extends GuiBase implements IMessageBoxDialog { - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_task_edit.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.GUI_DIRECTORY + "gui_task_edit.png"); protected GuiEncoderCoder gui; protected ITask task, editTask; diff --git a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEncoderHelp.java b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEncoderHelp.java index c3598a890..6699e9ae8 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEncoderHelp.java +++ b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEncoderHelp.java @@ -5,11 +5,10 @@ import net.minecraft.util.ResourceLocation; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.machine.encoder.TileEntityEncoder; -import com.builtbroken.minecraft.DarkCore; public class GuiEncoderHelp extends GuiEncoderBase { - public static final ResourceLocation TEXTURE_CODE_BACK = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_encoder_coder.png"); + public static final ResourceLocation TEXTURE_CODE_BACK = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.GUI_DIRECTORY + "gui_encoder_coder.png"); public GuiEncoderHelp(InventoryPlayer player, TileEntityEncoder tileEntity) { diff --git a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEncoderInventory.java b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEncoderInventory.java index 5552b0456..5ae2d1c94 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEncoderInventory.java +++ b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiEncoderInventory.java @@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.machine.encoder.ContainerEncoder; import com.builtbroken.assemblyline.machine.encoder.TileEntityEncoder; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.Side; @@ -17,7 +16,7 @@ import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class GuiEncoderInventory extends GuiEncoderBase { - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_encoder_slot.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.GUI_DIRECTORY + "gui_encoder_slot.png"); public GuiEncoderInventory(InventoryPlayer inventoryPlayer, TileEntityEncoder tileEntity) { diff --git a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiImprinter.java b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiImprinter.java index 6fed28e79..cfa1d7580 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiImprinter.java +++ b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiImprinter.java @@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.imprinter.ContainerImprinter; import com.builtbroken.assemblyline.imprinter.TileEntityImprinter; -import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.TranslationHelper; import cpw.mods.fml.relauncher.Side; @@ -42,7 +41,7 @@ public class GuiImprinter extends GuiContainer @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - this.mc.renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_imprinter.png")); + this.mc.renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.GUI_DIRECTORY + "gui_imprinter.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.containerWidth = (this.width - this.xSize) / 2; this.containerHeight = (this.height - this.ySize) / 2; diff --git a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiManipulator.java b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiManipulator.java deleted file mode 100644 index 5755d2348..000000000 --- a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiManipulator.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.builtbroken.assemblyline.client.gui; - -import net.minecraft.entity.player.EntityPlayer; - -import com.builtbroken.assemblyline.AssemblyLine; -import com.builtbroken.minecraft.prefab.TileEntityMachine; -import com.builtbroken.minecraft.prefab.invgui.GuiMachineBase; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class GuiManipulator extends GuiMachineBase -{ - public GuiManipulator(EntityPlayer player, TileEntityMachine tileEntity) - { - super(AssemblyLine.instance, player, tileEntity); - } -} diff --git a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiProcessor.java b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiProcessor.java index 2fa5aeaad..f1e180fd2 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiProcessor.java +++ b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiProcessor.java @@ -10,7 +10,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.machine.processor.ContainerProcessor; import com.builtbroken.assemblyline.machine.processor.TileEntityProcessor; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -18,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class GuiProcessor extends GuiContainer { - private static final ResourceLocation gui_texture = new ResourceLocation(AssemblyLine.instance.PREFIX + DarkCore.GUI_DIRECTORY + "processor.png"); + private static final ResourceLocation gui_texture = new ResourceLocation(AssemblyLine.instance.PREFIX + AssemblyLine.GUI_DIRECTORY + "processor.png"); private TileEntityProcessor tileEntity; public GuiProcessor(InventoryPlayer par1InventoryPlayer, TileEntityProcessor par2TileEntityFurnace) diff --git a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiTask.java b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiTask.java index ffb85ea55..0b83bfe9f 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/gui/GuiTask.java +++ b/src/main/java/com/builtbroken/assemblyline/client/gui/GuiTask.java @@ -7,9 +7,9 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.api.coding.IRedirectTask; import com.builtbroken.assemblyline.api.coding.ITask; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -18,7 +18,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class GuiTask extends Gui { boolean isLeft = false; - private ResourceLocation gui_pic = new ResourceLocation(DarkCore.GUI_DIRECTORY + "gui@.png"); + private ResourceLocation gui_pic = new ResourceLocation(AssemblyLine.GUI_DIRECTORY + "gui@.png"); /** Button width in pixels */ protected int width; @@ -54,16 +54,16 @@ public class GuiTask extends Gui switch (task.getType()) { case DATA: - gui_pic = new ResourceLocation(DarkCore.GUI_DIRECTORY + "logic/DATA.png"); + gui_pic = new ResourceLocation(AssemblyLine.GUI_DIRECTORY + "logic/DATA.png"); break; case PROCESS: - gui_pic = new ResourceLocation(DarkCore.GUI_DIRECTORY + "logic/PROCESS.png"); + gui_pic = new ResourceLocation(AssemblyLine.GUI_DIRECTORY + "logic/PROCESS.png"); break; case DEFINEDPROCESS: - gui_pic = new ResourceLocation(DarkCore.GUI_DIRECTORY + "logic/DEFINEDPROCESS.png"); + gui_pic = new ResourceLocation(AssemblyLine.GUI_DIRECTORY + "logic/DEFINEDPROCESS.png"); break; case DECISION: - gui_pic = new ResourceLocation(DarkCore.GUI_DIRECTORY + "logic/IF.png"); + gui_pic = new ResourceLocation(AssemblyLine.GUI_DIRECTORY + "logic/IF.png"); break; } } diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/BlockRenderHelper.java b/src/main/java/com/builtbroken/assemblyline/client/render/BlockRenderHelper.java index 33ad7bde6..a16ec0660 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/BlockRenderHelper.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/BlockRenderHelper.java @@ -14,7 +14,6 @@ import com.builtbroken.assemblyline.client.model.ModelGearRod; import com.builtbroken.assemblyline.client.model.ModelGenerator; import com.builtbroken.assemblyline.client.model.ModelPump; import com.builtbroken.assemblyline.client.model.ModelSink; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; @@ -42,7 +41,7 @@ public class BlockRenderHelper implements ISimpleBlockRenderingHandler GL11.glTranslatef(0.0F, 1.1F, 0.0F); GL11.glRotatef(180f, 0f, 0f, 1f); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "pumps/WaterPump.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "pumps/WaterPump.png")); modelPump.render(0.0725F); modelPump.renderMotion(0.0725F, 0); } @@ -50,21 +49,21 @@ public class BlockRenderHelper implements ISimpleBlockRenderingHandler { GL11.glTranslatef(0.0F, .8F, 0.0F); GL11.glRotatef(180f, 0f, 0f, 1f); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "Sink.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "Sink.png")); sink.render(0.0565F); } else if (ALRecipeLoader.blockRod != null && block.blockID == ALRecipeLoader.blockRod.blockID) { GL11.glTranslatef(0.0F, 1.5F, 0.0F); GL11.glRotatef(180f, 0f, 0f, 1f); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "mechanical/GearRod.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "mechanical/GearRod.png")); modelRod.render(0.0825F, 0); } else if (ALRecipeLoader.blockConPump != null && block.blockID == ALRecipeLoader.blockConPump.blockID && metadata < 4) { GL11.glTranslatef(0.0F, 1.2F, 0.0F); GL11.glRotatef(180f, 0f, 0f, 1f); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "ConstructionPump.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "ConstructionPump.png")); conPump.render(0.0725F); conPump.renderMotor(0.0725F); diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/BlockRenderingHandler.java b/src/main/java/com/builtbroken/assemblyline/client/render/BlockRenderingHandler.java index 0a6397818..8ea8bc9d6 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/BlockRenderingHandler.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/BlockRenderingHandler.java @@ -17,7 +17,6 @@ import com.builtbroken.assemblyline.client.model.ModelManipulator; import com.builtbroken.assemblyline.client.model.ModelRejectorPiston; import com.builtbroken.assemblyline.client.model.ModelSolarPanel; import com.builtbroken.assemblyline.redstone.BlockAdvancedHopper; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; @@ -45,13 +44,13 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 1.5F, 0.0F); GL11.glRotatef(180f, 0f, 0f, 1f); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "belt/frame0.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "belt/frame0.png")); modelConveyorBelt.render(0.0625F, 0, false, false, false, false); GL11.glPopMatrix(); } else if (ALRecipeLoader.blockRejector != null && block.blockID == ALRecipeLoader.blockRejector.blockID) { - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "rejector.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "rejector.png")); GL11.glPushMatrix(); GL11.glTranslatef(0.6F, 1.5F, 0.6F); GL11.glRotatef(180f, 0f, 0f, 1f); @@ -62,7 +61,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler } else if (ALRecipeLoader.blockManipulator != null && block.blockID == ALRecipeLoader.blockManipulator.blockID) { - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "manipulator1.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "manipulator1.png")); GL11.glPushMatrix(); GL11.glTranslatef(0.6F, 1.5F, 0.6F); GL11.glRotatef(180f, 0f, 0f, 1f); @@ -72,7 +71,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler } else if (ALRecipeLoader.blockArmbot != null && block.blockID == ALRecipeLoader.blockArmbot.blockID) { - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + RenderArmbot.TEXTURE)); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + RenderArmbot.TEXTURE)); GL11.glPushMatrix(); GL11.glTranslatef(0.4f, 0.8f, 0f); GL11.glScalef(0.7f, 0.7f, 0.7f); @@ -83,7 +82,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler } else if (ALRecipeLoader.processorMachine != null && block.blockID == ALRecipeLoader.processorMachine.blockID && metadata == 0) { - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "CrusherBlock.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "CrusherBlock.png")); GL11.glPushMatrix(); GL11.glTranslatef(0f, 1f, 0f); GL11.glRotatef(180f, 0f, 0f, 1f); @@ -94,7 +93,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler } else if (ALRecipeLoader.processorMachine != null && block.blockID == ALRecipeLoader.processorMachine.blockID && metadata == 4) { - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "GrinderBlock.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "GrinderBlock.png")); GL11.glPushMatrix(); GL11.glTranslatef(0f, 1f, 0f); GL11.glRotatef(180f, 0f, 0f, 1f); diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/ItemPipeRenderer.java b/src/main/java/com/builtbroken/assemblyline/client/render/ItemPipeRenderer.java index db4ac1db5..a7f80c54d 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/ItemPipeRenderer.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/ItemPipeRenderer.java @@ -10,7 +10,6 @@ import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelReleaseValve; import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.Side; @@ -70,7 +69,7 @@ public class ItemPipeRenderer implements IItemRenderer } if (ALRecipeLoader.blockReleaseValve != null && item.itemID == ALRecipeLoader.blockReleaseValve.blockID) { - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "ReleaseValve.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "ReleaseValve.png")); valve.render(); } GL11.glPopMatrix(); diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/ItemRenderFluidCan.java b/src/main/java/com/builtbroken/assemblyline/client/render/ItemRenderFluidCan.java index 5ac712171..2b15b3760 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/ItemRenderFluidCan.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/ItemRenderFluidCan.java @@ -12,7 +12,6 @@ import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelSmallFluidCan; import com.builtbroken.assemblyline.machine.ItemFluidCan; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.Side; @@ -23,7 +22,7 @@ public class ItemRenderFluidCan implements IItemRenderer { public static final ModelSmallFluidCan CAN_MODEL = new ModelSmallFluidCan(); - public static final ResourceLocation CAN_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "FluidCanA.png"); + public static final ResourceLocation CAN_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "FluidCanA.png"); @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderAdvancedHopper.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderAdvancedHopper.java index c250f42a5..ba6ec94c5 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderAdvancedHopper.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderAdvancedHopper.java @@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelAdvancedHopper; import com.builtbroken.assemblyline.redstone.TileEntityAdvancedHopper; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -18,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class RenderAdvancedHopper extends RenderImprintable { private static final ModelAdvancedHopper MODEL = new ModelAdvancedHopper(); - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.instance.DOMAIN, DarkCore.MODEL_DIRECTORY + "AdvancedHopper.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "AdvancedHopper.png"); private void renderAModelAt(TileEntityAdvancedHopper tileEntity, double x, double y, double z, float f) { diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderArmbot.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderArmbot.java index 25698684e..8d4aa09ad 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderArmbot.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderArmbot.java @@ -19,7 +19,6 @@ import universalelectricity.api.vector.Vector3; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.armbot.TileEntityArmbot; import com.builtbroken.assemblyline.client.model.ModelArmbot; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -49,7 +48,7 @@ public class RenderArmbot extends TileEntitySpecialRenderer } } } - ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + TEXTURE); + ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + TEXTURE); bindTexture(name); GL11.glPushMatrix(); diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderBlockSolarPanel.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderBlockSolarPanel.java index 55dcb924e..7e48dd410 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderBlockSolarPanel.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderBlockSolarPanel.java @@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelSolarPanel; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -16,7 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderBlockSolarPanel extends TileEntitySpecialRenderer { - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "SolarPanel.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "SolarPanel.png"); public static final ModelSolarPanel model = new ModelSolarPanel(); diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderConstructionPump.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderConstructionPump.java index b36563331..7411fa059 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderConstructionPump.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderConstructionPump.java @@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelConstructionPump; import com.builtbroken.assemblyline.fluid.pump.TileEntityConstructionPump; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -19,7 +18,7 @@ public class RenderConstructionPump extends TileEntitySpecialRenderer { int type = 0; private ModelConstructionPump model; - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "ConstructionPump.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "ConstructionPump.png"); public RenderConstructionPump() { diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderConveyorBelt.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderConveyorBelt.java index 85902c58d..f8b84693b 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderConveyorBelt.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderConveyorBelt.java @@ -11,7 +11,6 @@ import com.builtbroken.assemblyline.client.model.ModelAngledBelt; import com.builtbroken.assemblyline.client.model.ModelConveyorBelt; import com.builtbroken.assemblyline.machine.belt.TileEntityConveyorBelt; import com.builtbroken.assemblyline.machine.belt.TileEntityConveyorBelt.SlantType; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -53,7 +52,7 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer if (slantType == SlantType.UP) { - ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "slantedbelt/frame" + frame + ".png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "slantedbelt/frame" + frame + ".png"); bindTexture(name); GL11.glTranslatef(0f, 0.8f, -0.8f); @@ -75,7 +74,7 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer } else if (slantType == SlantType.DOWN) { - ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "slantedbelt/frame" + frame + ".png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "slantedbelt/frame" + frame + ".png"); bindTexture(name); GL11.glRotatef(180f, 0f, 1f, 0f); boolean slantAdjust = false; @@ -96,7 +95,7 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer } else { - ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "belt/frame" + frame + ".png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "belt/frame" + frame + ".png"); bindTexture(name); GL11.glRotatef(180, 0f, 1f, 0f); GL11.glTranslatef(0f, -0.68f, 0f); @@ -120,7 +119,7 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer GL11.glRotatef(90f, 0f, 1f, 0f); break; } - ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "belt/frame" + frame + ".png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "belt/frame" + frame + ".png"); bindTexture(name); MODEL.render(0.0625F, (float) Math.toRadians(tileEntity.wheelRotation), false, false, false, true); diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderFrackingPipe.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderFrackingPipe.java index 677d62389..3bad3508f 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderFrackingPipe.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderFrackingPipe.java @@ -8,14 +8,13 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelFrackingPipe; -import com.builtbroken.minecraft.DarkCore; /** @author Archadia */ public class RenderFrackingPipe extends TileEntitySpecialRenderer { public static final ModelFrackingPipe model = new ModelFrackingPipe(); - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "frackingpipe.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "frackingpipe.png"); @Override public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float f) diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderFurnace.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderFurnace.java index 321759f24..10d43ca80 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderFurnace.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderFurnace.java @@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelFurnace; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -18,7 +17,7 @@ public class RenderFurnace extends TileEntitySpecialRenderer { int type = 0; private ModelFurnace model; - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "Furnace.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "Furnace.png"); public RenderFurnace() { diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderGearPiston.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderGearPiston.java index f35e1484a..e0ac8562d 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderGearPiston.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderGearPiston.java @@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelGearPiston; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -17,7 +16,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class RenderGearPiston extends TileEntitySpecialRenderer { private ModelGearPiston model; - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "GearShaftPiston.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "GearShaftPiston.png"); public RenderGearPiston() { diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderManipulator.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderManipulator.java index cb1a76485..b1b68753a 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderManipulator.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderManipulator.java @@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelManipulator; import com.builtbroken.assemblyline.machine.TileEntityManipulator; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -28,12 +27,12 @@ public class RenderManipulator extends RenderImprintable if (tileEntity.isOutput()) { - ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "manipulator1.png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "manipulator1.png"); bindTexture(name); } else { - ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "manipulator2.png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "manipulator2.png"); bindTexture(name); } diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderMiningLaser.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderMiningLaser.java index 53789a84b..07d46c240 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderMiningLaser.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderMiningLaser.java @@ -9,14 +9,13 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelLaserTile; import com.builtbroken.assemblyline.machine.TileLaserSentry; -import com.builtbroken.minecraft.DarkCore; /** @author Darkguardsman */ public class RenderMiningLaser extends TileEntitySpecialRenderer { public static final ModelLaserTile model = new ModelLaserTile(); - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "LaserTile.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "LaserTile.png"); @Override public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float f) diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderMiningLaserGun.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderMiningLaserGun.java index d52991284..515ee4194 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderMiningLaserGun.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderMiningLaserGun.java @@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelMiningLaserGun; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.Side; @@ -20,7 +19,7 @@ public class RenderMiningLaserGun implements IItemRenderer { private static final ModelMiningLaserGun MODEL = new ModelMiningLaserGun(); - private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "LaserGun.png"); + private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "LaserGun.png"); @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderPipe.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderPipe.java index 32e427c64..ee4ce2feb 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderPipe.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderPipe.java @@ -16,7 +16,6 @@ import com.builtbroken.assemblyline.fluid.pipes.EnumPipeType; import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial; import com.builtbroken.assemblyline.fluid.pipes.TileEntityPipe; import com.builtbroken.common.Pair; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -27,7 +26,7 @@ public class RenderPipe extends TileEntitySpecialRenderer public static ModelLargePipe MODEL_PIPE = new ModelLargePipe(); public static ModelOpenTrough MODEL_TROUGH_PIPE = new ModelOpenTrough(); private static HashMap, ResourceLocation> TEXTURES = new HashMap, ResourceLocation>(); - public static ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "pipes/Pipe.png"); + public static ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "pipes/Pipe.png"); @Override public void renderTileEntityAt(TileEntity te, double d, double d1, double d2, float f) @@ -168,7 +167,7 @@ public class RenderPipe extends TileEntitySpecialRenderer { pipeName = EnumPipeType.get(pipeID).getName(pipeID); } - TEXTURES.put(index, new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "pipes/" + mat.matName + "/" + pipeName + "Pipe.png")); + TEXTURES.put(index, new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "pipes/" + mat.matName + "/" + pipeName + "Pipe.png")); } return TEXTURES.get(index); } diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderProcessor.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderProcessor.java index 96676ed4f..5eec3fe9f 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderProcessor.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderProcessor.java @@ -11,7 +11,6 @@ import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelCrusher; import com.builtbroken.assemblyline.client.model.ModelGrinder; import com.builtbroken.assemblyline.machine.processor.TileEntityProcessor; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -81,11 +80,11 @@ public class RenderProcessor extends TileEntitySpecialRenderer int g = meta / 4; if (g == 0) { - return new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "CrusherBlock.png"); + return new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "CrusherBlock.png"); } else if (g == 1) { - return new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "GrinderBlock.png"); + return new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "GrinderBlock.png"); } return null; diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderPump.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderPump.java index d8e2bc258..d53cb2df1 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderPump.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderPump.java @@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelPump; import com.builtbroken.assemblyline.fluid.pump.TileEntityStarterPump; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -19,7 +18,7 @@ public class RenderPump extends TileEntitySpecialRenderer { int type = 0; private ModelPump model; - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "pumps/WaterPump.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "pumps/WaterPump.png"); public RenderPump() { diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderRejector.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderRejector.java index a077f06e2..472f25af7 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderRejector.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderRejector.java @@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelRejectorPiston; import com.builtbroken.assemblyline.machine.TileEntityRejector; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -28,7 +27,7 @@ public class RenderRejector extends RenderImprintable { pos = 8; } - ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "rejector.png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "rejector.png"); bindTexture(name); GL11.glPushMatrix(); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderReleaseValve.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderReleaseValve.java index f1958fbed..6c61ca5d7 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderReleaseValve.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderReleaseValve.java @@ -10,7 +10,6 @@ import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelLargePipe; import com.builtbroken.assemblyline.client.model.ModelReleaseValve; import com.builtbroken.assemblyline.machine.TileEntityReleaseValve; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -22,7 +21,7 @@ public class RenderReleaseValve extends TileEntitySpecialRenderer private ModelReleaseValve valve; private TileEntity[] ents = new TileEntity[6]; - public static final ResourceLocation VALVE_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "ReleaseValve.png"); + public static final ResourceLocation VALVE_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "ReleaseValve.png"); public RenderReleaseValve() { diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderSink.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderSink.java index 312735897..913a6e771 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderSink.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderSink.java @@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelSink; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -19,7 +18,7 @@ public class RenderSink extends TileEntitySpecialRenderer int type = 0; private ModelSink model; - public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "Sink.png"); + public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "Sink.png"); public RenderSink() { diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderSteamGen.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderSteamGen.java index 223c9ed2c..d0223683f 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderSteamGen.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderSteamGen.java @@ -11,7 +11,6 @@ import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelMachine; import com.builtbroken.assemblyline.client.model.ModelSteamGen; import com.builtbroken.assemblyline.client.model.ModelSteamTurbine; -import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.prefab.TileEntityMachine; import cpw.mods.fml.relauncher.Side; @@ -23,8 +22,8 @@ public class RenderSteamGen extends TileEntitySpecialRenderer 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(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "SmallSteamFan.png"); - public static final ResourceLocation STEAM_GEN_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "SteamGenerator.png"); + public static final ResourceLocation TURBINE_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "SmallSteamFan.png"); + public static final ResourceLocation STEAM_GEN_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "SteamGenerator.png"); private static float rot1 = 0; @Override diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderTestCar.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderTestCar.java index 9b8bc7207..4ed1d984a 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderTestCar.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderTestCar.java @@ -11,7 +11,6 @@ import org.lwjgl.opengl.GL11; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelTestCar; import com.builtbroken.assemblyline.entities.prefab.EntityAdvanced; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -19,7 +18,7 @@ import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderTestCar extends Render { - private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "TestCar.png"); + private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "TestCar.png"); /** instance of ModelBoat for rendering */ protected ModelBase modelBoat; diff --git a/src/main/java/com/builtbroken/assemblyline/client/render/RenderTurkey.java b/src/main/java/com/builtbroken/assemblyline/client/render/RenderTurkey.java index da93bb794..874e5b04a 100644 --- a/src/main/java/com/builtbroken/assemblyline/client/render/RenderTurkey.java +++ b/src/main/java/com/builtbroken/assemblyline/client/render/RenderTurkey.java @@ -10,7 +10,6 @@ import net.minecraft.util.ResourceLocation; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.client.model.ModelTurkey; import com.builtbroken.assemblyline.entities.EntityTurkey; -import com.builtbroken.minecraft.DarkCore; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -18,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderTurkey extends RenderLiving { - private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "Turkey.png"); + private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "Turkey.png"); public RenderTurkey() { diff --git a/src/main/java/com/builtbroken/assemblyline/entities/prefab/EntityVehicle.java b/src/main/java/com/builtbroken/assemblyline/entities/prefab/EntityVehicle.java index 9cbb9e36f..c75e63473 100644 --- a/src/main/java/com/builtbroken/assemblyline/entities/prefab/EntityVehicle.java +++ b/src/main/java/com/builtbroken/assemblyline/entities/prefab/EntityVehicle.java @@ -12,10 +12,8 @@ import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.DamageSource; import net.minecraft.world.World; +import com.builtbroken.assemblyline.network.ISimplePacketReceiver; import com.builtbroken.minecraft.interfaces.IControlReceiver; -import com.builtbroken.minecraft.network.ISimplePacketReceiver; -import com.builtbroken.minecraft.network.PacketManagerEntity; -import com.builtbroken.minecraft.network.PacketManagerKeyEvent; import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.client.FMLClientHandler; @@ -38,7 +36,7 @@ public abstract class EntityVehicle extends EntityAdvanced implements IControlRe this.ignoreFrustumCheck = true; this.isImmuneToFire = true; this.yOffset = 0.45f; - PacketManagerKeyEvent.instance().register(this); + //PacketManagerKeyEvent.instance().register(this); } public EntityVehicle(World world, double xx, double yy, double zz) @@ -205,7 +203,7 @@ public abstract class EntityVehicle extends EntityAdvanced implements IControlRe if (ticks % 5 == 0) { if (worldObj.isRemote) - PacketManagerEntity.sendEntityUpdatePacket(this, this.worldObj.isRemote, "Desc", this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch, this.motionX, this.motionY, this.motionZ); + // PacketManagerEntity.sendEntityUpdatePacket(this, this.worldObj.isRemote, "Desc", this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch, this.motionX, this.motionY, this.motionZ); if (!this.worldObj.isRemote) { diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/EnumFluid.java b/src/main/java/com/builtbroken/assemblyline/fluid/EnumFluid.java new file mode 100644 index 000000000..b992d1ffe --- /dev/null +++ b/src/main/java/com/builtbroken/assemblyline/fluid/EnumFluid.java @@ -0,0 +1,21 @@ +package com.builtbroken.assemblyline.fluid; + +import net.minecraftforge.fluids.Fluid; + +/** Some common Fluid that other mods use + * + * @author DarkGuardsman */ +public enum EnumFluid +{ + FUEL(new Fluid("fuel").setUnlocalizedName("fluid.fuel.name")), + OIL(new Fluid("oil").setUnlocalizedName("fluid.oil.name").setDensity(1500).setViscosity(4700)), + BIOFUEL(new Fluid("biofuel").setUnlocalizedName("fluid.biofuel.name")), + WASTE(new Fluid("waste").setUnlocalizedName("fluid.waste.name").setDensity(1300).setViscosity(1800)); + + public final Fluid fluid; + + private EnumFluid(Fluid fluid) + { + this.fluid = fluid; + } +} diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/EnumGas.java b/src/main/java/com/builtbroken/assemblyline/fluid/EnumGas.java new file mode 100644 index 000000000..7d1bcc320 --- /dev/null +++ b/src/main/java/com/builtbroken/assemblyline/fluid/EnumGas.java @@ -0,0 +1,76 @@ +package com.builtbroken.assemblyline.fluid; + +import com.builtbroken.common.science.ChemElement; +import com.builtbroken.common.science.ChemicalCompound; + +/** Enum of gases used to create all the gas fluids + * + * @author DarkGuardsman */ +public enum EnumGas +{ + CARBONDIOXIDE("Carbon DiOxide", false), + OXYGEN(ChemElement.Oxygen, 2f, true), + BUTANE(ChemicalCompound.BUTANE, true), + METHANE(ChemicalCompound.METHANE, true), + NATURAL_GAS("Natural Gas", false), + PROPANE("Propane", false); + + /** Name used when creating this as a fluid */ + public final String fluidName; + /** Name used to display to the players */ + public final String name; + /** Object data reference that was used to create this gas, can be a ChemicalCompound, Element, + * or Fluid */ + public final Object data; + public boolean enabled = false; + /** Only used for elements since when used as a gas they sometimes bind together */ + private float molePerGasMolecule = 1.0f; + /** Local instance of the gas used when the getGas method is called */ + private Gas gas; + + private EnumGas(String name, boolean enabled) + { + this.fluidName = name.replace(" ", "").toLowerCase(); + this.name = name; + data = null; + this.enabled = enabled; + } + + private EnumGas(ChemicalCompound compound, boolean enabled) + { + this.fluidName = "gas:" + compound.compoundName.replace(" ", "").toLowerCase(); + this.name = compound.compoundName; + data = compound; + this.enabled = enabled; + } + + private EnumGas(ChemElement element, float molesPerGasMolecule, boolean enabled) + { + this.fluidName = "gas:" + element.elementName.replace(" ", "").toLowerCase(); + this.name = element.elementName; + data = element; + this.enabled = enabled; + this.molePerGasMolecule = molesPerGasMolecule; + } + + public Gas getGas() + { + if (gas == null) + { + gas = new Gas(fluidName); + if (data instanceof ChemElement) + { + gas.setDensity((int) ((ChemElement) data).density * 1000); + } + else if (data instanceof ChemicalCompound) + { + gas.setDensity((int) ((ChemicalCompound) data).density * 1000); + } + else + { + gas.setDensity(-1000); + } + } + return gas; + } +} diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/FilteredTank.java b/src/main/java/com/builtbroken/assemblyline/fluid/FilteredTank.java new file mode 100644 index 000000000..cd08a8e97 --- /dev/null +++ b/src/main/java/com/builtbroken/assemblyline/fluid/FilteredTank.java @@ -0,0 +1,58 @@ +package com.builtbroken.assemblyline.fluid; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; + +/** Tank that has a filter on the fluid ids it will accept + * + * @author DarkGuardsman */ +public class FilteredTank extends FluidTank +{ + private List fluidIds = new ArrayList(); + boolean gas = true; + boolean liquid = true; + + public FilteredTank(int capacity, int... fluidIds) + { + this(capacity, true, true, fluidIds); + } + + public FilteredTank(int capacity, boolean gas, boolean liquid, int... fluidIds) + { + super(capacity); + this.gas = gas; + this.liquid = liquid; + for (int id : fluidIds) + { + this.fluidIds.add(id); + } + } + + public FilteredTank(FluidStack stack, int capacity) + { + super(stack, capacity); + } + + public FilteredTank(Fluid fluid, int amount, int capacity) + { + super(fluid, amount, capacity); + } + + @Override + public int fill(FluidStack resource, boolean doFill) + { + if (resource != null && resource.getFluid() != null && (!gas || gas && resource.getFluid().isGaseous()) && (!liquid || liquid && !resource.getFluid().isGaseous())) + { + if (fluidIds.contains(resource.fluidID)) + { + return super.fill(resource, doFill); + } + } + return 0; + } + +} diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/network/FluidCraftingHandler.java b/src/main/java/com/builtbroken/assemblyline/fluid/FluidCraftingHandler.java similarity index 98% rename from src/main/java/com/builtbroken/assemblyline/fluid/network/FluidCraftingHandler.java rename to src/main/java/com/builtbroken/assemblyline/fluid/FluidCraftingHandler.java index d3737badf..148fff182 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/network/FluidCraftingHandler.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/FluidCraftingHandler.java @@ -1,4 +1,4 @@ -package com.builtbroken.assemblyline.fluid.network; +package com.builtbroken.assemblyline.fluid; import java.util.ArrayList; import java.util.HashMap; @@ -12,9 +12,10 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import com.builtbroken.assemblyline.fluid.network.FluidRecipeInfo.SimpleFluidRecipe; +import com.builtbroken.assemblyline.fluid.network.IFluidRecipeCrafter; import com.builtbroken.common.Pair; import com.builtbroken.common.Triple; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; /** Handles all kinds of process involving mixing Fluids with other fluids and/or Items, Blocks, * ItemStack, or Liquids diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/Gas.java b/src/main/java/com/builtbroken/assemblyline/fluid/Gas.java new file mode 100644 index 000000000..015f0aea3 --- /dev/null +++ b/src/main/java/com/builtbroken/assemblyline/fluid/Gas.java @@ -0,0 +1,17 @@ +package com.builtbroken.assemblyline.fluid; + +import net.minecraftforge.fluids.Fluid; + +/** These is an extension of the Fluid system forcing it to be a gas on creation + * + * @author Archadia, DarkGuardsman */ +public class Gas extends Fluid +{ + + public Gas(String name) + { + super(name); + this.isGaseous = true; + this.density = -1000; + } +} diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/GasTank.java b/src/main/java/com/builtbroken/assemblyline/fluid/GasTank.java new file mode 100644 index 000000000..3a6241b03 --- /dev/null +++ b/src/main/java/com/builtbroken/assemblyline/fluid/GasTank.java @@ -0,0 +1,38 @@ +package com.builtbroken.assemblyline.fluid; + +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; + +/** Version of the fluid tank that is restricted to gases only + * + * @author DarkGuardsman */ +public class GasTank extends FluidTank +{ + + public GasTank(int capacity) + { + super(capacity); + } + + public GasTank(FluidStack stack, int capacity) + { + super(stack, capacity); + } + + public GasTank(Fluid fluid, int amount, int capacity) + { + super(fluid, amount, capacity); + } + + @Override + public int fill(FluidStack resource, boolean doFill) + { + if (resource != null && resource.getFluid() != null && resource.getFluid().isGaseous()) + { + return super.fill(resource, doFill); + } + return 0; + } + +} diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/LiquidTank.java b/src/main/java/com/builtbroken/assemblyline/fluid/LiquidTank.java new file mode 100644 index 000000000..d931393b0 --- /dev/null +++ b/src/main/java/com/builtbroken/assemblyline/fluid/LiquidTank.java @@ -0,0 +1,38 @@ +package com.builtbroken.assemblyline.fluid; + +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; + +/** Version of the fluid tank that only supports liquids + * + * @author DarkGuardsman */ +public class LiquidTank extends FluidTank +{ + + public LiquidTank(int capacity) + { + super(capacity); + } + + public LiquidTank(FluidStack stack, int capacity) + { + super(stack, capacity); + } + + public LiquidTank(Fluid fluid, int amount, int capacity) + { + super(fluid, amount, capacity); + } + + @Override + public int fill(FluidStack resource, boolean doFill) + { + if (resource != null && resource.getFluid() != null && !resource.getFluid().isGaseous()) + { + return super.fill(resource, doFill); + } + return 0; + } + +} diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkFluidContainers.java b/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkFluidContainers.java index e68df5a5b..474d7f0fe 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkFluidContainers.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkFluidContainers.java @@ -8,7 +8,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.tilenetwork.INetworkPart; import com.builtbroken.minecraft.tilenetwork.prefab.NetworkUpdateHandler; diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkFluidTiles.java b/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkFluidTiles.java index 6f3fbf07e..65d636ebd 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkFluidTiles.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkFluidTiles.java @@ -14,7 +14,8 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.assemblyline.fluid.FluidCraftingHandler; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.tilenetwork.INetworkPart; import com.builtbroken.minecraft.tilenetwork.ITileNetwork; import com.builtbroken.minecraft.tilenetwork.prefab.NetworkTileEntities; diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkPipes.java b/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkPipes.java index 027d431a1..1aefae7eb 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkPipes.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/network/NetworkPipes.java @@ -9,7 +9,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; import com.builtbroken.assemblyline.api.fluid.INetworkPipe; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.tilenetwork.INetworkPart; import com.builtbroken.minecraft.tilenetwork.prefab.NetworkUpdateHandler; diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/pipes/BlockPipe.java b/src/main/java/com/builtbroken/assemblyline/fluid/pipes/BlockPipe.java index d9b046a53..6dc4b788f 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/pipes/BlockPipe.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/pipes/BlockPipe.java @@ -20,7 +20,7 @@ import universalelectricity.api.vector.Vector3; import com.builtbroken.assemblyline.blocks.BlockHydraulic; import com.builtbroken.common.Pair; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.helpers.ColorCode; import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded; diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/pipes/TileEntityPipe.java b/src/main/java/com/builtbroken/assemblyline/fluid/pipes/TileEntityPipe.java index 86dca5f8d..7d08f7a53 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/pipes/TileEntityPipe.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/pipes/TileEntityPipe.java @@ -10,7 +10,7 @@ import universalelectricity.api.vector.Vector3; import com.builtbroken.assemblyline.api.fluid.INetworkPipe; import com.builtbroken.assemblyline.fluid.network.NetworkPipes; import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidNetworkTile; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.helpers.ColorCode; import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded; import com.builtbroken.minecraft.tilenetwork.ITileConnector; diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/prefab/TileEntityFluidNetworkTile.java b/src/main/java/com/builtbroken/assemblyline/fluid/prefab/TileEntityFluidNetworkTile.java index f4034f234..2f7dcc252 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/prefab/TileEntityFluidNetworkTile.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/prefab/TileEntityFluidNetworkTile.java @@ -21,14 +21,14 @@ import net.minecraftforge.fluids.FluidTankInfo; import org.bouncycastle.util.Arrays; import universalelectricity.api.vector.Vector3; +import calclavia.lib.network.PacketHandler; +import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.api.fluid.FluidMasterList; import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart; import com.builtbroken.assemblyline.fluid.network.NetworkFluidTiles; import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial; -import com.builtbroken.minecraft.DarkCore; -import com.builtbroken.minecraft.network.ISimplePacketReceiver; -import com.builtbroken.minecraft.network.PacketHandler; +import com.builtbroken.assemblyline.network.ISimplePacketReceiver; import com.builtbroken.minecraft.tilenetwork.INetworkPart; import com.builtbroken.minecraft.tilenetwork.ITileNetwork; import com.google.common.io.ByteArrayDataInput; @@ -382,7 +382,7 @@ public abstract class TileEntityFluidNetworkTile extends TileEntityFluidDevice i this.renderConnection[4] = data.readBoolean(); this.renderConnection[5] = data.readBoolean(); this.tank = new FluidTank(data.readInt()); - this.getTank().readFromNBT(PacketHandler.instance().readNBTTagCompound(data)); + this.getTank().readFromNBT(PacketHandler.readNBTTagCompound(data)); this.internalTanksInfo[0] = this.getTank().getInfo(); return true; } @@ -400,7 +400,7 @@ public abstract class TileEntityFluidNetworkTile extends TileEntityFluidDevice i else if (id.equalsIgnoreCase("SingleTank")) { this.tank = new FluidTank(data.readInt()); - this.getTank().readFromNBT(PacketHandler.instance().readNBTTagCompound(data)); + this.getTank().readFromNBT(PacketHandler.readNBTTagCompound(data)); this.internalTanksInfo[0] = this.getTank().getInfo(); return true; } @@ -428,7 +428,7 @@ public abstract class TileEntityFluidNetworkTile extends TileEntityFluidDevice i data[6] = this.renderConnection[5]; data[7] = this.getTank().getCapacity(); data[8] = this.getTank().writeToNBT(new NBTTagCompound()); - return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "DescriptionPacket", this, data); + return AssemblyLine.getTilePacket().getPacket(this, "DescriptionPacket", data); } public void sendRenderUpdate() @@ -441,14 +441,14 @@ public abstract class TileEntityFluidNetworkTile extends TileEntityFluidDevice i data[4] = this.renderConnection[3]; data[5] = this.renderConnection[4]; data[6] = this.renderConnection[5]; - PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "RenderPacket", this, data)); + PacketHandler.sendPacketToClients(AssemblyLine.getTilePacket().getPacket(this, "RenderPacket", data)); } public void sendTankUpdate(int index) { if (this.getTank() != null && index == 0) { - PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "SingleTank", this, this.getTank().getCapacity(), this.getTank().writeToNBT(new NBTTagCompound())), this.worldObj, new Vector3(this), 60); + PacketHandler.sendPacketToClients(AssemblyLine.getTilePacket().getPacket(this, "SingleTank", this.getTank().getCapacity(), this.getTank().writeToNBT(new NBTTagCompound())), this.worldObj, new Vector3(this), 60); } } diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/prefab/TileEntityFluidStorage.java b/src/main/java/com/builtbroken/assemblyline/fluid/prefab/TileEntityFluidStorage.java index bd77fa3c3..503c0040b 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/prefab/TileEntityFluidStorage.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/prefab/TileEntityFluidStorage.java @@ -11,7 +11,7 @@ import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded; public abstract class TileEntityFluidStorage extends TileEntityFluidDevice implements IFluidHandler, IColorCoded diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/pump/LiquidPathFinder.java b/src/main/java/com/builtbroken/assemblyline/fluid/pump/LiquidPathFinder.java index f4e57867c..fee9c54c3 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/pump/LiquidPathFinder.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/pump/LiquidPathFinder.java @@ -14,7 +14,7 @@ import net.minecraftforge.common.ForgeDirection; import universalelectricity.api.vector.Vector2; import universalelectricity.api.vector.Vector3; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; /** A simpler path Finder used to find drainable or fillable tiles * diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/pump/TileEntityDrain.java b/src/main/java/com/builtbroken/assemblyline/fluid/pump/TileEntityDrain.java index 8e8b9a3de..1391387a6 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/pump/TileEntityDrain.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/pump/TileEntityDrain.java @@ -20,7 +20,7 @@ import universalelectricity.api.vector.Vector3; import com.builtbroken.assemblyline.api.fluid.IDrain; import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidDevice; import com.builtbroken.common.Pair; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; public class TileEntityDrain extends TileEntityFluidDevice implements IFluidHandler, IDrain { diff --git a/src/main/java/com/builtbroken/assemblyline/fluid/pump/TileEntityStarterPump.java b/src/main/java/com/builtbroken/assemblyline/fluid/pump/TileEntityStarterPump.java index 37f97ceb9..17ed3c06e 100644 --- a/src/main/java/com/builtbroken/assemblyline/fluid/pump/TileEntityStarterPump.java +++ b/src/main/java/com/builtbroken/assemblyline/fluid/pump/TileEntityStarterPump.java @@ -14,7 +14,7 @@ import universalelectricity.api.vector.Vector3; import com.builtbroken.assemblyline.api.fluid.IDrain; import com.builtbroken.common.Pair; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.interfaces.IToolReadOut; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.builtbroken.minecraft.tilenetwork.ITileConnector; diff --git a/src/main/java/com/builtbroken/assemblyline/imprinter/ContainerImprinter.java b/src/main/java/com/builtbroken/assemblyline/imprinter/ContainerImprinter.java index 674e00d64..207e60dad 100644 --- a/src/main/java/com/builtbroken/assemblyline/imprinter/ContainerImprinter.java +++ b/src/main/java/com/builtbroken/assemblyline/imprinter/ContainerImprinter.java @@ -6,10 +6,9 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.minecraft.prefab.invgui.ISlotWatcher; import com.builtbroken.minecraft.prefab.invgui.SlotCraftingResult; -import com.builtbroken.minecraft.prefab.invgui.SlotRestricted; +import com.builtbroken.minecraft.prefab.invgui.SlotSpecific; import com.builtbroken.minecraft.prefab.invgui.WatchedSlot; public class ContainerImprinter extends Container implements ISlotWatcher @@ -33,7 +32,7 @@ public class ContainerImprinter extends Container implements ISlotWatcher } // Imprint Input for Imprinting - this.addSlotToContainer(new SlotRestricted(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START, 68, 34, new ItemStack(ALRecipeLoader.itemImprint))); + this.addSlotToContainer(new SlotSpecific(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START, 68, 34, ItemImprinter.class)); // Item to be imprinted this.addSlotToContainer(new WatchedSlot(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START + 1, 92, 34, this)); // Result of Crafting/Imprinting diff --git a/src/main/java/com/builtbroken/assemblyline/item/ItemReadoutTools.java b/src/main/java/com/builtbroken/assemblyline/item/ItemReadoutTools.java index 8190f7177..a45a2cb0a 100644 --- a/src/main/java/com/builtbroken/assemblyline/item/ItemReadoutTools.java +++ b/src/main/java/com/builtbroken/assemblyline/item/ItemReadoutTools.java @@ -27,7 +27,7 @@ import cofh.api.energy.IEnergyStorage; import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.machine.TileEntityGenerator; import com.builtbroken.minecraft.DarkCore; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.interfaces.IToolReadOut; import com.builtbroken.minecraft.interfaces.IToolReadOut.EnumTools; import com.builtbroken.minecraft.prefab.ItemBasic; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/BlockSink.java b/src/main/java/com/builtbroken/assemblyline/machine/BlockSink.java index 75fd2ce79..e994639a2 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/BlockSink.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/BlockSink.java @@ -14,7 +14,7 @@ import net.minecraft.world.World; import com.builtbroken.assemblyline.blocks.BlockHydraulic; import com.builtbroken.assemblyline.client.render.BlockRenderHelper; import com.builtbroken.common.Pair; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.prefab.TileEntityAdvanced; import cpw.mods.fml.relauncher.Side; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/BlockTank.java b/src/main/java/com/builtbroken/assemblyline/machine/BlockTank.java index ec063a42f..01f8d9384 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/BlockTank.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/BlockTank.java @@ -20,7 +20,7 @@ import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial; import com.builtbroken.assemblyline.fluid.pipes.ItemBlockPipe; import com.builtbroken.assemblyline.fluid.pipes.TileEntityPipe; import com.builtbroken.common.Pair; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.helpers.HelperMethods; import cpw.mods.fml.relauncher.Side; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityBatteryBox.java b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityBatteryBox.java index 0d387c769..2846cb716 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityBatteryBox.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityBatteryBox.java @@ -6,8 +6,8 @@ import net.minecraft.inventory.Container; import net.minecraft.network.packet.Packet; import net.minecraftforge.common.ForgeDirection; import universalelectricity.api.CompatibilityModule; +import calclavia.lib.network.PacketHandler; -import com.builtbroken.minecraft.network.PacketHandler; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.google.common.io.ByteArrayDataInput; @@ -31,7 +31,7 @@ public class TileEntityBatteryBox extends TileEntityEnergyMachine { super.updateEntity(); - if (!this.worldObj.isRemote && this.enabled && !this.isDisabled()) + if (!this.worldObj.isRemote && this.enabled) { /** Recharges electric item. */ this.setEnergy(ForgeDirection.UNKNOWN, this.getEnergy(ForgeDirection.UNKNOWN) - CompatibilityModule.chargeItem(this.getStackInSlot(0), Math.min(10000, this.getEnergyStored()), true)); diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityCrate.java b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityCrate.java index 37c4f52e7..9bc7438c3 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityCrate.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityCrate.java @@ -4,11 +4,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.packet.Packet; import net.minecraftforge.common.ForgeDirection; +import calclavia.lib.network.PacketHandler; -import com.builtbroken.minecraft.DarkCore; +import com.builtbroken.assemblyline.AssemblyLine; +import com.builtbroken.assemblyline.network.ISimplePacketReceiver; import com.builtbroken.minecraft.interfaces.IExtendedStorage; -import com.builtbroken.minecraft.network.ISimplePacketReceiver; -import com.builtbroken.minecraft.network.PacketHandler; import com.builtbroken.minecraft.prefab.TileEntityInv; import com.google.common.io.ByteArrayDataInput; @@ -226,11 +226,11 @@ public class TileEntityCrate extends TileEntityInv implements ISimplePacketRecei ItemStack stack = this.getSampleStack(); if (stack != null) { - return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "InventoryItem", this, true, stack.writeToNBT(new NBTTagCompound()), stack.stackSize); + return PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, "InventoryItem", this, true, stack.writeToNBT(new NBTTagCompound()), stack.stackSize); } else { - return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "InventoryItem", this, false); + return PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, "InventoryItem", this, false); } } diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityDetector.java b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityDetector.java index f3d33ffd3..9d1c88a2c 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityDetector.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityDetector.java @@ -9,10 +9,10 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.packet.Packet; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.ForgeDirection; +import calclavia.lib.network.PacketHandler; import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.assemblyline.imprinter.prefab.TileEntityFilterable; -import com.builtbroken.minecraft.network.PacketHandler; import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.common.network.Player; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityGenerator.java b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityGenerator.java index 8b72e2d94..60b74e583 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityGenerator.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityGenerator.java @@ -68,7 +68,7 @@ public abstract class TileEntityGenerator extends TileEntityEnergyMachine @Override public boolean canFunction() { - return this.enabled && !this.isDisabled() && this.hasFuel(); + return this.enabled && this.hasFuel(); } /** Does this generator have fuel time left to burn */ diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityInfFluid.java b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityInfFluid.java index 4976fd5d5..1353ef59d 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityInfFluid.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityInfFluid.java @@ -16,7 +16,7 @@ import net.minecraftforge.fluids.IFluidHandler; import universalelectricity.api.vector.Vector3; import com.builtbroken.common.lang.TextHelper.TextColor; -import com.builtbroken.minecraft.fluid.FluidHelper; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.interfaces.IBlockActivated; public class TileEntityInfFluid extends TileEntity implements IFluidHandler, IBlockActivated diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityManipulator.java b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityManipulator.java index 176d196d4..2be28ee5a 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityManipulator.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityManipulator.java @@ -9,13 +9,13 @@ import net.minecraft.network.packet.Packet; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.ForgeDirection; import universalelectricity.api.vector.Vector3; +import calclavia.lib.network.PacketHandler; import com.builtbroken.assemblyline.api.IManipulator; import com.builtbroken.assemblyline.imprinter.ItemImprinter; import com.builtbroken.assemblyline.imprinter.prefab.TileEntityFilterable; import com.builtbroken.minecraft.helpers.InvInteractionHelper; import com.builtbroken.minecraft.interfaces.IRotatable; -import com.builtbroken.minecraft.network.PacketHandler; import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.common.network.Player; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityRejector.java b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityRejector.java index 6458c3ace..febcedfec 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileEntityRejector.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileEntityRejector.java @@ -10,10 +10,10 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.ForgeDirection; import universalelectricity.api.vector.Vector3; +import calclavia.lib.network.PacketHandler; import com.builtbroken.assemblyline.api.IBelt; import com.builtbroken.assemblyline.imprinter.prefab.TileEntityFilterable; -import com.builtbroken.minecraft.network.PacketHandler; import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.common.network.Player; @@ -35,7 +35,7 @@ public class TileEntityRejector extends TileEntityFilterable { super.updateEntity(); /** Has to update a bit faster than a conveyer belt */ - if (this.ticks % 5 == 0 && !this.isDisabled()) + if (this.ticks % 5 == 0) { this.firePiston = false; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileEntitySink.java b/src/main/java/com/builtbroken/assemblyline/machine/TileEntitySink.java index 0b18db9b7..e39d696e0 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileEntitySink.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileEntitySink.java @@ -7,12 +7,12 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import calclavia.lib.network.PacketHandler; +import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidStorage; -import com.builtbroken.minecraft.DarkCore; +import com.builtbroken.assemblyline.network.ISimplePacketReceiver; import com.builtbroken.minecraft.helpers.ColorCode; -import com.builtbroken.minecraft.network.ISimplePacketReceiver; -import com.builtbroken.minecraft.network.PacketHandler; import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.common.network.Player; @@ -45,7 +45,7 @@ public class TileEntitySink extends TileEntityFluidStorage implements ISimplePac { stack = this.getTank().getFluid(); } - return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "FluidLevel", this, stack.writeToNBT(new NBTTagCompound())); + return PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, "FluidLevel", this, stack.writeToNBT(new NBTTagCompound())); } @Override diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileFracker.java b/src/main/java/com/builtbroken/assemblyline/machine/TileFracker.java index 16795c46e..7b67af72a 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileFracker.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileFracker.java @@ -11,9 +11,9 @@ import net.minecraftforge.fluids.IFluidHandler; import universalelectricity.api.vector.Vector3; import com.builtbroken.assemblyline.ALRecipeLoader; -import com.builtbroken.minecraft.fluid.EnumGas; -import com.builtbroken.minecraft.fluid.FluidHelper; -import com.builtbroken.minecraft.fluid.GasTank; +import com.builtbroken.assemblyline.fluid.EnumGas; +import com.builtbroken.assemblyline.fluid.GasTank; +import com.builtbroken.minecraft.FluidHelper; import com.builtbroken.minecraft.interfaces.IBlockActivated; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileGasBurner.java b/src/main/java/com/builtbroken/assemblyline/machine/TileGasBurner.java index c2f347a97..981419f5d 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileGasBurner.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileGasBurner.java @@ -6,7 +6,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import com.builtbroken.minecraft.fluid.GasTank; +import com.builtbroken.assemblyline.fluid.GasTank; import com.builtbroken.minecraft.prefab.TileEntityMachine; /** @author Archadia */ diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileGasCombustionEngine.java b/src/main/java/com/builtbroken/assemblyline/machine/TileGasCombustionEngine.java index 44cb9ecf7..d66686ef6 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileGasCombustionEngine.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileGasCombustionEngine.java @@ -8,8 +8,8 @@ import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import com.builtbroken.minecraft.fluid.EnumGas; -import com.builtbroken.minecraft.fluid.GasTank; +import com.builtbroken.assemblyline.fluid.EnumGas; +import com.builtbroken.assemblyline.fluid.GasTank; import com.builtbroken.minecraft.prefab.TileEntityAdvanced; import com.builtbroken.minecraft.tilenetwork.ITileConnector.Connection; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileLaserDrill.java b/src/main/java/com/builtbroken/assemblyline/machine/TileLaserDrill.java index dc18303cc..87841be00 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileLaserDrill.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileLaserDrill.java @@ -9,11 +9,11 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.MinecraftForge; import universalelectricity.api.vector.Vector3; +import calclavia.lib.network.PacketHandler; import com.builtbroken.minecraft.CoreRegistry; import com.builtbroken.minecraft.LaserEvent; import com.builtbroken.minecraft.helpers.RayTraceHelper; -import com.builtbroken.minecraft.network.PacketHandler; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.google.common.io.ByteArrayDataInput; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/TileLaserSentry.java b/src/main/java/com/builtbroken/assemblyline/machine/TileLaserSentry.java index 48a71312a..ccac4fe73 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/TileLaserSentry.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/TileLaserSentry.java @@ -9,11 +9,11 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.MinecraftForge; import universalelectricity.api.vector.Vector3; +import calclavia.lib.network.PacketHandler; import com.builtbroken.minecraft.CoreRegistry; import com.builtbroken.minecraft.LaserEvent; import com.builtbroken.minecraft.helpers.RayTraceHelper; -import com.builtbroken.minecraft.network.PacketHandler; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.google.common.io.ByteArrayDataInput; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/belt/TileEntityConveyorBelt.java b/src/main/java/com/builtbroken/assemblyline/machine/belt/TileEntityConveyorBelt.java index 3ed2c588c..52f0df3aa 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/belt/TileEntityConveyorBelt.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/belt/TileEntityConveyorBelt.java @@ -11,12 +11,12 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.ForgeDirection; import universalelectricity.api.vector.Vector3; +import calclavia.lib.network.PacketHandler; import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.assemblyline.api.IBelt; import com.builtbroken.assemblyline.machine.TileEntityAssembly; import com.builtbroken.minecraft.interfaces.IRotatable; -import com.builtbroken.minecraft.network.PacketHandler; import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.common.network.Player; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/encoder/ContainerEncoder.java b/src/main/java/com/builtbroken/assemblyline/machine/encoder/ContainerEncoder.java index 8fe6ea31c..1d62c52b6 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/encoder/ContainerEncoder.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/encoder/ContainerEncoder.java @@ -6,8 +6,7 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import com.builtbroken.assemblyline.ALRecipeLoader; -import com.builtbroken.minecraft.prefab.invgui.SlotRestricted; +import com.builtbroken.minecraft.prefab.invgui.SlotSpecific; public class ContainerEncoder extends Container { @@ -21,7 +20,7 @@ public class ContainerEncoder extends Container this.tileEntity = encoder; // Disk - this.addSlotToContainer(new SlotRestricted(encoder, 0, 80, 24 + Y_OFFSET, new ItemStack(ALRecipeLoader.itemDisk))); + this.addSlotToContainer(new SlotSpecific(encoder, 0, 80, 24 + Y_OFFSET, ItemDisk.class)); int row; diff --git a/src/main/java/com/builtbroken/assemblyline/machine/encoder/TileEntityEncoder.java b/src/main/java/com/builtbroken/assemblyline/machine/encoder/TileEntityEncoder.java index 71a417c72..b5e74ab69 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/encoder/TileEntityEncoder.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/encoder/TileEntityEncoder.java @@ -8,14 +8,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.packet.Packet; import universalelectricity.api.vector.Vector2; +import calclavia.lib.network.PacketHandler; +import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.api.coding.IProgram; import com.builtbroken.assemblyline.api.coding.ITask; import com.builtbroken.assemblyline.api.coding.TaskRegistry; import com.builtbroken.assemblyline.armbot.Program; import com.builtbroken.assemblyline.armbot.command.TaskRotateTo; -import com.builtbroken.minecraft.DarkCore; -import com.builtbroken.minecraft.network.PacketHandler; import com.builtbroken.minecraft.prefab.TileEntityMachine; import com.google.common.io.ByteArrayDataInput; @@ -184,7 +184,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent { this.program.save(tag); } - return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, TileEntityEncoder.PROGRAM_PACKET_ID, this, exists, tag); + return PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, TileEntityEncoder.PROGRAM_PACKET_ID, this, exists, tag); } @@ -194,7 +194,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent { if (this.worldObj.isRemote) { - PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, TileEntityEncoder.REMOVE_TASK_PACKET_ID, this, vec.intX(), vec.intY())); + PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, TileEntityEncoder.REMOVE_TASK_PACKET_ID, this, vec.intX(), vec.intY())); } else { @@ -212,7 +212,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent { NBTTagCompound nbt = new NBTTagCompound(); editTask.save(nbt); - PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, TileEntityEncoder.PROGRAM_CHANGE_PACKET_ID, this, editTask.getMethodName(), editTask.getCol(), editTask.getRow(), nbt)); + PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, TileEntityEncoder.PROGRAM_CHANGE_PACKET_ID, this, editTask.getMethodName(), editTask.getCol(), editTask.getRow(), nbt)); } else { @@ -230,7 +230,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent { NBTTagCompound nbt = new NBTTagCompound(); editTask.save(nbt); - PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, TileEntityEncoder.NEW_TASK_PACKET_ID, this, editTask.getMethodName(), editTask.getCol(), editTask.getRow(), nbt)); + PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, TileEntityEncoder.NEW_TASK_PACKET_ID, this, editTask.getMethodName(), editTask.getCol(), editTask.getRow(), nbt)); } else { diff --git a/src/main/java/com/builtbroken/assemblyline/machine/processor/TileEntityProcessor.java b/src/main/java/com/builtbroken/assemblyline/machine/processor/TileEntityProcessor.java index ec916fd30..44cd90df0 100644 --- a/src/main/java/com/builtbroken/assemblyline/machine/processor/TileEntityProcessor.java +++ b/src/main/java/com/builtbroken/assemblyline/machine/processor/TileEntityProcessor.java @@ -5,10 +5,10 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.packet.Packet; import net.minecraftforge.common.ForgeDirection; import universalelectricity.api.item.IEnergyItem; +import calclavia.lib.network.PacketHandler; import com.builtbroken.assemblyline.machine.processor.BlockProcessor.ProcessorData; import com.builtbroken.minecraft.interfaces.IInvBox; -import com.builtbroken.minecraft.network.PacketHandler; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.builtbroken.minecraft.prefab.invgui.InvChest; import com.builtbroken.minecraft.recipes.MachineRecipeHandler; diff --git a/src/main/java/com/builtbroken/assemblyline/network/ISimplePacketReceiver.java b/src/main/java/com/builtbroken/assemblyline/network/ISimplePacketReceiver.java new file mode 100644 index 000000000..84fe8ed80 --- /dev/null +++ b/src/main/java/com/builtbroken/assemblyline/network/ISimplePacketReceiver.java @@ -0,0 +1,21 @@ +package com.builtbroken.assemblyline.network; + +import com.google.common.io.ByteArrayDataInput; + +import cpw.mods.fml.common.network.Player; + +/** Simplified version of IPackerReceiver for tiles that only need a packet ID, data, and player + * Reference + * + * @author DarkGuardsman */ +public interface ISimplePacketReceiver +{ + /** Simplified version of IPacketReceiver's HandlePacketData + * + * @param id - packet ID as a string + * @param data - data from the packet, after location has been read + * @param player - player that the packet was sent to or came from + * @return true if the packet was used */ + public boolean simplePacket(String id, ByteArrayDataInput data, Player player); + +} \ No newline at end of file diff --git a/src/main/java/com/builtbroken/assemblyline/network/PacketIDTile.java b/src/main/java/com/builtbroken/assemblyline/network/PacketIDTile.java new file mode 100644 index 000000000..08fcdf71f --- /dev/null +++ b/src/main/java/com/builtbroken/assemblyline/network/PacketIDTile.java @@ -0,0 +1,70 @@ +package com.builtbroken.assemblyline.network; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.network.packet.Packet; +import net.minecraft.tileentity.TileEntity; +import calclavia.lib.network.IPacketReceiver; +import calclavia.lib.network.PacketType; + +import com.google.common.io.ByteArrayDataInput; + +/** Packet handler for blocks and tile entities. + * + * @author Calclavia */ +public class PacketIDTile extends PacketType +{ + public PacketIDTile(String channel) + { + super(channel); + } + + public Packet getPacket(TileEntity tileEntity, String id, Object... args) + { + return this.getPacket(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord, id, args); + } + + public Packet getPacket(int x, int y, int z, String id, Object... args) + { + List newArgs = new ArrayList(); + + newArgs.add(x); + newArgs.add(y); + newArgs.add(z); + newArgs.add(id); + + for (Object obj : args) + { + newArgs.add(obj); + } + + return super.getPacket(newArgs.toArray()); + } + + @Override + public void receivePacket(ByteArrayDataInput data, EntityPlayer player) + { + int x = data.readInt(); + int y = data.readInt(); + int z = data.readInt(); + String id = data.readUTF(); + TileEntity tileEntity = player.worldObj.getBlockTileEntity(x, y, z); + + if (tileEntity instanceof IPacketReceiver) + { + ((IPacketReceiver) tileEntity).onReceivePacket(data, player); + } + else + { + int blockID = player.worldObj.getBlockId(x, y, z); + + if (Block.blocksList[blockID] instanceof IPacketReceiver) + { + ((IPacketReceiver) Block.blocksList[blockID]).onReceivePacket(data, player, x, y, z); + } + } + } +} diff --git a/src/main/java/com/builtbroken/assemblyline/transmit/TileEntityWire.java b/src/main/java/com/builtbroken/assemblyline/transmit/TileEntityWire.java index bcf6ce0c8..641c76c7e 100644 --- a/src/main/java/com/builtbroken/assemblyline/transmit/TileEntityWire.java +++ b/src/main/java/com/builtbroken/assemblyline/transmit/TileEntityWire.java @@ -12,12 +12,12 @@ import universalelectricity.api.energy.IConductor; import universalelectricity.api.energy.IEnergyNetwork; import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.VectorHelper; +import calclavia.lib.network.PacketHandler; -import com.builtbroken.minecraft.DarkCore; +import com.builtbroken.assemblyline.AssemblyLine; +import com.builtbroken.assemblyline.network.ISimplePacketReceiver; import com.builtbroken.minecraft.helpers.ColorCode; import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded; -import com.builtbroken.minecraft.network.ISimplePacketReceiver; -import com.builtbroken.minecraft.network.PacketHandler; import com.builtbroken.minecraft.prefab.TileEntityAdvanced; import com.google.common.io.ByteArrayDataInput; @@ -113,7 +113,7 @@ public class TileEntityWire extends TileEntityAdvanced implements IConductor, IS @Override public Packet getDescriptionPacket() { - return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "Wire", this, this.currentAcceptorConnections, this.getColor().ordinal()); + return PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, "Wire", this, this.currentAcceptorConnections, this.getColor().ordinal()); } @Override