diff --git a/src/dark/api/mech/IForceDevice.java b/src/dark/api/mech/IForceDevice.java index 31800cdb2..721712303 100644 --- a/src/dark/api/mech/IForceDevice.java +++ b/src/dark/api/mech/IForceDevice.java @@ -1,7 +1,7 @@ package dark.api.mech; -import dark.api.parts.ITileConnector; import net.minecraftforge.common.ForgeDirection; +import dark.api.parts.ITileConnector; /** Think of this in the same way as an electrical device from UE. getforce methods are designed to * get the idea amount of foce that a side should be outputing at the time. Apply force is the input diff --git a/src/dark/fluid/client/model/ModelCenterTank.java b/src/dark/fluid/client/model/ModelCenterTank.java index fa358f57d..5249e2dc7 100644 --- a/src/dark/fluid/client/model/ModelCenterTank.java +++ b/src/dark/fluid/client/model/ModelCenterTank.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelCenterTank extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelCornerTank.java b/src/dark/fluid/client/model/ModelCornerTank.java index fe97711de..98b53e3e9 100644 --- a/src/dark/fluid/client/model/ModelCornerTank.java +++ b/src/dark/fluid/client/model/ModelCornerTank.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelCornerTank extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelEngine.java b/src/dark/fluid/client/model/ModelEngine.java index 52b3c5bfd..94ca33649 100644 --- a/src/dark/fluid/client/model/ModelEngine.java +++ b/src/dark/fluid/client/model/ModelEngine.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelEngine extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelFurnace.java b/src/dark/fluid/client/model/ModelFurnace.java index 3d34f8c03..f24bcdee8 100644 --- a/src/dark/fluid/client/model/ModelFurnace.java +++ b/src/dark/fluid/client/model/ModelFurnace.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelFurnace extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelGearPiston.java b/src/dark/fluid/client/model/ModelGearPiston.java index 6394cf240..592417b26 100644 --- a/src/dark/fluid/client/model/ModelGearPiston.java +++ b/src/dark/fluid/client/model/ModelGearPiston.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelGearPiston extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelGenerator.java b/src/dark/fluid/client/model/ModelGenerator.java index 8f611696e..4f591999e 100644 --- a/src/dark/fluid/client/model/ModelGenerator.java +++ b/src/dark/fluid/client/model/ModelGenerator.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelGenerator extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelLargePipe.java b/src/dark/fluid/client/model/ModelLargePipe.java index 9ec326b7b..441bb5784 100644 --- a/src/dark/fluid/client/model/ModelLargePipe.java +++ b/src/dark/fluid/client/model/ModelLargePipe.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelLargePipe extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelLiquidTank.java b/src/dark/fluid/client/model/ModelLiquidTank.java index fccdb041f..9b5af1f32 100644 --- a/src/dark/fluid/client/model/ModelLiquidTank.java +++ b/src/dark/fluid/client/model/ModelLiquidTank.java @@ -6,11 +6,11 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.tileentity.TileEntity; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.fluid.common.machines.TileEntityTank; @SideOnly(Side.CLIENT) public class ModelLiquidTank extends ModelBase diff --git a/src/dark/fluid/client/model/ModelLiquidTankCorner.java b/src/dark/fluid/client/model/ModelLiquidTankCorner.java index ebcefc7c4..3a1aa4953 100644 --- a/src/dark/fluid/client/model/ModelLiquidTankCorner.java +++ b/src/dark/fluid/client/model/ModelLiquidTankCorner.java @@ -1,9 +1,9 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelLiquidTankCorner extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelPump.java b/src/dark/fluid/client/model/ModelPump.java index 980ceb060..31b888d5d 100644 --- a/src/dark/fluid/client/model/ModelPump.java +++ b/src/dark/fluid/client/model/ModelPump.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelPump extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelReleaseValve.java b/src/dark/fluid/client/model/ModelReleaseValve.java index 8272f27a1..d4fc1f302 100644 --- a/src/dark/fluid/client/model/ModelReleaseValve.java +++ b/src/dark/fluid/client/model/ModelReleaseValve.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelReleaseValve extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelSink.java b/src/dark/fluid/client/model/ModelSink.java index e1a51e083..27e389f99 100644 --- a/src/dark/fluid/client/model/ModelSink.java +++ b/src/dark/fluid/client/model/ModelSink.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelSink extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelTank.java b/src/dark/fluid/client/model/ModelTank.java index 283be2361..0dfa89047 100644 --- a/src/dark/fluid/client/model/ModelTank.java +++ b/src/dark/fluid/client/model/ModelTank.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelTank extends ModelBase { diff --git a/src/dark/fluid/client/model/ModelTankSide.java b/src/dark/fluid/client/model/ModelTankSide.java index 9443cba09..9d45a0860 100644 --- a/src/dark/fluid/client/model/ModelTankSide.java +++ b/src/dark/fluid/client/model/ModelTankSide.java @@ -6,10 +6,10 @@ package dark.fluid.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelTankSide extends ModelBase { diff --git a/src/dark/fluid/client/render/RenderBoiler.java b/src/dark/fluid/client/render/RenderBoiler.java index 0a8541b63..808ef879f 100644 --- a/src/dark/fluid/client/render/RenderBoiler.java +++ b/src/dark/fluid/client/render/RenderBoiler.java @@ -7,7 +7,6 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - import dark.core.client.renders.RenderMachine; import dark.core.prefab.helpers.ConnectionHelper; import dark.fluid.client.model.ModelCenterTank; diff --git a/src/dark/fluid/client/render/RenderFurnace.java b/src/dark/fluid/client/render/RenderFurnace.java index 623752228..bf2488008 100644 --- a/src/dark/fluid/client/render/RenderFurnace.java +++ b/src/dark/fluid/client/render/RenderFurnace.java @@ -7,7 +7,6 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - import dark.core.client.renders.RenderMachine; import dark.fluid.client.model.ModelFurnace; import dark.fluid.common.FluidMech; diff --git a/src/dark/fluid/client/render/RenderGearPiston.java b/src/dark/fluid/client/render/RenderGearPiston.java index d90342f40..141c7c97c 100644 --- a/src/dark/fluid/client/render/RenderGearPiston.java +++ b/src/dark/fluid/client/render/RenderGearPiston.java @@ -7,7 +7,6 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - import dark.core.client.renders.RenderMachine; import dark.fluid.client.model.ModelGearPiston; import dark.fluid.common.FluidMech; diff --git a/src/dark/fluid/common/FMRecipeLoader.java b/src/dark/fluid/common/FMRecipeLoader.java index 262d7c025..fd3493796 100644 --- a/src/dark/fluid/common/FMRecipeLoader.java +++ b/src/dark/fluid/common/FMRecipeLoader.java @@ -9,7 +9,6 @@ import dark.core.common.CoreRecipeLoader; import dark.core.common.RecipeLoader; import dark.core.common.items.ItemParts.Parts; import dark.core.interfaces.ColorCode; -import dark.fluid.common.machines.BlockFluid; public class FMRecipeLoader extends RecipeLoader { diff --git a/src/dark/fluid/common/FluidMech.java b/src/dark/fluid/common/FluidMech.java index c47ac253e..9a5b8c518 100644 --- a/src/dark/fluid/common/FluidMech.java +++ b/src/dark/fluid/common/FluidMech.java @@ -16,7 +16,6 @@ import net.minecraftforge.fluids.FluidRegistry; import org.modstats.ModstatInfo; import universalelectricity.prefab.TranslationHelper; -import universalelectricity.prefab.network.PacketManager; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; @@ -58,7 +57,7 @@ import dark.mech.common.machines.BlockRod; @ModstatInfo(prefix = "fluidmech") @Mod(modid = FluidMech.MOD_ID, name = FluidMech.MOD_NAME, version = DarkMain.VERSION, dependencies = "after:DarkCore", useMetadata = true) -@NetworkMod(channels = { FluidMech.CHANNEL }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketManager.class) +@NetworkMod(clientSideRequired = true, serverSideRequired = false) public class FluidMech extends ModPrefab { @@ -74,8 +73,6 @@ public class FluidMech extends ModPrefab public static Fluid fmWaste, fmOil, fmFuel, fmBio; public static Fluid waste, oil, fuel, bio; - // @NetworkMod - public static final String CHANNEL = "FluidMech"; @Metadata(FluidMech.MOD_ID) public static ModMetadata meta; diff --git a/src/dark/fluid/common/machines/BlockBoiler.java b/src/dark/fluid/common/machines/BlockBoiler.java index ca3ef539f..ccbbee496 100644 --- a/src/dark/fluid/common/machines/BlockBoiler.java +++ b/src/dark/fluid/common/machines/BlockBoiler.java @@ -2,14 +2,13 @@ package dark.fluid.common.machines; import java.util.List; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.fluid.common.BlockFM; public class BlockBoiler extends BlockFM diff --git a/src/dark/fluid/common/machines/BlockFluid.java b/src/dark/fluid/common/machines/BlockFluid.java index deafd63d2..f21ad4759 100644 --- a/src/dark/fluid/common/machines/BlockFluid.java +++ b/src/dark/fluid/common/machines/BlockFluid.java @@ -1,12 +1,12 @@ package dark.fluid.common.machines; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; import net.minecraftforge.fluids.BlockFluidFinite; import net.minecraftforge.fluids.Fluid; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.fluid.common.FluidMech; public class BlockFluid extends BlockFluidFinite diff --git a/src/dark/fluid/common/machines/BlockReleaseValve.java b/src/dark/fluid/common/machines/BlockReleaseValve.java index 00999195a..121737e71 100644 --- a/src/dark/fluid/common/machines/BlockReleaseValve.java +++ b/src/dark/fluid/common/machines/BlockReleaseValve.java @@ -2,15 +2,14 @@ package dark.fluid.common.machines; import java.util.Random; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - import net.minecraft.block.material.Material; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.fluid.common.BlockFM; import dark.fluid.common.FluidMech; diff --git a/src/dark/fluid/common/machines/BlockSink.java b/src/dark/fluid/common/machines/BlockSink.java index 2ea56170a..8eb979d79 100644 --- a/src/dark/fluid/common/machines/BlockSink.java +++ b/src/dark/fluid/common/machines/BlockSink.java @@ -1,7 +1,5 @@ package dark.fluid.common.machines; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -11,6 +9,8 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import universalelectricity.prefab.tile.TileEntityAdvanced; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.core.prefab.helpers.MetaGroup; import dark.fluid.client.render.BlockRenderHelper; import dark.fluid.common.BlockFM; diff --git a/src/dark/fluid/common/machines/BlockSteamPiston.java b/src/dark/fluid/common/machines/BlockSteamPiston.java index 3a69b9c5c..676f86380 100644 --- a/src/dark/fluid/common/machines/BlockSteamPiston.java +++ b/src/dark/fluid/common/machines/BlockSteamPiston.java @@ -2,14 +2,13 @@ package dark.fluid.common.machines; import java.util.Random; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.fluid.common.BlockFM; public class BlockSteamPiston extends BlockFM diff --git a/src/dark/fluid/common/machines/BlockTank.java b/src/dark/fluid/common/machines/BlockTank.java index d411873eb..fcdc728c0 100644 --- a/src/dark/fluid/common/machines/BlockTank.java +++ b/src/dark/fluid/common/machines/BlockTank.java @@ -2,9 +2,6 @@ package dark.fluid.common.machines; import java.util.List; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -16,6 +13,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.api.parts.INetworkPart; import dark.core.prefab.helpers.AutoCraftingManager; import dark.core.prefab.helpers.FluidHelper; diff --git a/src/dark/fluid/common/machines/TileEntityReleaseValve.java b/src/dark/fluid/common/machines/TileEntityReleaseValve.java index b51822097..d3eb673ca 100644 --- a/src/dark/fluid/common/machines/TileEntityReleaseValve.java +++ b/src/dark/fluid/common/machines/TileEntityReleaseValve.java @@ -3,8 +3,6 @@ package dark.fluid.common.machines; import java.util.ArrayList; import java.util.List; -import universalelectricity.core.vector.Vector3; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -12,6 +10,7 @@ import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; +import universalelectricity.core.vector.Vector3; import dark.api.IToolReadOut; import dark.api.fluid.INetworkPipe; import dark.api.parts.ITileConnector; diff --git a/src/dark/fluid/common/machines/TileEntitySink.java b/src/dark/fluid/common/machines/TileEntitySink.java index 785a21d20..fad3ec963 100644 --- a/src/dark/fluid/common/machines/TileEntitySink.java +++ b/src/dark/fluid/common/machines/TileEntitySink.java @@ -11,12 +11,12 @@ import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import universalelectricity.prefab.network.IPacketReceiver; -import universalelectricity.prefab.network.PacketManager; import com.google.common.io.ByteArrayDataInput; +import dark.core.common.DarkMain; import dark.core.interfaces.ColorCode; -import dark.fluid.common.FluidMech; +import dark.core.network.PacketHandler; import dark.fluid.common.prefab.TileEntityFluidStorage; public class TileEntitySink extends TileEntityFluidStorage implements IPacketReceiver @@ -47,7 +47,7 @@ public class TileEntitySink extends TileEntityFluidStorage implements IPacketRec { stack = this.getTank().getFluid(); } - return PacketManager.getPacket(FluidMech.CHANNEL, this, stack.writeToNBT(new NBTTagCompound())); + return PacketHandler.instance().getPacket(DarkMain.CHANNEL, this, stack.writeToNBT(new NBTTagCompound())); } @Override @@ -55,7 +55,7 @@ public class TileEntitySink extends TileEntityFluidStorage implements IPacketRec { try { - this.getTank().setFluid(FluidStack.loadFluidStackFromNBT(PacketManager.readNBTTagCompound(data))); + this.getTank().setFluid(FluidStack.loadFluidStackFromNBT( PacketHandler.instance().readNBTTagCompound(data))); } catch (Exception e) { diff --git a/src/dark/fluid/common/machines/TileEntitySteamPiston.java b/src/dark/fluid/common/machines/TileEntitySteamPiston.java index 271805042..32805abac 100644 --- a/src/dark/fluid/common/machines/TileEntitySteamPiston.java +++ b/src/dark/fluid/common/machines/TileEntitySteamPiston.java @@ -1,14 +1,7 @@ package dark.fluid.common.machines; import dark.core.prefab.TileEntityMachine; -import dark.fluid.common.FluidMech; public class TileEntitySteamPiston extends TileEntityMachine { - - @Override - public String getChannel() - { - return FluidMech.CHANNEL; - } } diff --git a/src/dark/fluid/common/machines/TileEntityTank.java b/src/dark/fluid/common/machines/TileEntityTank.java index 74ef9f037..ba209d53a 100644 --- a/src/dark/fluid/common/machines/TileEntityTank.java +++ b/src/dark/fluid/common/machines/TileEntityTank.java @@ -24,7 +24,6 @@ import org.bouncycastle.util.Arrays; import universalelectricity.core.vector.Vector3; import universalelectricity.prefab.network.IPacketReceiver; -import universalelectricity.prefab.network.PacketManager; import com.google.common.io.ByteArrayDataInput; @@ -33,13 +32,14 @@ import cpw.mods.fml.relauncher.SideOnly; import dark.api.IToolReadOut; import dark.api.fluid.INetworkFluidPart; import dark.api.fluid.INetworkPipe; +import dark.core.common.DarkMain; import dark.core.interfaces.ColorCode; import dark.core.interfaces.ColorCode.IColorCoded; +import dark.core.network.PacketHandler; import dark.core.network.fluid.NetworkFluidContainers; import dark.core.network.fluid.NetworkFluidTiles; import dark.core.prefab.helpers.FluidHelper; import dark.core.prefab.tilenetwork.NetworkTileEntities; -import dark.fluid.common.FluidMech; import dark.fluid.common.prefab.TileEntityFluidStorage; public class TileEntityTank extends TileEntityFluidStorage implements IFluidHandler, IToolReadOut, IColorCoded, INetworkFluidPart, IPacketReceiver @@ -95,7 +95,7 @@ public class TileEntityTank extends TileEntityFluidStorage implements IFluidHand { if (id == 0) { - this.getTank().setFluid(FluidStack.loadFluidStackFromNBT(PacketManager.readNBTTagCompound(dataStream))); + this.getTank().setFluid(FluidStack.loadFluidStackFromNBT( PacketHandler.instance().readNBTTagCompound(dataStream))); } else { @@ -126,7 +126,7 @@ public class TileEntityTank extends TileEntityFluidStorage implements IFluidHand { stack = this.getTank().getFluid(); } - return PacketManager.getPacket(FluidMech.CHANNEL, this, stack != null ? 0 : 1, stack != null ? stack.writeToNBT(new NBTTagCompound()) : 1, this.renderConnection[0], this.renderConnection[1], this.renderConnection[2], this.renderConnection[3], this.renderConnection[4], this.renderConnection[5]); + return PacketHandler.instance().getPacket(DarkMain.CHANNEL, this, stack != null ? 0 : 1, stack != null ? stack.writeToNBT(new NBTTagCompound()) : 1, this.renderConnection[0], this.renderConnection[1], this.renderConnection[2], this.renderConnection[3], this.renderConnection[4], this.renderConnection[5]); } /** gets the current color mark of the pipe */ @@ -200,7 +200,7 @@ public class TileEntityTank extends TileEntityFluidStorage implements IFluidHand } /** Checks to make sure the connection is valid to the tileEntity - * + * * @param tileEntity - the tileEntity being checked * @param side - side the connection is too */ public void validateConnectionSide(TileEntity tileEntity, ForgeDirection side) diff --git a/src/dark/fluid/common/pipes/BlockPipe.java b/src/dark/fluid/common/pipes/BlockPipe.java index 15adeac23..d1addfd89 100644 --- a/src/dark/fluid/common/pipes/BlockPipe.java +++ b/src/dark/fluid/common/pipes/BlockPipe.java @@ -2,9 +2,6 @@ package dark.fluid.common.pipes; import java.util.List; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; @@ -14,6 +11,8 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.fluids.IFluidTank; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.api.fluid.INetworkPipe; import dark.core.prefab.helpers.FluidHelper; import dark.fluid.common.BlockFM; diff --git a/src/dark/fluid/common/pipes/TileEntityPipe.java b/src/dark/fluid/common/pipes/TileEntityPipe.java index fb0d8d6e7..5a9ec98a6 100644 --- a/src/dark/fluid/common/pipes/TileEntityPipe.java +++ b/src/dark/fluid/common/pipes/TileEntityPipe.java @@ -26,7 +26,6 @@ import org.bouncycastle.util.Arrays; import universalelectricity.core.vector.Vector3; import universalelectricity.core.vector.VectorHelper; import universalelectricity.prefab.network.IPacketReceiver; -import universalelectricity.prefab.network.PacketManager; import universalelectricity.prefab.tile.TileEntityAdvanced; import com.google.common.io.ByteArrayDataInput; @@ -36,12 +35,13 @@ import cpw.mods.fml.relauncher.SideOnly; import dark.api.IToolReadOut; import dark.api.fluid.INetworkPipe; import dark.api.parts.ITileConnector; +import dark.core.common.DarkMain; import dark.core.interfaces.ColorCode; import dark.core.interfaces.ColorCode.IColorCoded; +import dark.core.network.PacketHandler; import dark.core.network.fluid.NetworkPipes; import dark.core.prefab.helpers.FluidHelper; import dark.core.prefab.tilenetwork.NetworkTileEntities; -import dark.fluid.common.FluidMech; import dark.fluid.common.pipes.addon.IPipeExtention; public class TileEntityPipe extends TileEntityAdvanced implements IFluidHandler, IToolReadOut, IColorCoded, INetworkPipe, IPacketReceiver @@ -130,8 +130,8 @@ public class TileEntityPipe extends TileEntityAdvanced implements IFluidHandler, ((TileEntity) extention).updateEntity(); if (extention.shouldSendPacket(!this.worldObj.isRemote) && extention.getExtentionPacketData(!this.worldObj.isRemote) != null) { - Packet packet = PacketManager.getPacket(FluidMech.CHANNEL, this, PacketID.EXTENTION_UPDATE.ordinal(), ForgeDirection.getOrientation(i), extention.getExtentionPacketData(!this.worldObj.isRemote)); - PacketManager.sendPacketToClients(packet, worldObj, new Vector3(this), 50); + Packet packet = PacketHandler.instance().getPacket(DarkMain.CHANNEL, this, PacketID.EXTENTION_UPDATE.ordinal(), ForgeDirection.getOrientation(i), extention.getExtentionPacketData(!this.worldObj.isRemote)); + PacketHandler.instance().sendPacketToClients(packet, worldObj, new Vector3(this), 50); } } } @@ -170,7 +170,7 @@ public class TileEntityPipe extends TileEntityAdvanced implements IFluidHandler, { System.out.println("Handling Packet for Pipe addon"); int side = dataStream.readInt(); - NBTTagCompound tag = PacketManager.readNBTTagCompound(dataStream); + NBTTagCompound tag = PacketHandler.instance().readNBTTagCompound(dataStream); this.loadOrCreateSubTile(side, tag); } @@ -194,7 +194,7 @@ public class TileEntityPipe extends TileEntityAdvanced implements IFluidHandler, @Override public Packet getDescriptionPacket() { - return PacketManager.getPacket(FluidMech.CHANNEL, this, PacketID.PIPE_CONNECTIONS.ordinal(), this.renderConnection[0], this.renderConnection[1], this.renderConnection[2], this.renderConnection[3], this.renderConnection[4], this.renderConnection[5]); + return PacketHandler.instance().getPacket(DarkMain.CHANNEL, this, PacketID.PIPE_CONNECTIONS.ordinal(), this.renderConnection[0], this.renderConnection[1], this.renderConnection[2], this.renderConnection[3], this.renderConnection[4], this.renderConnection[5]); } /** Reads a tile entity from NBT. */ @@ -317,8 +317,8 @@ public class TileEntityPipe extends TileEntityAdvanced implements IFluidHandler, if (tag != null && tag.hasKey("id")) { System.out.println("Sending TileEntity to Client"); - Packet packet = PacketManager.getPacket(FluidMech.CHANNEL, this, PacketID.EXTENTION_CREATE.ordinal(), ForgeDirection.getOrientation(side), tag); - PacketManager.sendPacketToClients(packet, this.worldObj, new Vector3(this), 50); + Packet packet = PacketHandler.instance().getPacket(DarkMain.CHANNEL, this, PacketID.EXTENTION_CREATE.ordinal(), ForgeDirection.getOrientation(side), tag); + PacketHandler.instance().sendPacketToClients(packet, this.worldObj, new Vector3(this), 50); } } } @@ -418,7 +418,7 @@ public class TileEntityPipe extends TileEntityAdvanced implements IFluidHandler, } /** Checks to make sure the connection is valid to the tileEntity - * + * * @param tileEntity - the tileEntity being checked * @param side - side the connection is too * @return */ diff --git a/src/dark/fluid/common/prefab/TileEntityFluidStorage.java b/src/dark/fluid/common/prefab/TileEntityFluidStorage.java index f8802f7fd..14ef1c54b 100644 --- a/src/dark/fluid/common/prefab/TileEntityFluidStorage.java +++ b/src/dark/fluid/common/prefab/TileEntityFluidStorage.java @@ -1,6 +1,5 @@ package dark.fluid.common.prefab; -import universalelectricity.core.vector.Vector3; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -12,6 +11,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; +import universalelectricity.core.vector.Vector3; import dark.core.interfaces.ColorCode.IColorCoded; import dark.core.prefab.helpers.FluidHelper; diff --git a/src/dark/fluid/common/pump/BlockConstructionPump.java b/src/dark/fluid/common/pump/BlockConstructionPump.java index 5508890f8..c512012ca 100644 --- a/src/dark/fluid/common/pump/BlockConstructionPump.java +++ b/src/dark/fluid/common/pump/BlockConstructionPump.java @@ -2,9 +2,6 @@ package dark.fluid.common.pump; import java.util.List; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -18,6 +15,8 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.core.network.fluid.HydraulicNetworkHelper; import dark.fluid.client.render.BlockRenderHelper; import dark.fluid.common.BlockFM; diff --git a/src/dark/fluid/common/pump/TileEntityStarterPump.java b/src/dark/fluid/common/pump/TileEntityStarterPump.java index d46c74d0e..0a2fb081c 100644 --- a/src/dark/fluid/common/pump/TileEntityStarterPump.java +++ b/src/dark/fluid/common/pump/TileEntityStarterPump.java @@ -18,7 +18,6 @@ import dark.core.common.ExternalModHandler; import dark.core.prefab.TileEntityMachine; import dark.core.prefab.helpers.FluidHelper; import dark.core.prefab.helpers.Pair; -import dark.fluid.common.FluidMech; public class TileEntityStarterPump extends TileEntityMachine implements IToolReadOut, ITileConnector { @@ -225,10 +224,4 @@ public class TileEntityStarterPump extends TileEntityMachine implements IToolRea return direction != ForgeDirection.DOWN; } - @Override - public String getChannel() - { - return FluidMech.CHANNEL; - } - } diff --git a/src/dark/mech/client/model/ModelGearRod.java b/src/dark/mech/client/model/ModelGearRod.java index 097022510..e51a92054 100644 --- a/src/dark/mech/client/model/ModelGearRod.java +++ b/src/dark/mech/client/model/ModelGearRod.java @@ -6,10 +6,10 @@ package dark.mech.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelGearRod extends ModelBase { diff --git a/src/dark/mech/client/model/ModelGenerator.java b/src/dark/mech/client/model/ModelGenerator.java index 97b0b432b..fd6476cbc 100644 --- a/src/dark/mech/client/model/ModelGenerator.java +++ b/src/dark/mech/client/model/ModelGenerator.java @@ -6,11 +6,11 @@ package dark.mech.client.model; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.tileentity.TileEntity; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelGenerator extends ModelBase { diff --git a/src/dark/mech/client/render/RenderGearRod.java b/src/dark/mech/client/render/RenderGearRod.java index 45dafa220..738db558e 100644 --- a/src/dark/mech/client/render/RenderGearRod.java +++ b/src/dark/mech/client/render/RenderGearRod.java @@ -7,7 +7,6 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - import dark.mech.client.model.ModelGearRod; @SideOnly(Side.CLIENT) public class RenderGearRod extends TileEntitySpecialRenderer diff --git a/src/dark/mech/client/render/RenderGenerator.java b/src/dark/mech/client/render/RenderGenerator.java index 25003aa52..f487b3648 100644 --- a/src/dark/mech/client/render/RenderGenerator.java +++ b/src/dark/mech/client/render/RenderGenerator.java @@ -7,7 +7,6 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - import dark.mech.client.model.ModelGenerator; @SideOnly(Side.CLIENT) public class RenderGenerator extends TileEntitySpecialRenderer diff --git a/src/dark/mech/common/machines/BlockGenerator.java b/src/dark/mech/common/machines/BlockGenerator.java index e964e0ddc..7513a6f75 100644 --- a/src/dark/mech/common/machines/BlockGenerator.java +++ b/src/dark/mech/common/machines/BlockGenerator.java @@ -2,9 +2,6 @@ package dark.mech.common.machines; import java.util.ArrayList; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -13,6 +10,8 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.fluid.client.render.BlockRenderHelper; import dark.fluid.common.BlockFM; import dark.fluid.common.FluidMech; diff --git a/src/dark/mech/common/machines/BlockRod.java b/src/dark/mech/common/machines/BlockRod.java index 64fe2b52e..3c4db4db9 100644 --- a/src/dark/mech/common/machines/BlockRod.java +++ b/src/dark/mech/common/machines/BlockRod.java @@ -1,7 +1,5 @@ package dark.mech.common.machines; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -11,6 +9,8 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import dark.fluid.client.render.BlockRenderHelper; import dark.fluid.common.BlockFM; import dark.fluid.common.FluidMech;