From 42474bc8ec0dfaeae538c8c9adea5424bd201d51 Mon Sep 17 00:00:00 2001 From: Rseifert Date: Sun, 6 Jan 2013 22:24:28 -0500 Subject: [PATCH] getting Closer to being done I'm getting closer to making this mod more universal for all liquids. Right now after a bit of coding i can say i have: *Fixed Pipes *Fixed Tanks *Removed Mengenta as a color(no need for another simi red/pinkish color) *Create a IColor interface for future use with other color selective blocks *Created a object feed version of get for PipeColor so you can use numbers, Strings, or LiquidData to ID a color. Useful for setColor(Object obj) *Worked on some textures however i need to either make a better model for tanks or find a texture artist for help *Found the tank model files so they can be edited Issues still to be worked on *Lang file, still item names are not working *Release Valve *Pipe Changer tool, not sure if i should use a GUI with the tool or have 15 color brushs. The ladder seems wasteful *Block, and bucket for Waste Liquid *Textures need some help, especial Tanks so i can add the rest of the colored version to the creative menu *Crafting for all Pipes, Tanks, and items need redone or added for the new system *Pumps needs reworked to have a diffrent version for lava,water, and large area pumping. Small version for filling system, large for draining source pools for constuction. Lava pump will fall under large. Might add an oil pump, or create one for oil craft using the same design. *Tanks still need to be tested and fixed to create pressure for Pipes if side == down and liquid || side == up and gas *LiquidHandler needs worked on to pre catch and add liquids to the allowed List similar to how e methain, oil, fuel are register. --- minecraft/liquidmechanics/api/IColor.java | 16 ++ .../api/helpers/PipeColor.java | 81 +++++----- .../client/render/RenderTank.java | 41 +++-- .../common/handlers/LiquidHandler.java | 11 +- .../common/tileentity/TileEntityPipe.java | 35 ++-- .../common/tileentity/TileEntityTank.java | 151 ++++++------------ .../liquidmechanics/resource/pipes/Pipe.png | Bin 922 -> 960 bytes .../resource/pipes/WhitePipe.png | Bin 0 -> 942 bytes .../resource/tanks/LavaTank.png | Bin 0 -> 1067 bytes .../resource/tanks/RedTank.png | Bin 1055 -> 0 bytes .../tanks/{OrangeTank.png => SteamTank.png} | Bin .../liquidmechanics/resource/tanks/Tank.png | Bin 1041 -> 1029 bytes resources/models/TankCorner2.tcn | Bin 0 -> 1560 bytes resources/models/TankSingle2.tcn | Bin 0 -> 2143 bytes 14 files changed, 171 insertions(+), 164 deletions(-) create mode 100644 minecraft/liquidmechanics/api/IColor.java create mode 100644 minecraft/liquidmechanics/resource/pipes/WhitePipe.png create mode 100644 minecraft/liquidmechanics/resource/tanks/LavaTank.png delete mode 100644 minecraft/liquidmechanics/resource/tanks/RedTank.png rename minecraft/liquidmechanics/resource/tanks/{OrangeTank.png => SteamTank.png} (100%) create mode 100644 resources/models/TankCorner2.tcn create mode 100644 resources/models/TankSingle2.tcn diff --git a/minecraft/liquidmechanics/api/IColor.java b/minecraft/liquidmechanics/api/IColor.java new file mode 100644 index 00000000..feb9ea09 --- /dev/null +++ b/minecraft/liquidmechanics/api/IColor.java @@ -0,0 +1,16 @@ +package liquidmechanics.api; + +import liquidmechanics.api.helpers.PipeColor; + +public interface IColor +{ + /** + * gets the pipeColor being used by this object + */ + public PipeColor getColor(); + /** + * sets the pipeColor to be used by this object * + * @param obj-can be anything must be sorted + */ + public void setColor(Object obj); +} diff --git a/minecraft/liquidmechanics/api/helpers/PipeColor.java b/minecraft/liquidmechanics/api/helpers/PipeColor.java index f539614a..77c24698 100644 --- a/minecraft/liquidmechanics/api/helpers/PipeColor.java +++ b/minecraft/liquidmechanics/api/helpers/PipeColor.java @@ -5,25 +5,26 @@ import liquidmechanics.common.handlers.LiquidHandler; public enum PipeColor { - BLACK("Black"), - RED("Red"), - GREEN("Green"), + BLACK("Black"), + RED("Red"), + GREEN("Green"), BROWN("Brown"), - BLUE("Blue"), - PURPLE("Purple"), - CYAN("Cyan"), + BLUE("Blue"), + PURPLE("Purple"), + CYAN("Cyan"), SILVER("Silver"), - GREY("Grey"), - PINK("Pink"), - LIME("Lime"), + GREY("Grey"), + PINK("Pink"), + LIME("Lime"), YELLOW("Yellow"), - LIGHTBLUE("LightBlue"), - MAGENTA("Magenta"), - ORANGE("Orange"), + LIGHTBLUE("LightBlue"), + WHITE("White"), + ORANGE("Orange"), NONE(""); + String name; - PipeColor(String name) + private PipeColor(String name) { this.name = name; } @@ -33,9 +34,37 @@ public enum PipeColor return this.name; } - /** - * get the liquidData linked with this color - */ + /** gets a pipeColor from any of the following + * + * @param obj + * - Integer,String,LiquidData,PipeColor + * @return Color NONE if it can't find it */ + public static PipeColor get(Object obj) + { + if (obj instanceof Integer && ((Integer) obj) < PipeColor.values().length) + { + return PipeColor.values()[((Integer) obj)]; + } else if (obj instanceof LiquidData) + { + LiquidData data = (LiquidData) obj; + if (data == LiquidHandler.lava) { return RED; } + if (data == LiquidHandler.steam) { return ORANGE; } + if (data == LiquidHandler.water) { return BLUE; } + } else if (obj instanceof PipeColor) + { + return (PipeColor) obj; + } else if (obj instanceof String) + { + for (int i = 0; i < PipeColor.values().length; i++) + { + if (((String) obj).equalsIgnoreCase(PipeColor.get(i).getName())) { return PipeColor.get(i); } + } + } + return NONE; + } + + /** gets the liquidData linked with this color. in rare cases there could be + * more than one, but first instance will be returned */ public LiquidData getLiquidData() { for (LiquidData data : LiquidHandler.allowedLiquids) @@ -44,24 +73,4 @@ public enum PipeColor } return LiquidHandler.unkown; } - - /** - * gets a color based on liquid Data - */ - public static PipeColor get(LiquidData data) - { - if (data == LiquidHandler.lava) { return RED; } - if (data == LiquidHandler.steam) { return ORANGE; } - if (data == LiquidHandler.water) { return BLUE; } - return NONE; - } - - /** - * gets a color based on number(0-15) - */ - public static PipeColor get(int num) - { - if (num < PipeColor.values().length) { return PipeColor.values()[num]; } - return NONE; - } } diff --git a/minecraft/liquidmechanics/client/render/RenderTank.java b/minecraft/liquidmechanics/client/render/RenderTank.java index e8ae2682..4aca9189 100644 --- a/minecraft/liquidmechanics/client/render/RenderTank.java +++ b/minecraft/liquidmechanics/client/render/RenderTank.java @@ -1,5 +1,6 @@ package liquidmechanics.client.render; +import liquidmechanics.api.helpers.PipeColor; import liquidmechanics.api.helpers.connectionHelper; import liquidmechanics.client.model.ModelLiquidTank; import liquidmechanics.client.model.ModelLiquidTankCorner; @@ -29,7 +30,16 @@ public class RenderTank extends TileEntitySpecialRenderer public void renderAModelAt(TileEntityTank te, double d, double d1, double d2, float f) { int meta = te.getBlockMetadata(); - pos = Math.min((te.volume / LiquidContainerRegistry.BUCKET_VOLUME), 4); + int guageMeta = meta; + if(te.tank.getLiquid() != null) + { + pos = Math.min((te.tank.getLiquid().amount / LiquidContainerRegistry.BUCKET_VOLUME), 4); + if(meta == PipeColor.NONE.ordinal()) + { + guageMeta = PipeColor.get(te.tank.getLiquid()).ordinal(); + } + } + GL11.glPushMatrix(); GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); @@ -60,7 +70,7 @@ public class RenderTank extends TileEntitySpecialRenderer { bindTextureByName(this.getTankTexture(meta)); model.renderMain(0.0625F); - bindTextureByName(this.getGuageTexture(meta, pos)); + bindTextureByName(this.getGuageTexture(guageMeta, pos)); model.renderMeter(te, 0.0625F); } GL11.glPopMatrix(); @@ -71,13 +81,22 @@ public class RenderTank extends TileEntitySpecialRenderer { String type = ""; switch (meta) - { - case 1:type = "Red";break; - case 14:type = "Orange";break; - default:type = "";break; + { + case 1: + type = "Lava"; + break; + case 4: + type = "Water"; + break; + case 14: + type = "Steam"; + break; + default: + type = ""; + break; } - return LiquidMechanics.RESOURCE_PATH + "tanks/" + type + "Tank.png"; + return LiquidMechanics.RESOURCE_PATH + "tanks/" + type + "Tank.png"; } @@ -86,8 +105,12 @@ public class RenderTank extends TileEntitySpecialRenderer String type = ""; switch (meta) { - case 1:type = "Lava";break; - case 12:type = "Fuel";break; + case 1: + type = "Lava"; + break; + case 12: + type = "Fuel"; + break; default: type = ""; break; diff --git a/minecraft/liquidmechanics/common/handlers/LiquidHandler.java b/minecraft/liquidmechanics/common/handlers/LiquidHandler.java index ca82d205..8f9a5579 100644 --- a/minecraft/liquidmechanics/common/handlers/LiquidHandler.java +++ b/minecraft/liquidmechanics/common/handlers/LiquidHandler.java @@ -89,14 +89,21 @@ public class LiquidHandler } /** - * gets a liquid stack of type & volume + * creates a new LiquidStack using type and vol */ public static LiquidStack getStack(LiquidData type, int vol) { if (type == null) return null; return new LiquidStack(type.getStack().itemID, vol, type.getStack().itemMeta); } - + /** + * creates a new LiquidStack using a liquidStack and vol + */ + public static LiquidStack getStack(LiquidStack stack, int vol) + { + if(stack == null){return null;} + return new LiquidStack(stack.itemID,vol,stack.itemMeta); + } public static int getMeta(LiquidData type) { if (type == LiquidHandler.steam) return 0; diff --git a/minecraft/liquidmechanics/common/tileentity/TileEntityPipe.java b/minecraft/liquidmechanics/common/tileentity/TileEntityPipe.java index 87d46e9c..518b7606 100644 --- a/minecraft/liquidmechanics/common/tileentity/TileEntityPipe.java +++ b/minecraft/liquidmechanics/common/tileentity/TileEntityPipe.java @@ -1,5 +1,6 @@ package liquidmechanics.common.tileentity; +import liquidmechanics.api.IColor; import liquidmechanics.api.IReadOut; import liquidmechanics.api.IPressure; import liquidmechanics.api.helpers.PipeColor; @@ -27,7 +28,7 @@ import universalelectricity.prefab.network.PacketManager; import com.google.common.io.ByteArrayDataInput; -public class TileEntityPipe extends TileEntity implements ITankContainer, IReadOut +public class TileEntityPipe extends TileEntity implements ITankContainer, IReadOut,IColor { private PipeColor color = PipeColor.NONE; @@ -59,24 +60,23 @@ public class TileEntityPipe extends TileEntity implements ITankContainer, IReadO for (int i = 0; i < 6; i++) { ForgeDirection dir = ForgeDirection.getOrientation(i); - int moved = 0; + if (connectedBlocks[i] instanceof ITankContainer) { if (connectedBlocks[i] instanceof TileEntityPipe) { if (((TileEntityPipe) connectedBlocks[i]).presure < this.presure) { - moved = ((TileEntityPipe) connectedBlocks[i]).stored.fill(stack, true); + stored.drain(((TileEntityPipe) connectedBlocks[i]).stored.fill(stack, true), true); } } else { - moved = ((ITankContainer) connectedBlocks[i]).fill(dir.getOpposite(), stack, true); + stored.drain(((ITankContainer) connectedBlocks[i]).fill(dir.getOpposite(), stack, true), true); } } - stored.drain(moved, true); - // FMLLog.warning("Moved "+moved+ " "+ i); + if (stack == null || stack.amount <= 0) { break; @@ -90,6 +90,7 @@ public class TileEntityPipe extends TileEntity implements ITankContainer, IReadO /** * gets the current color mark of the pipe */ + @Override public PipeColor getColor() { return this.color; @@ -98,9 +99,10 @@ public class TileEntityPipe extends TileEntity implements ITankContainer, IReadO /** * sets the current color mark of the pipe */ - public void setColor(PipeColor cc) + @Override + public void setColor(Object cc) { - this.color = cc; + this.color = PipeColor.get(cc); } /** @@ -122,6 +124,7 @@ public class TileEntityPipe extends TileEntity implements ITankContainer, IReadO { super.readFromNBT(nbt); UpdateConverter.convert(this, nbt); + LiquidStack liquid = new LiquidStack(0, 0, 0); liquid.readFromNBT(nbt.getCompoundTag("stored")); stored.setLiquid(liquid); @@ -251,16 +254,14 @@ public class TileEntityPipe extends TileEntity implements ITankContainer, IReadO TileEntity ent = connectedBlocks[i]; if (ent instanceof ITankContainer) { - if (this.color != PipeColor.NONE) + if (ent instanceof TileEntityPipe && color != ((TileEntityPipe) ent).getColor()) { - if (ent instanceof TileEntityPipe && color != ((TileEntityPipe) ent).getColor()) - { - connectedBlocks[i] = null; - } - else if (ent instanceof TileEntityTank && color != ((TileEntityTank) ent).getColor()) - { - connectedBlocks[i] = null; - } + connectedBlocks[i] = null; + } + + if (this.color != PipeColor.NONE && ent instanceof TileEntityTank && color != ((TileEntityTank) ent).getColor()) + { + connectedBlocks[i] = null; } } else if (ent instanceof IPressure) diff --git a/minecraft/liquidmechanics/common/tileentity/TileEntityTank.java b/minecraft/liquidmechanics/common/tileentity/TileEntityTank.java index f843a2e8..eb19b9d5 100644 --- a/minecraft/liquidmechanics/common/tileentity/TileEntityTank.java +++ b/minecraft/liquidmechanics/common/tileentity/TileEntityTank.java @@ -2,6 +2,7 @@ package liquidmechanics.common.tileentity; import javax.swing.colorchooser.ColorSelectionModel; +import liquidmechanics.api.IColor; import liquidmechanics.api.IReadOut; import liquidmechanics.api.IPressure; import liquidmechanics.api.helpers.PipeColor; @@ -28,28 +29,21 @@ import universalelectricity.prefab.network.PacketManager; import com.google.common.io.ByteArrayDataInput; -public class TileEntityTank extends TileEntity implements IPacketReceiver, IReadOut, IPressure, ITankContainer +public class TileEntityTank extends TileEntity implements IPacketReceiver, IReadOut, IPressure, ITankContainer, IColor { public TileEntity[] cc = { null, null, null, null, null, null }; - public LiquidData type = LiquidHandler.unkown; - private PipeColor color = PipeColor.NONE; public static final int LMax = 4; private int count, count2 = 0; - - public int volume; - public int pVolume = 0; + public int pVolume = 0; + public LiquidTank tank = new LiquidTank(LiquidContainerRegistry.BUCKET_VOLUME * LMax); public void updateEntity() { - if (tank.getLiquid() == null && type != LiquidHandler.unkown) - { - tank.setLiquid(LiquidHandler.getStack(this.type, 1)); - } LiquidStack liquid = tank.getLiquid(); this.color = PipeColor.get(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)); @@ -59,15 +53,18 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead this.cc = connectionHelper.getSurroundings(worldObj, xCoord, yCoord, zCoord); if (!worldObj.isRemote) { - this.type = color.getLiquidData(); - this.tradeDown(); this.tradeArround(); - volume = liquid.amount; + int volume = liquid.amount; if (volume != pVolume) { - Packet packet = PacketManager.getPacket(LiquidMechanics.CHANNEL, this, new Object[] { volume }); + LiquidStack stack = new LiquidStack(0,0,0); + if(this.tank.getLiquid() != null) + { + stack = this.tank.getLiquid(); + } + Packet packet = PacketManager.getPacket(LiquidMechanics.CHANNEL, this, new Object[] {stack.itemID,stack.amount,stack.itemMeta}); PacketManager.sendPacketToClients(packet, worldObj, new Vector3(this), 20); } pVolume = volume; @@ -79,8 +76,9 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead @Override public String getMeterReading(EntityPlayer user, ForgeDirection side) { - if (volume == 0) { return "Empty"; } - return (volume / LiquidContainerRegistry.BUCKET_VOLUME) + "/" + (tank.getCapacity() / LiquidContainerRegistry.BUCKET_VOLUME) + " " + type.getName(); + if (tank.getLiquid() == null) { return "Empty"; } + return (tank.getLiquid().amount/ LiquidContainerRegistry.BUCKET_VOLUME) + "/" + (tank.getCapacity() / LiquidContainerRegistry.BUCKET_VOLUME) + + " " + LiquidHandler.get(tank.getLiquid()).getName(); } @Override @@ -88,6 +86,7 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead { super.readFromNBT(nbt); UpdateConverter.convert(this, nbt); + LiquidStack liquid = new LiquidStack(0, 0, 0); liquid.readFromNBT(nbt.getCompoundTag("stored")); tank.setLiquid(liquid); @@ -108,7 +107,7 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead { try { - this.volume = data.readInt(); + this.tank.setLiquid(new LiquidStack(data.readInt(),data.readInt(),data.readInt())); } catch (Exception e) { @@ -118,32 +117,18 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead } - // ---------------------------- - // Liquid stuff - // ---------------------------- - public void setType(LiquidData dm) - { - this.type = dm; - - } - - public LiquidData getType() - { - return this.type; - } - @Override public int fill(ForgeDirection from, LiquidStack resource, boolean doFill) { - if (resource == null || !LiquidHandler.isEqual(resource, type)) { return 0; } + if (resource == null || (!LiquidHandler.isEqual(resource, color.getLiquidData().getStack())&& this.color != PipeColor.NONE)) { return 0; } return this.fill(0, resource, doFill); } @Override public int fill(int tankIndex, LiquidStack resource, boolean doFill) { - if (resource == null || tankIndex != 0) - return 0; + if (resource == null || tankIndex != 0) { return 0; } + if (this.isFull()) { int change = 1; @@ -152,60 +137,21 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead change = -1; } TileEntity tank = worldObj.getBlockTileEntity(xCoord, yCoord + change, zCoord); - if (tank instanceof TileEntityTank) { return ((TileEntityTank) tank).fill(0,resource, doFill); } + if (tank instanceof TileEntityTank) { return ((TileEntityTank) tank).fill(0, resource, doFill); } } return this.tank.fill(resource, doFill); } - /** - * find out if this tank is actual full or not + /** find out if this tank is actual full or not * - * @return - */ + * @return */ public boolean isFull() { - if (this.tank.getLiquid() == null) - return false; - if (this.tank.getLiquid().amount > 0 && this.tank.getLiquid().amount < this.tank.getCapacity()) - return false; + if (this.tank.getLiquid() == null) { return false; } + if (this.tank.getLiquid().amount > 0 && this.tank.getLiquid().amount < this.tank.getCapacity()) { return false; } return true; } - /** - * finds the first fillable tank in either direction - * - * @param top - * - search up - * @return - */ - public TileEntityTank getFillAbleTank(boolean top) - { - TileEntityTank tank = this; - boolean stop = false; - int y = tank.yCoord; - while (y > 6 && y < 255) - { - if (top) - { - y += 1; - } - else - { - y -= 1; - } - TileEntity ent = tank.worldObj.getBlockTileEntity(xCoord, y, zCoord); - if (ent instanceof TileEntityTank && ((TileEntityTank) ent).getType() == this.type && !((TileEntityTank) ent).isFull()) - { - tank = (TileEntityTank) ent; - } - else - { - break; - } - } - return tank; - } - @Override public LiquidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { @@ -215,11 +161,11 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead @Override public LiquidStack drain(int tankIndex, int maxDrain, boolean doDrain) { - if (tankIndex != 0) { return null; } + if (tankIndex != 0 || this.tank.getLiquid() == null) { return null; } LiquidStack stack = this.tank.getLiquid(); - if (maxDrain <= this.tank.getLiquid().amount) + if (maxDrain < this.tank.getLiquid().amount) { - stack = LiquidHandler.getStack(type, maxDrain); + stack = LiquidHandler.getStack(stack, maxDrain); } if (doDrain) { @@ -243,7 +189,7 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead @Override public int presureOutput(LiquidData type, ForgeDirection dir) { - if (type == this.type) + if (type == color.getLiquidData() || type == LiquidHandler.unkown) { if (type.getCanFloat() && dir == ForgeDirection.DOWN) return type.getPressure(); @@ -256,7 +202,7 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead @Override public boolean canPressureToo(LiquidData type, ForgeDirection dir) { - if (type == this.type) + if (type == color.getLiquidData() || type == LiquidHandler.unkown) { if (type.getCanFloat() && dir == ForgeDirection.DOWN) return true; @@ -266,32 +212,30 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead return false; } - /** - * cause this TE to trade liquid down if the liquid is in liquid state or up - * if in gas state. - */ + /** cause this TE to trade liquid down if the liquid is in liquid state or up + * if in gas state. */ public void tradeDown() { if (this.tank.getLiquid() == null || this.tank.getLiquid().amount <= 0) return; TileEntity ent = worldObj.getBlockTileEntity(xCoord, yCoord - 1, zCoord); - if (ent instanceof TileEntityTank && ((TileEntityTank) ent).type == this.type && !((TileEntityTank) ent).isFull()) + if (ent instanceof TileEntityTank && ((TileEntityTank) ent).getColor() == this.color && !((TileEntityTank) ent).isFull()) { int f = ((TileEntityTank) ent).tank.fill(this.tank.getLiquid(), true); this.tank.drain(f, true); } } - /** - * Cause this TE to trade liquid with the Tanks around it to level off - */ + /** Cause this TE to trade liquid with the Tanks around it to level off */ public void tradeArround() { - if (this.tank.getLiquid() == null || this.tank.getLiquid().amount <= 0) - return; + if (this.tank.getLiquid() == null || this.tank.getLiquid().amount <= 0) { return; } + TileEntity[] ents = connectionHelper.getSurroundings(worldObj, xCoord, yCoord, zCoord); + int commonVol = this.tank.getLiquid().amount; int tanks = 1; + for (int i = 2; i < 6; i++) { if (ents[i] instanceof TileEntityTank && ((TileEntityTank) ents[i]).color == this.color) @@ -303,23 +247,28 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead } } } + int equalVol = commonVol / tanks; + for (int i = 2; i < 6; i++) { if (this.tank.getLiquid() == null || this.tank.getLiquid().amount <= equalVol) + { break; + } if (ents[i] instanceof TileEntityTank && ((TileEntityTank) ents[i]).color == this.color && !((TileEntityTank) ents[i]).isFull()) { - LiquidStack stack = ((TileEntityTank) ents[i]).tank.getLiquid(); + LiquidStack target = ((TileEntityTank) ents[i]).tank.getLiquid(); LiquidStack filling = this.tank.getLiquid(); - if (stack == null) + + if (target == null) { - filling = LiquidHandler.getStack(this.type, equalVol); + filling = LiquidHandler.getStack(this.tank.getLiquid(), equalVol); } - else if (stack.amount < equalVol) + else if (target.amount < equalVol) { - filling = LiquidHandler.getStack(this.type, equalVol - stack.amount); + filling = LiquidHandler.getStack(this.tank.getLiquid(), equalVol - target.amount); } else { @@ -332,12 +281,14 @@ public class TileEntityTank extends TileEntity implements IPacketReceiver, IRead } } - public void setColor(PipeColor pipeColor) + @Override + public void setColor(Object obj) { - this.color = pipeColor; + this.color = PipeColor.get(cc); } + @Override public PipeColor getColor() { return color; diff --git a/minecraft/liquidmechanics/resource/pipes/Pipe.png b/minecraft/liquidmechanics/resource/pipes/Pipe.png index b5d05f2ab1a06d33b453a1228ba5cda2c116df25..9ba063c057f0a79b089fbfce371ea2d78770c463 100644 GIT binary patch delta 850 zcmV-Y1Fig;2fzoAdw(!VL_t(|UhP@EZrd;rrfeq;k}lm0bZ+zW6nTKmY4Zg2)F&ul z4|#&1gFALg(5`)!B0+#`1q^iRnEJ1#(hDep6z|BhM6)y?SfcKa-+ekBrDC=IiGRPN z!;|vt-NiW!mH#)_Uu(y2?|xL|F&E&=CF^5bpO4Fjem}$~)qfX8emovm#Pn;74Vz3S zL^(uPk_>Z%_{h3$1X?42JG3m(1OgpdisA5esOn$8f8}c?>$QMDarox=xd-6#k6A;p z>zHl*!{}rCjQ_a@C`O|ZD*^a5$`(acy6*+ug}z zBBs+RHAJ*LH$D`5c^80AQ<{S8O`xd(q%aZ-bFKh(q$qe-D!}DgU&urM>EkvzZ1OfC zXDZRK#_RsDK09~l_j7leA-w7 ze0}<20{&pfLVabO31C1zB#9xqrXB?B9sT+u&advpw-2wy+fNT-y(ao{rlOY=0ZiLX z{dKPkHT46My5qn;S=YtVrmoqzsDeGSY62&JT_J_qo1uCey9avZ)q zp{l6W?gF5(fPW5$*+yIlH1avPi79hDc^pqAM;shBu$brf09d3Fl}n}q*qT7Txt{#i}#!R*C8pp=L zJxljGd(l<^ZV<5G$0Vm>U?U;K8v|a+R)CmD5pyhg7Z7uH8i*|upaGC$cELt~7}m3x cfsQq{zj^zC3qNB}h5!Hn07*qoM6N<$f~54AKmY&$ delta 812 zcmV+{1JnG#2bu?vdw&W^L_t(|UhP`Va??NzUOQ>iQfBzMBuwuVco`0y7#@HNmp%z) zh6@kCaOPzgxKol71ILm$A@Z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wv zKxR7~{pP9?k-yC*FiH;~8T=|l$K!D&*bq?jK*6eUybgqdqfWO-gcB->k^!jco`Zv( z0U$`{Z{C(v__nXq?e6H)M>QM{Ip(osrEd^Q2}T2>WB?W#SvV>J;!U87eK`Zv$24UI zC=uZL%j?3@2d^$l7Te=haxf_s0bp%uqEU7l61Qto0^pOt<$R_V^P9q-Zm+L8y}jZb zjC*o&v>AsJTMlIE>P`v=o01_`@DXDPBB2gW4^Vm(ENO&Gmq~=WEP``EX0`aEba#J~ zl{n6Yk|1XAr3t{n2iA^C01WJEIaiC>je_@3kZoL91vAoeF)L)c`v*#EUeB5d;J>AL zi2C)BBy^{zdi_JScW}2THE_T={stvD)<3+rmc7FcKFN?Qq>>OI0juS3fyC=Y4a>uE5#LNO)n*p|o z0Mx)q%b7&5@wm-@_lEk>+6)j1$ga)HyMSGbxaDsqKqi0;0=fRn;22xWUsB1Xqc`Xb QeE|H(?D8gCb z5n0T@z;^_M8K-LVNdpDhOFVsD+3zy4i3@P=V_Pf8z`(r2)5S5Q;?~={zJ7-sBpMz{ zI(Komv=nm`N!+RA>3`zK|M#k`@569_uk&%<#G-$UHsuUH5JfuM**Cm;&B&m}-~jR^3xfce3;_mjsGV@jQ5kP` zTstrASN*niet~6e>?`i+wR2;)zd6qdwb@AU_+6#7k7F#q7yrwB%ef}I|LKd2Egv5H z`(OXJ%aDqd?_RFhH z?!2#JV#v@Cj3v2XbB+V0sf$7bFtwB5%2yxx+{32UO!D2kl>rDmUHx3vIVCg!0H)ju AK>z>% literal 0 HcmV?d00001 diff --git a/minecraft/liquidmechanics/resource/tanks/RedTank.png b/minecraft/liquidmechanics/resource/tanks/RedTank.png deleted file mode 100644 index 31350aab7e1d02951c78b6d6233bf684349de754..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1055 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sDEfH31!Z9ZwBAX}2Ry9>jA5L~c#`DCC7dx@v7EBjqWR$(KN zMuvyq7#NuQJzX3_D&pSGbu7BhT8d6^~b+UEyBNXvQ^T#S;cjg`3agc^LlLP7z^fNSR-6 z$nfKP05G^F)&4um@Zi3)CnJN$x1Zw74fXu0tPIpr?0=ujZjW@uyWfA7mh()%b=a0= zY2VA&lNolkUsIm5*Epjl{94^}d8-{NoYPdUUA=nz2Mn_&*u30)w=TA~ zzMNa0@qhcm-^mRhYYzPTG|T;tZr<){hA5N0OD#h!g?Bu$sm&GUThA<$*Z-QSzpsSb zA@@L)sokSxb^e%evIUlB^c+5)-zUZJCVB-Y1H)PS-&qVB@)xQxFqr&*vzqb1 zzSda`3>W@vUeCtxTPzD`0&d0K?|C+b_cU}et2kH)0G;xXujRBlBZI=7#)6+JM7hk9 lfq|o3A;u2qkb%|wpWVA_=}yZu8&HmC@O1TaS?83{1OQA%tIPlZ diff --git a/minecraft/liquidmechanics/resource/tanks/OrangeTank.png b/minecraft/liquidmechanics/resource/tanks/SteamTank.png similarity index 100% rename from minecraft/liquidmechanics/resource/tanks/OrangeTank.png rename to minecraft/liquidmechanics/resource/tanks/SteamTank.png diff --git a/minecraft/liquidmechanics/resource/tanks/Tank.png b/minecraft/liquidmechanics/resource/tanks/Tank.png index 13f9f558832d18f00b112df1a77a068b2b77f631..83fdc881c5fb86c1d3b8e53a4cb7465dca3ff368 100644 GIT binary patch delta 696 zcmbQp(aJHQy1vxY#WAEJ?(N*Sg|{3eS_11HOD$*-anRIMR$VHraX|G#^H2XpDIXM+ zdY(L8bNhC?WN*5}z1_EK<;7|h?#%sf6QvImAK$#EDKiT_8jSYc z>bZ5-nm=K2L#r3x1cphq|Bf;|xbN)A$l&qqr#N#%J-;d|gTl?{@jMLwY^R7YG^EV0 zH)QznJs^mIe8u&sM*sP@_QCDljmP($xBuSvaObxI{(~{czg(Zpu&e!=vdtdj74_lM z>Ym@XvQXt*rgH7{>F)RPD{eoqtdON2*V^m|~(_ z7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yL-&ZY6JS~G*U3ZGf_ z{bNJqe1pkVXK!Z8R5@^8sL6h&e13+fuu1X)$v5Zb{n%z=Tq~_}^@>Qsg4$;bWCdrL zI8NtDzE`2t2=H~T>9^7~!(x*P#GUZOjqLebF ziBm6}{k>2rD>l&N;=h0^>>}}uM{}em-JN(SPay9eAFtbjd%X^)rMNz2y^B^VIDPg) z6@T?Y%LzB?g*IfG*eSezVL_r!mGtZ)V|%eQ*t zE%y$`W$>$f`z3g^>b1YdDkFg#ue0`8GsSO^NVc?ZS-ERo*Ao9b52x&0Sl9X3zB@cQ z_3+R6O1EaFJ$`vV*>#7`!BzL(GF-Uvh(X}A_Iis4n?KxAReT+kA}%bFCV9T^|D0#l zViC{Y1%>b^$nQ?;d=uQa%7|6xv$(;I&^yl$fLI!s-+VF)OEXhK z67#a1^NaFQi%L=}N=l1T^$PORiOGSlc|H_Be>&+=QbNLmuU`r{nJ)1voH@v*!hc(J z9$Qe)QO9?FJg?84+{03IW73|xu@e89A2jVft(DjP2b*txDf-9!c@pS^j08xR!88 z!P}6jnZGxNn|ai{jQ7lZ7~RRUf7!Rcl|d!%KD|Ef7&m{*>(lm{+y(}g1_cHNS_T_T z4E9*;`5d`@@BghU9xWi@NNW{dv@g^&dr`zHo%|Nrf?xE)VuvBaj+`R5V> zou|15ohopsd-glu`thfx=uh!~ChxdC<50bVf5gKpS85hYMqItl65kuQ{r~;X2j19E zyL69dR~BFVmiMbA42%pS{%p$WxGR1x<6z!_mxm`5+%aEh{dK{SGO-PUtTmh`C4G3L z&l~4meq3^UC6`eS|9P>}32r7E9tnG2^=iLq{%`#g_Cnj(zcJS=RZSQf0=yZSbQy4$ qo#65kPLNcRq8p8#OyH(66aWir3KLC$H!B;+KqeqO0i>;1K|BDvRIy9| literal 0 HcmV?d00001 diff --git a/resources/models/TankSingle2.tcn b/resources/models/TankSingle2.tcn new file mode 100644 index 0000000000000000000000000000000000000000..3715d45478ea81be589a27ec1c764ac389923e45 GIT binary patch literal 2143 zc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