removed more errors and formating
This commit is contained in:
parent
6f0411f1fe
commit
d4b3d3585a
43 changed files with 778 additions and 964 deletions
|
@ -4,20 +4,16 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import dark.core.api.ColorCode;
|
||||
import dark.core.api.INetworkPart;
|
||||
import dark.core.tile.network.NetworkTileEntities;
|
||||
import dark.fluid.api.INetworkFluidPart;
|
||||
|
||||
/**
|
||||
* Side note: the network should act like this when done {@link http
|
||||
/** Side note: the network should act like this when done {@link http
|
||||
* ://www.e4training.com/hydraulic_calculators/B1.htm} as well as stay compatible with the forge
|
||||
* Liquids
|
||||
*
|
||||
* @author Rseifert
|
||||
*
|
||||
*/
|
||||
* @author Rseifert */
|
||||
public class NetworkFluidContainers extends NetworkFluidTiles
|
||||
{
|
||||
|
||||
|
@ -25,6 +21,7 @@ public class NetworkFluidContainers extends NetworkFluidTiles
|
|||
{
|
||||
super(color, parts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NetworkTileEntities newInstance()
|
||||
{
|
||||
|
|
|
@ -1,30 +1,27 @@
|
|||
package dark.core.network.fluid;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
import dark.core.api.ColorCode;
|
||||
import dark.core.api.INetworkPart;
|
||||
import dark.core.hydraulic.helpers.FluidHelper;
|
||||
import dark.core.hydraulic.helpers.FluidRestrictionHandler;
|
||||
import dark.core.tile.network.NetworkTileEntities;
|
||||
import dark.fluid.api.INetworkPipe;
|
||||
import dark.helpers.ConnectionHelper;
|
||||
|
||||
/**
|
||||
* Side note: the network should act like this when done {@link http
|
||||
/** Side note: the network should act like this when done {@link http
|
||||
* ://www.e4training.com/hydraulic_calculators/B1.htm} as well as stay compatible with the forge
|
||||
* Liquids
|
||||
*
|
||||
* @author Rseifert
|
||||
*
|
||||
*/
|
||||
* @author Rseifert */
|
||||
public class NetworkPipes extends NetworkFluidTiles
|
||||
{
|
||||
|
||||
|
@ -42,7 +39,7 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
{
|
||||
super(color, parts);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NetworkTileEntities newInstance()
|
||||
{
|
||||
|
@ -54,39 +51,31 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
return super.isPartOfNetwork(ent) || this.pressureLoads.containsKey(ent) || this.pressureProducers.containsKey(ent);
|
||||
}
|
||||
|
||||
/**
|
||||
* sets this tileEntity to produce a pressure and flow rate in the network
|
||||
*/
|
||||
/** sets this tileEntity to produce a pressure and flow rate in the network */
|
||||
public void startProducingPressure(TileEntity tileEntity, FluidPressurePack fluidPack)
|
||||
{
|
||||
if (tileEntity != null && fluidPack.liquidStack != null)
|
||||
{
|
||||
if ((this.combinedStorage().getLiquid() == null || fluidPack.liquidStack.isLiquidEqual(this.combinedStorage().getLiquid())) && fluidPack.liquidStack.amount > 0)
|
||||
if ((this.combinedStorage().getFluid() == null || fluidPack.liquidStack.isFluidEqual(this.combinedStorage().getFluid())) && fluidPack.liquidStack.amount > 0)
|
||||
{
|
||||
this.pressureProducers.put(tileEntity, fluidPack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sets this tileEntity to produce a pressure and flow rate in the network
|
||||
*/
|
||||
public void startProducingPressure(TileEntity tileEntity, LiquidStack stack, double pressure)
|
||||
/** sets this tileEntity to produce a pressure and flow rate in the network */
|
||||
public void startProducingPressure(TileEntity tileEntity, FluidStack stack, double pressure)
|
||||
{
|
||||
this.startProducingPressure(tileEntity, new FluidPressurePack(stack, pressure));
|
||||
}
|
||||
|
||||
/**
|
||||
* is this tile entity producing a pressure
|
||||
*/
|
||||
/** is this tile entity producing a pressure */
|
||||
public boolean isProducingPressure(TileEntity tileEntity)
|
||||
{
|
||||
return this.pressureProducers.containsKey(tileEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets this tile entity to act as a load on the system
|
||||
*/
|
||||
/** Sets this tile entity to act as a load on the system */
|
||||
public void addLoad(TileEntity tileEntity, FluidPressurePack fluidPack)
|
||||
{
|
||||
if (tileEntity != null && fluidPack.liquidStack != null && fluidPack.liquidStack.amount > 0)
|
||||
|
@ -95,27 +84,21 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets this tile entity to act as a load on the system
|
||||
*/
|
||||
public void addLoad(TileEntity tileEntity, LiquidStack stack, double pressure)
|
||||
/** Sets this tile entity to act as a load on the system */
|
||||
public void addLoad(TileEntity tileEntity, FluidStack stack, double pressure)
|
||||
{
|
||||
this.addLoad(tileEntity, new FluidPressurePack(stack, pressure));
|
||||
}
|
||||
|
||||
/**
|
||||
* is this tileEntity a load in the network
|
||||
*/
|
||||
/** is this tileEntity a load in the network */
|
||||
public boolean isLoad(TileEntity tileEntity)
|
||||
{
|
||||
return this.pressureLoads.containsKey(tileEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ignoreTiles The TileEntities to ignore during this calculation. Null will make it not
|
||||
/** @param ignoreTiles The TileEntities to ignore during this calculation. Null will make it not
|
||||
* ignore any.
|
||||
* @return The electricity produced in this electricity network
|
||||
*/
|
||||
* @return The electricity produced in this electricity network */
|
||||
public double getPressureProduced(TileEntity... ignoreTiles)
|
||||
{
|
||||
// TODO pressure is not added as a sum but rather as a collective sum of the largest
|
||||
|
@ -175,68 +158,62 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
}
|
||||
|
||||
@Override
|
||||
public void removeTile(TileEntity ent)
|
||||
public boolean removeTile(TileEntity ent)
|
||||
{
|
||||
super.removeTile(ent);
|
||||
this.pressureLoads.remove(ent);
|
||||
this.pressureProducers.remove(ent);
|
||||
return super.removeTile(ent) || this.pressureLoads.remove(ent) || this.pressureProducers.remove(ent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds FLuid to this network from one of the connected Pipes
|
||||
/** Adds FLuid to this network from one of the connected Pipes
|
||||
*
|
||||
* @param source - Were this liquid came from
|
||||
* @param stack - LiquidStack to be sent
|
||||
* @param doFill - actually fill the tank or just check numbers
|
||||
* @return the amount of liquid consumed from the init stack
|
||||
*/
|
||||
public int addFluidToNetwork(TileEntity source, LiquidStack stack, boolean doFill)
|
||||
* @return the amount of liquid consumed from the init stack */
|
||||
public int addFluidToNetwork(TileEntity source, FluidStack stack, boolean doFill)
|
||||
{
|
||||
return this.addFluidToNetwork(source, stack, doFill, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds FLuid to this network from one of the connected Pipes
|
||||
/** Adds FLuid to this network from one of the connected Pipes
|
||||
*
|
||||
* @param source - Were this liquid came from
|
||||
* @param stack - LiquidStack to be sent
|
||||
* @param doFill - actually fill the tank or just check numbers
|
||||
* @param allowStore - allows the network to store this liquid in the pipes
|
||||
* @return the amount of liquid consumed from the init stack
|
||||
*/
|
||||
public int addFluidToNetwork(TileEntity source, LiquidStack sta, boolean doFill, boolean allowStore)
|
||||
* @return the amount of liquid consumed from the init stack */
|
||||
public int addFluidToNetwork(TileEntity source, FluidStack sta, boolean doFill, boolean allowStore)
|
||||
{
|
||||
int used = 0;
|
||||
LiquidStack prevCombined = this.combinedStorage().getLiquid();
|
||||
LiquidStack stack = sta.copy();
|
||||
FluidStack prevCombined = this.combinedStorage().getFluid();
|
||||
FluidStack stack = sta.copy();
|
||||
|
||||
if (!this.processingRequest && stack != null && FluidRestrictionHandler.isValidLiquid(color,stack))
|
||||
if (!this.processingRequest && stack != null && FluidRestrictionHandler.isValidLiquid(color, stack.getFluid()))
|
||||
{
|
||||
this.processingRequest = true;
|
||||
|
||||
if (this.combinedStorage().getLiquid() != null && !stack.isLiquidEqual(this.combinedStorage().getLiquid()))
|
||||
if (this.combinedStorage().getFluid() != null && !stack.isFluidEqual(this.combinedStorage().getFluid()))
|
||||
{
|
||||
this.causingMixing(null,this.combinedStorage().getLiquid(), stack);
|
||||
this.causingMixing(null, this.combinedStorage().getFluid(), stack);
|
||||
}
|
||||
if (stack.amount > this.getMaxFlow(stack))
|
||||
{
|
||||
stack = new LiquidStack(stack.itemID, this.getMaxFlow(stack), stack.itemMeta);
|
||||
stack = FluidHelper.getStack(stack, this.getMaxFlow(stack));
|
||||
}
|
||||
|
||||
/* Main fill target to try to fill with the stack */
|
||||
ITankContainer primaryFill = null;
|
||||
IFluidHandler primaryFill = null;
|
||||
int volume = Integer.MAX_VALUE;
|
||||
ForgeDirection fillDir = ForgeDirection.UNKNOWN;
|
||||
|
||||
/* Secondary fill target if the main target is not found */
|
||||
ITankContainer secondayFill = null;
|
||||
IFluidHandler secondayFill = null;
|
||||
int mostFill = 0;
|
||||
ForgeDirection otherFillDir = ForgeDirection.UNKNOWN;
|
||||
|
||||
boolean found = false;
|
||||
|
||||
/* FIND THE FILL TARGET FROM THE LIST OF FLUID RECIEVERS */
|
||||
for (ITankContainer tankContainer : connectedTanks)
|
||||
for (IFluidHandler tankContainer : connectedTanks)
|
||||
{
|
||||
if (tankContainer instanceof TileEntity && tankContainer != source && !(tankContainer instanceof INetworkPipe))
|
||||
{
|
||||
|
@ -247,13 +224,13 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
if (connectedTiles[i] instanceof INetworkPipe && ((INetworkPipe) connectedTiles[i]).getTileNetwork() == this)
|
||||
{
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(i).getOpposite();
|
||||
ILiquidTank targetTank = tankContainer.getTank(dir, stack);
|
||||
IFluidTank targetTank = tankContainer.getTank(dir, stack);
|
||||
int fill = tankContainer.fill(dir, stack, false);
|
||||
|
||||
/* USE GET TANK FROM SIDE METHOD FIRST */
|
||||
if (targetTank != null)
|
||||
{
|
||||
LiquidStack stackStored = targetTank.getLiquid();
|
||||
FluidStack stackStored = targetTank.getFluid();
|
||||
if (stackStored == null)
|
||||
{
|
||||
primaryFill = tankContainer;
|
||||
|
@ -301,11 +278,11 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
}
|
||||
|
||||
/* IF THE COMBINED STORAGE OF THE PIPES HAS LIQUID MOVE IT FIRST */
|
||||
if (!filledMain && used > 0 && this.combinedStorage().getLiquid() != null && this.combinedStorage().getLiquid().amount > 0)
|
||||
if (!filledMain && used > 0 && this.combinedStorage().getFluid() != null && this.combinedStorage().getFluid().amount > 0)
|
||||
{
|
||||
|
||||
LiquidStack drainStack = new LiquidStack(0, 0, 0);
|
||||
if (this.combinedStorage().getLiquid().amount >= used)
|
||||
if (this.combinedStorage().getFluid().amount >= used)
|
||||
{
|
||||
drainStack = this.combinedStorage().drain(used, doFill);
|
||||
used = 0;
|
||||
|
@ -313,7 +290,7 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
else
|
||||
{
|
||||
int pUsed = used;
|
||||
used = Math.min(used, Math.max(used - this.combinedStorage().getLiquid().amount, 0));
|
||||
used = Math.min(used, Math.max(used - this.combinedStorage().getFluid().amount, 0));
|
||||
drainStack = this.combinedStorage().drain(pUsed - used, doFill);
|
||||
}
|
||||
// System.out.println("Pulling " + (drainStack != null ? drainStack.amount : 0) +
|
||||
|
@ -321,7 +298,7 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
// this.combinedStorage.getLiquid().amount : 0));
|
||||
|
||||
}
|
||||
if (prevCombined != null && this.combinedStorage().getLiquid() != null && prevCombined.amount != this.combinedStorage().getLiquid().amount)
|
||||
if (prevCombined != null && this.combinedStorage().getFluid() != null && prevCombined.amount != this.combinedStorage().getFluid().amount)
|
||||
{
|
||||
this.balanceColletiveTank(false);
|
||||
}
|
||||
|
@ -330,9 +307,7 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
return used;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the flow rate of the system using the lowest flow rate
|
||||
*/
|
||||
/** Gets the flow rate of the system using the lowest flow rate */
|
||||
public int getMaxFlow(LiquidStack stack)
|
||||
{
|
||||
int flow = 1000;
|
||||
|
@ -350,9 +325,7 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
return flow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates after the pressure has changed a good bit
|
||||
*/
|
||||
/** Updates after the pressure has changed a good bit */
|
||||
public void onPresureChange()
|
||||
{
|
||||
this.cleanUpMembers();
|
||||
|
@ -371,7 +344,7 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void mergeDo(NetworkTileEntities network)
|
||||
{
|
||||
|
|
|
@ -5,38 +5,24 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
// mechanical
|
||||
public interface IForce
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param side the rpm is coming from
|
||||
* @return rpm that the block is running at
|
||||
*/
|
||||
/** @param side the rpm is coming from
|
||||
* @return rpm that the block is running at */
|
||||
public int getForceSide(ForgeDirection side);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param side
|
||||
* @return if mechanical force can be outputed from this side
|
||||
*/
|
||||
/** @param side
|
||||
* @return if mechanical force can be outputed from this side */
|
||||
public boolean canOutputSide(ForgeDirection side);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param side
|
||||
* @return if mechanical force can be inputed from this side
|
||||
*/
|
||||
/** @param side
|
||||
* @return if mechanical force can be inputed from this side */
|
||||
public boolean canInputSide(ForgeDirection side);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param RPM being applied to this machine
|
||||
* @return the rpm after the load has been applied
|
||||
*/
|
||||
/** @param RPM being applied to this machine
|
||||
* @return the rpm after the load has been applied */
|
||||
public int applyForce(int force);
|
||||
|
||||
/**
|
||||
* not required but is handy to get animation position of some mechanical block
|
||||
/** not required but is handy to get animation position of some mechanical block
|
||||
*
|
||||
* @return int between 0 -7
|
||||
*/
|
||||
* @return int between 0 -7 */
|
||||
public int getAnimationPos();
|
||||
}
|
||||
|
|
|
@ -4,11 +4,8 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
|
||||
public interface IForceLoad
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param side
|
||||
* @return if mechanical force can be inputed from this side
|
||||
*/
|
||||
/** @param side
|
||||
* @return if mechanical force can be inputed from this side */
|
||||
public boolean canInputSide(ForgeDirection side);
|
||||
|
||||
public int applyForce(ForgeDirection side, int force);
|
||||
|
|
|
@ -4,17 +4,11 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
|
||||
public interface IForceProvider
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param side the rpm is coming from
|
||||
* @return rpm that the block is running at
|
||||
*/
|
||||
/** @param side the rpm is coming from
|
||||
* @return rpm that the block is running at */
|
||||
public int getForceSide(ForgeDirection side);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param side
|
||||
* @return if mechanical force can be outputed from this side
|
||||
*/
|
||||
/** @param side
|
||||
* @return if mechanical force can be outputed from this side */
|
||||
public boolean canOutputSide(ForgeDirection side);
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@ import dark.fluid.common.pump.TileEntityConstructionPump;
|
|||
import dark.fluid.common.pump.TileEntityStarterPump;
|
||||
import dark.mech.client.render.RenderGearRod;
|
||||
import dark.mech.client.render.RenderGenerator;
|
||||
import dark.mech.common.machines.TileEntityGenerator;
|
||||
import dark.mech.common.machines.TileEntityRod;
|
||||
|
||||
public class ClientProxy extends CommonProxy
|
||||
{
|
||||
|
|
|
@ -71,13 +71,13 @@ public class ModelConstructionPump extends ModelBase
|
|||
|
||||
public void render(float f5)
|
||||
{
|
||||
Side3.render(f5);
|
||||
Side3.render(f5);
|
||||
side.render(f5);
|
||||
base.render(f5);
|
||||
side2.render(f5);
|
||||
side4.render(f5);
|
||||
}
|
||||
|
||||
|
||||
public void renderMotor(float f5)
|
||||
{
|
||||
Motor2.render(f5);
|
||||
|
|
|
@ -11,281 +11,281 @@ import net.minecraft.client.model.ModelRenderer;
|
|||
|
||||
public class ModelPump extends ModelBase
|
||||
{
|
||||
// fields
|
||||
ModelRenderer Body;
|
||||
ModelRenderer pipecc1;
|
||||
ModelRenderer pipecc3;
|
||||
ModelRenderer wheelcenter;
|
||||
ModelRenderer wheelcenter2;
|
||||
ModelRenderer joint;
|
||||
ModelRenderer wheelcc0;
|
||||
ModelRenderer wheelcc1;
|
||||
ModelRenderer wheelcc2;
|
||||
ModelRenderer wheelcc3;
|
||||
ModelRenderer wheelcc4;
|
||||
ModelRenderer wheelcc5;
|
||||
ModelRenderer wheelcc6;
|
||||
ModelRenderer wheelcc7;
|
||||
ModelRenderer wheelBrace;
|
||||
ModelRenderer piston_top;
|
||||
ModelRenderer piston;
|
||||
ModelRenderer wheelBrace2;
|
||||
ModelRenderer joint2;
|
||||
ModelRenderer w2;
|
||||
ModelRenderer w22;
|
||||
ModelRenderer w2cc;
|
||||
ModelRenderer w2cc1;
|
||||
ModelRenderer w2cc2;
|
||||
ModelRenderer w2cc3;
|
||||
ModelRenderer w2cc4;
|
||||
ModelRenderer w2cc5;
|
||||
ModelRenderer w2cc6;
|
||||
ModelRenderer w2cc7;
|
||||
ModelRenderer side7;
|
||||
ModelRenderer side8;
|
||||
// fields
|
||||
ModelRenderer Body;
|
||||
ModelRenderer pipecc1;
|
||||
ModelRenderer pipecc3;
|
||||
ModelRenderer wheelcenter;
|
||||
ModelRenderer wheelcenter2;
|
||||
ModelRenderer joint;
|
||||
ModelRenderer wheelcc0;
|
||||
ModelRenderer wheelcc1;
|
||||
ModelRenderer wheelcc2;
|
||||
ModelRenderer wheelcc3;
|
||||
ModelRenderer wheelcc4;
|
||||
ModelRenderer wheelcc5;
|
||||
ModelRenderer wheelcc6;
|
||||
ModelRenderer wheelcc7;
|
||||
ModelRenderer wheelBrace;
|
||||
ModelRenderer piston_top;
|
||||
ModelRenderer piston;
|
||||
ModelRenderer wheelBrace2;
|
||||
ModelRenderer joint2;
|
||||
ModelRenderer w2;
|
||||
ModelRenderer w22;
|
||||
ModelRenderer w2cc;
|
||||
ModelRenderer w2cc1;
|
||||
ModelRenderer w2cc2;
|
||||
ModelRenderer w2cc3;
|
||||
ModelRenderer w2cc4;
|
||||
ModelRenderer w2cc5;
|
||||
ModelRenderer w2cc6;
|
||||
ModelRenderer w2cc7;
|
||||
ModelRenderer side7;
|
||||
ModelRenderer side8;
|
||||
|
||||
public ModelPump()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
public ModelPump()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
|
||||
Body = new ModelRenderer(this, 0, 109);
|
||||
Body.addBox(-3F, 0F, -3F, 6, 12, 6);
|
||||
Body.setRotationPoint(0F, 12F, 0F);
|
||||
Body.setTextureSize(128, 128);
|
||||
Body.mirror = true;
|
||||
setRotation(Body, 0F, 0F, 0F);
|
||||
pipecc1 = new ModelRenderer(this, 21, 92);
|
||||
pipecc1.addBox(-3.5F, -3.5F, 3F, 7, 7, 5);
|
||||
pipecc1.setRotationPoint(0F, 16F, 0F);
|
||||
pipecc1.setTextureSize(128, 128);
|
||||
pipecc1.mirror = true;
|
||||
setRotation(pipecc1, 0F, 1.570796F, 0F);
|
||||
pipecc3 = new ModelRenderer(this, 8, 50);
|
||||
pipecc3.addBox(-3.5F, -4F, 3F, 7, 5, 5);
|
||||
pipecc3.setRotationPoint(0F, 16F, 0F);
|
||||
pipecc3.setTextureSize(128, 128);
|
||||
pipecc3.mirror = true;
|
||||
setRotation(pipecc3, 0F, 3.141593F, 0F);
|
||||
wheelcenter = new ModelRenderer(this, 0, 25);
|
||||
wheelcenter.addBox(0F, -2.5F, -2.5F, 1, 5, 5);
|
||||
wheelcenter.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcenter.setTextureSize(128, 128);
|
||||
wheelcenter.mirror = true;
|
||||
setRotation(wheelcenter, 0F, 0F, 0F);
|
||||
wheelcenter2 = new ModelRenderer(this, 0, 25);
|
||||
wheelcenter2.addBox(0F, -2.5F, -2.5F, 1, 5, 5);
|
||||
wheelcenter2.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcenter2.setTextureSize(128, 128);
|
||||
wheelcenter2.mirror = true;
|
||||
setRotation(wheelcenter2, 0.7853982F, 0F, 0F);
|
||||
joint = new ModelRenderer(this, 0, 18);
|
||||
joint.addBox(0F, -1.5F, -1.5F, 1, 3, 3);
|
||||
joint.setRotationPoint(-4F, 18F, 0F);
|
||||
joint.setTextureSize(128, 128);
|
||||
joint.mirror = true;
|
||||
setRotation(joint, 0F, 0F, 0F);
|
||||
wheelcc0 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc0.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc0.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc0.setTextureSize(128, 128);
|
||||
wheelcc0.mirror = true;
|
||||
setRotation(wheelcc0, 1.570796F, 0F, 0F);
|
||||
wheelcc1 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc1.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc1.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc1.setTextureSize(128, 128);
|
||||
wheelcc1.mirror = true;
|
||||
setRotation(wheelcc1, 0F, 0F, 0F);
|
||||
wheelcc2 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc2.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc2.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc2.setTextureSize(128, 128);
|
||||
wheelcc2.mirror = true;
|
||||
setRotation(wheelcc2, -1.570796F, 0F, 0F);
|
||||
wheelcc3 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc3.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc3.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc3.setTextureSize(128, 128);
|
||||
wheelcc3.mirror = true;
|
||||
setRotation(wheelcc3, 3.141593F, 0F, 0F);
|
||||
wheelcc4 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc4.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc4.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc4.setTextureSize(128, 128);
|
||||
wheelcc4.mirror = true;
|
||||
setRotation(wheelcc4, 0.7853982F, 0F, 0F);
|
||||
wheelcc5 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc5.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc5.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc5.setTextureSize(128, 128);
|
||||
wheelcc5.mirror = true;
|
||||
setRotation(wheelcc5, -2.356194F, 0F, 0F);
|
||||
wheelcc6 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc6.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc6.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc6.setTextureSize(128, 128);
|
||||
wheelcc6.mirror = true;
|
||||
setRotation(wheelcc6, -0.7853982F, 0F, 0F);
|
||||
wheelcc7 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc7.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc7.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc7.setTextureSize(128, 128);
|
||||
wheelcc7.mirror = true;
|
||||
setRotation(wheelcc7, 2.356194F, 0F, 0F);
|
||||
wheelBrace = new ModelRenderer(this, 27, 5);
|
||||
wheelBrace.addBox(0F, -1.5F, -1.5F, 1, 8, 3);
|
||||
wheelBrace.setRotationPoint(-6F, 18F, 0F);
|
||||
wheelBrace.setTextureSize(128, 128);
|
||||
wheelBrace.mirror = true;
|
||||
setRotation(wheelBrace, 0F, 0F, 0F);
|
||||
piston_top = new ModelRenderer(this, 0, 81);
|
||||
piston_top.addBox(-3F, 0F, -3F, 6, 1, 6);
|
||||
piston_top.setRotationPoint(0F, 10F, 0F);
|
||||
piston_top.setTextureSize(128, 128);
|
||||
piston_top.mirror = true;
|
||||
setRotation(piston_top, 0F, 0F, 0F);
|
||||
piston = new ModelRenderer(this, 0, 90);
|
||||
piston.addBox(-2.5F, 0F, -2.5F, 5, 12, 5);
|
||||
piston.setRotationPoint(0F, 11F, 0F);
|
||||
piston.setTextureSize(128, 128);
|
||||
piston.mirror = true;
|
||||
setRotation(piston, 0F, 0F, 0F);
|
||||
wheelBrace2 = new ModelRenderer(this, 26, 18);
|
||||
wheelBrace2.addBox(0F, 0F, -1.5F, 2, 1, 3);
|
||||
wheelBrace2.setRotationPoint(-5F, 23F, 0F);
|
||||
wheelBrace2.setTextureSize(128, 128);
|
||||
wheelBrace2.mirror = true;
|
||||
setRotation(wheelBrace2, 0F, 0F, 0F);
|
||||
joint2 = new ModelRenderer(this, 0, 14);
|
||||
joint2.addBox(0F, -0.5F, -0.5F, 1, 1, 1);
|
||||
joint2.setRotationPoint(-4F, 14F, -6F);
|
||||
joint2.setTextureSize(128, 128);
|
||||
joint2.mirror = true;
|
||||
setRotation(joint2, 0F, 0F, 0F);
|
||||
w2 = new ModelRenderer(this, 0, 55);
|
||||
w2.addBox(0F, -1F, -1F, 1, 2, 2);
|
||||
w2.setRotationPoint(-5F, 14F, -6F);
|
||||
w2.setTextureSize(128, 128);
|
||||
w2.mirror = true;
|
||||
setRotation(w2, 0.7853982F, 0F, 0F);
|
||||
w22 = new ModelRenderer(this, 0, 55);
|
||||
w22.addBox(0F, -1F, -1F, 1, 2, 2);
|
||||
w22.setRotationPoint(-5F, 14F, -6F);
|
||||
w22.setTextureSize(128, 128);
|
||||
w22.mirror = true;
|
||||
setRotation(w22, 0F, 0F, 0F);
|
||||
w2cc = new ModelRenderer(this, 0, 50);
|
||||
w2cc.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc.setTextureSize(128, 128);
|
||||
w2cc.mirror = true;
|
||||
setRotation(w2cc, 1.570796F, 0F, 0F);
|
||||
w2cc1 = new ModelRenderer(this, 0, 50);
|
||||
w2cc1.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc1.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc1.setTextureSize(128, 128);
|
||||
w2cc1.mirror = true;
|
||||
setRotation(w2cc1, 0.7853982F, 0F, 0F);
|
||||
w2cc2 = new ModelRenderer(this, 0, 50);
|
||||
w2cc2.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc2.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc2.setTextureSize(128, 128);
|
||||
w2cc2.mirror = true;
|
||||
setRotation(w2cc2, 0F, 0F, 0F);
|
||||
w2cc3 = new ModelRenderer(this, 0, 50);
|
||||
w2cc3.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc3.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc3.setTextureSize(128, 128);
|
||||
w2cc3.mirror = true;
|
||||
setRotation(w2cc3, -0.7853982F, 0F, 0F);
|
||||
w2cc4 = new ModelRenderer(this, 0, 50);
|
||||
w2cc4.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc4.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc4.setTextureSize(128, 128);
|
||||
w2cc4.mirror = true;
|
||||
setRotation(w2cc4, -1.570796F, 0F, 0F);
|
||||
w2cc5 = new ModelRenderer(this, 0, 50);
|
||||
w2cc5.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc5.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc5.setTextureSize(128, 128);
|
||||
w2cc5.mirror = true;
|
||||
setRotation(w2cc5, -2.356194F, 0F, 0F);
|
||||
w2cc6 = new ModelRenderer(this, 0, 50);
|
||||
w2cc6.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc6.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc6.setTextureSize(128, 128);
|
||||
w2cc6.mirror = true;
|
||||
setRotation(w2cc6, 3.141593F, 0F, 0F);
|
||||
w2cc7 = new ModelRenderer(this, 0, 50);
|
||||
w2cc7.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc7.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc7.setTextureSize(128, 128);
|
||||
w2cc7.mirror = true;
|
||||
setRotation(w2cc7, -3.926991F, 0F, 0F);
|
||||
side7 = new ModelRenderer(this, 0, 65);
|
||||
side7.addBox(-2.5F, -4F, 3F, 5, 7, 4);
|
||||
side7.setRotationPoint(0F, 21F, 0F);
|
||||
side7.setTextureSize(128, 128);
|
||||
side7.mirror = true;
|
||||
setRotation(side7, 0F, 3.141593F, 0F);
|
||||
side8 = new ModelRenderer(this, 25, 111);
|
||||
side8.addBox(-2.5F, 0F, 3F, 5, 11, 3);
|
||||
side8.setRotationPoint(0F, 13F, 0F);
|
||||
side8.setTextureSize(128, 128);
|
||||
side8.mirror = true;
|
||||
setRotation(side8, 0F, 0F, 0F);
|
||||
}
|
||||
Body = new ModelRenderer(this, 0, 109);
|
||||
Body.addBox(-3F, 0F, -3F, 6, 12, 6);
|
||||
Body.setRotationPoint(0F, 12F, 0F);
|
||||
Body.setTextureSize(128, 128);
|
||||
Body.mirror = true;
|
||||
setRotation(Body, 0F, 0F, 0F);
|
||||
pipecc1 = new ModelRenderer(this, 21, 92);
|
||||
pipecc1.addBox(-3.5F, -3.5F, 3F, 7, 7, 5);
|
||||
pipecc1.setRotationPoint(0F, 16F, 0F);
|
||||
pipecc1.setTextureSize(128, 128);
|
||||
pipecc1.mirror = true;
|
||||
setRotation(pipecc1, 0F, 1.570796F, 0F);
|
||||
pipecc3 = new ModelRenderer(this, 8, 50);
|
||||
pipecc3.addBox(-3.5F, -4F, 3F, 7, 5, 5);
|
||||
pipecc3.setRotationPoint(0F, 16F, 0F);
|
||||
pipecc3.setTextureSize(128, 128);
|
||||
pipecc3.mirror = true;
|
||||
setRotation(pipecc3, 0F, 3.141593F, 0F);
|
||||
wheelcenter = new ModelRenderer(this, 0, 25);
|
||||
wheelcenter.addBox(0F, -2.5F, -2.5F, 1, 5, 5);
|
||||
wheelcenter.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcenter.setTextureSize(128, 128);
|
||||
wheelcenter.mirror = true;
|
||||
setRotation(wheelcenter, 0F, 0F, 0F);
|
||||
wheelcenter2 = new ModelRenderer(this, 0, 25);
|
||||
wheelcenter2.addBox(0F, -2.5F, -2.5F, 1, 5, 5);
|
||||
wheelcenter2.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcenter2.setTextureSize(128, 128);
|
||||
wheelcenter2.mirror = true;
|
||||
setRotation(wheelcenter2, 0.7853982F, 0F, 0F);
|
||||
joint = new ModelRenderer(this, 0, 18);
|
||||
joint.addBox(0F, -1.5F, -1.5F, 1, 3, 3);
|
||||
joint.setRotationPoint(-4F, 18F, 0F);
|
||||
joint.setTextureSize(128, 128);
|
||||
joint.mirror = true;
|
||||
setRotation(joint, 0F, 0F, 0F);
|
||||
wheelcc0 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc0.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc0.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc0.setTextureSize(128, 128);
|
||||
wheelcc0.mirror = true;
|
||||
setRotation(wheelcc0, 1.570796F, 0F, 0F);
|
||||
wheelcc1 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc1.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc1.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc1.setTextureSize(128, 128);
|
||||
wheelcc1.mirror = true;
|
||||
setRotation(wheelcc1, 0F, 0F, 0F);
|
||||
wheelcc2 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc2.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc2.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc2.setTextureSize(128, 128);
|
||||
wheelcc2.mirror = true;
|
||||
setRotation(wheelcc2, -1.570796F, 0F, 0F);
|
||||
wheelcc3 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc3.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc3.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc3.setTextureSize(128, 128);
|
||||
wheelcc3.mirror = true;
|
||||
setRotation(wheelcc3, 3.141593F, 0F, 0F);
|
||||
wheelcc4 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc4.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc4.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc4.setTextureSize(128, 128);
|
||||
wheelcc4.mirror = true;
|
||||
setRotation(wheelcc4, 0.7853982F, 0F, 0F);
|
||||
wheelcc5 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc5.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc5.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc5.setTextureSize(128, 128);
|
||||
wheelcc5.mirror = true;
|
||||
setRotation(wheelcc5, -2.356194F, 0F, 0F);
|
||||
wheelcc6 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc6.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc6.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc6.setTextureSize(128, 128);
|
||||
wheelcc6.mirror = true;
|
||||
setRotation(wheelcc6, -0.7853982F, 0F, 0F);
|
||||
wheelcc7 = new ModelRenderer(this, 0, 0);
|
||||
wheelcc7.addBox(0F, -4.5F, -2F, 1, 1, 4);
|
||||
wheelcc7.setRotationPoint(-5F, 18F, 0F);
|
||||
wheelcc7.setTextureSize(128, 128);
|
||||
wheelcc7.mirror = true;
|
||||
setRotation(wheelcc7, 2.356194F, 0F, 0F);
|
||||
wheelBrace = new ModelRenderer(this, 27, 5);
|
||||
wheelBrace.addBox(0F, -1.5F, -1.5F, 1, 8, 3);
|
||||
wheelBrace.setRotationPoint(-6F, 18F, 0F);
|
||||
wheelBrace.setTextureSize(128, 128);
|
||||
wheelBrace.mirror = true;
|
||||
setRotation(wheelBrace, 0F, 0F, 0F);
|
||||
piston_top = new ModelRenderer(this, 0, 81);
|
||||
piston_top.addBox(-3F, 0F, -3F, 6, 1, 6);
|
||||
piston_top.setRotationPoint(0F, 10F, 0F);
|
||||
piston_top.setTextureSize(128, 128);
|
||||
piston_top.mirror = true;
|
||||
setRotation(piston_top, 0F, 0F, 0F);
|
||||
piston = new ModelRenderer(this, 0, 90);
|
||||
piston.addBox(-2.5F, 0F, -2.5F, 5, 12, 5);
|
||||
piston.setRotationPoint(0F, 11F, 0F);
|
||||
piston.setTextureSize(128, 128);
|
||||
piston.mirror = true;
|
||||
setRotation(piston, 0F, 0F, 0F);
|
||||
wheelBrace2 = new ModelRenderer(this, 26, 18);
|
||||
wheelBrace2.addBox(0F, 0F, -1.5F, 2, 1, 3);
|
||||
wheelBrace2.setRotationPoint(-5F, 23F, 0F);
|
||||
wheelBrace2.setTextureSize(128, 128);
|
||||
wheelBrace2.mirror = true;
|
||||
setRotation(wheelBrace2, 0F, 0F, 0F);
|
||||
joint2 = new ModelRenderer(this, 0, 14);
|
||||
joint2.addBox(0F, -0.5F, -0.5F, 1, 1, 1);
|
||||
joint2.setRotationPoint(-4F, 14F, -6F);
|
||||
joint2.setTextureSize(128, 128);
|
||||
joint2.mirror = true;
|
||||
setRotation(joint2, 0F, 0F, 0F);
|
||||
w2 = new ModelRenderer(this, 0, 55);
|
||||
w2.addBox(0F, -1F, -1F, 1, 2, 2);
|
||||
w2.setRotationPoint(-5F, 14F, -6F);
|
||||
w2.setTextureSize(128, 128);
|
||||
w2.mirror = true;
|
||||
setRotation(w2, 0.7853982F, 0F, 0F);
|
||||
w22 = new ModelRenderer(this, 0, 55);
|
||||
w22.addBox(0F, -1F, -1F, 1, 2, 2);
|
||||
w22.setRotationPoint(-5F, 14F, -6F);
|
||||
w22.setTextureSize(128, 128);
|
||||
w22.mirror = true;
|
||||
setRotation(w22, 0F, 0F, 0F);
|
||||
w2cc = new ModelRenderer(this, 0, 50);
|
||||
w2cc.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc.setTextureSize(128, 128);
|
||||
w2cc.mirror = true;
|
||||
setRotation(w2cc, 1.570796F, 0F, 0F);
|
||||
w2cc1 = new ModelRenderer(this, 0, 50);
|
||||
w2cc1.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc1.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc1.setTextureSize(128, 128);
|
||||
w2cc1.mirror = true;
|
||||
setRotation(w2cc1, 0.7853982F, 0F, 0F);
|
||||
w2cc2 = new ModelRenderer(this, 0, 50);
|
||||
w2cc2.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc2.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc2.setTextureSize(128, 128);
|
||||
w2cc2.mirror = true;
|
||||
setRotation(w2cc2, 0F, 0F, 0F);
|
||||
w2cc3 = new ModelRenderer(this, 0, 50);
|
||||
w2cc3.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc3.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc3.setTextureSize(128, 128);
|
||||
w2cc3.mirror = true;
|
||||
setRotation(w2cc3, -0.7853982F, 0F, 0F);
|
||||
w2cc4 = new ModelRenderer(this, 0, 50);
|
||||
w2cc4.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc4.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc4.setTextureSize(128, 128);
|
||||
w2cc4.mirror = true;
|
||||
setRotation(w2cc4, -1.570796F, 0F, 0F);
|
||||
w2cc5 = new ModelRenderer(this, 0, 50);
|
||||
w2cc5.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc5.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc5.setTextureSize(128, 128);
|
||||
w2cc5.mirror = true;
|
||||
setRotation(w2cc5, -2.356194F, 0F, 0F);
|
||||
w2cc6 = new ModelRenderer(this, 0, 50);
|
||||
w2cc6.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc6.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc6.setTextureSize(128, 128);
|
||||
w2cc6.mirror = true;
|
||||
setRotation(w2cc6, 3.141593F, 0F, 0F);
|
||||
w2cc7 = new ModelRenderer(this, 0, 50);
|
||||
w2cc7.addBox(0F, 1.3F, -1F, 1, 1, 2);
|
||||
w2cc7.setRotationPoint(-5F, 14F, -6F);
|
||||
w2cc7.setTextureSize(128, 128);
|
||||
w2cc7.mirror = true;
|
||||
setRotation(w2cc7, -3.926991F, 0F, 0F);
|
||||
side7 = new ModelRenderer(this, 0, 65);
|
||||
side7.addBox(-2.5F, -4F, 3F, 5, 7, 4);
|
||||
side7.setRotationPoint(0F, 21F, 0F);
|
||||
side7.setTextureSize(128, 128);
|
||||
side7.mirror = true;
|
||||
setRotation(side7, 0F, 3.141593F, 0F);
|
||||
side8 = new ModelRenderer(this, 25, 111);
|
||||
side8.addBox(-2.5F, 0F, 3F, 5, 11, 3);
|
||||
side8.setRotationPoint(0F, 13F, 0F);
|
||||
side8.setTextureSize(128, 128);
|
||||
side8.mirror = true;
|
||||
setRotation(side8, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(float f5)
|
||||
{
|
||||
Body.render(f5);
|
||||
pipecc1.render(f5);
|
||||
pipecc3.render(f5);
|
||||
public void render(float f5)
|
||||
{
|
||||
Body.render(f5);
|
||||
pipecc1.render(f5);
|
||||
pipecc3.render(f5);
|
||||
|
||||
joint.render(f5);
|
||||
joint.render(f5);
|
||||
|
||||
wheelBrace.render(f5);
|
||||
piston_top.render(f5);
|
||||
piston.render(f5);
|
||||
wheelBrace2.render(f5);
|
||||
joint2.render(f5);
|
||||
wheelBrace.render(f5);
|
||||
piston_top.render(f5);
|
||||
piston.render(f5);
|
||||
wheelBrace2.render(f5);
|
||||
joint2.render(f5);
|
||||
|
||||
side7.render(f5);
|
||||
side8.render(f5);
|
||||
}
|
||||
side7.render(f5);
|
||||
side8.render(f5);
|
||||
}
|
||||
|
||||
public void renderMotion(float f5, int i)
|
||||
{
|
||||
//wheel 1
|
||||
wheelcenter.render(f5);
|
||||
wheelcenter2.render(f5);
|
||||
wheelcc0.render(f5);
|
||||
wheelcc1.render(f5);
|
||||
wheelcc2.render(f5);
|
||||
wheelcc3.render(f5);
|
||||
wheelcc4.render(f5);
|
||||
wheelcc5.render(f5);
|
||||
wheelcc6.render(f5);
|
||||
wheelcc7.render(f5);
|
||||
// wheel 2
|
||||
w2.render(f5);
|
||||
w22.render(f5);
|
||||
w2cc.render(f5);
|
||||
w2cc1.render(f5);
|
||||
w2cc2.render(f5);
|
||||
w2cc3.render(f5);
|
||||
w2cc4.render(f5);
|
||||
w2cc5.render(f5);
|
||||
w2cc6.render(f5);
|
||||
w2cc7.render(f5);
|
||||
}
|
||||
public void renderMotion(float f5, int i)
|
||||
{
|
||||
//wheel 1
|
||||
wheelcenter.render(f5);
|
||||
wheelcenter2.render(f5);
|
||||
wheelcc0.render(f5);
|
||||
wheelcc1.render(f5);
|
||||
wheelcc2.render(f5);
|
||||
wheelcc3.render(f5);
|
||||
wheelcc4.render(f5);
|
||||
wheelcc5.render(f5);
|
||||
wheelcc6.render(f5);
|
||||
wheelcc7.render(f5);
|
||||
// wheel 2
|
||||
w2.render(f5);
|
||||
w22.render(f5);
|
||||
w2cc.render(f5);
|
||||
w2cc1.render(f5);
|
||||
w2cc2.render(f5);
|
||||
w2cc3.render(f5);
|
||||
w2cc4.render(f5);
|
||||
w2cc5.render(f5);
|
||||
w2cc6.render(f5);
|
||||
w2cc7.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,123 +12,123 @@ import net.minecraft.client.model.ModelRenderer;
|
|||
public class ModelReleaseValve extends ModelBase
|
||||
{
|
||||
|
||||
// fields
|
||||
ModelRenderer ValveStem;
|
||||
ModelRenderer ValveWheelCenter;
|
||||
ModelRenderer ValveRest;
|
||||
ModelRenderer WheelBar3;
|
||||
ModelRenderer WheelBar4;
|
||||
ModelRenderer Wheel;
|
||||
ModelRenderer Wheel2;
|
||||
ModelRenderer Wheel3;
|
||||
ModelRenderer Wheel4;
|
||||
ModelRenderer WheelB;
|
||||
ModelRenderer WheelB2;
|
||||
ModelRenderer WheelB3;
|
||||
ModelRenderer WheelB4;
|
||||
ModelRenderer[] renders;
|
||||
// fields
|
||||
ModelRenderer ValveStem;
|
||||
ModelRenderer ValveWheelCenter;
|
||||
ModelRenderer ValveRest;
|
||||
ModelRenderer WheelBar3;
|
||||
ModelRenderer WheelBar4;
|
||||
ModelRenderer Wheel;
|
||||
ModelRenderer Wheel2;
|
||||
ModelRenderer Wheel3;
|
||||
ModelRenderer Wheel4;
|
||||
ModelRenderer WheelB;
|
||||
ModelRenderer WheelB2;
|
||||
ModelRenderer WheelB3;
|
||||
ModelRenderer WheelB4;
|
||||
ModelRenderer[] renders;
|
||||
|
||||
public ModelReleaseValve()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 32;
|
||||
public ModelReleaseValve()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 32;
|
||||
|
||||
ValveStem = new ModelRenderer(this, 50, 21);
|
||||
ValveStem.addBox(-1F, -6F, -1F, 2, 3, 2);
|
||||
ValveStem.setRotationPoint(0F, 16F, 0F);
|
||||
ValveStem.setTextureSize(128, 32);
|
||||
ValveStem.mirror = true;
|
||||
setRotation(ValveStem, 0F, 0F, 0F);
|
||||
ValveWheelCenter = new ModelRenderer(this, 50, 17);
|
||||
ValveWheelCenter.addBox(-0.5F, -7.5F, -0.5F, 1, 2, 1);
|
||||
ValveWheelCenter.setRotationPoint(0F, 16F, 0F);
|
||||
ValveWheelCenter.setTextureSize(128, 32);
|
||||
ValveWheelCenter.mirror = true;
|
||||
setRotation(ValveWheelCenter, 0F, 0F, 0F);
|
||||
ValveRest = new ModelRenderer(this, 50, 27);
|
||||
ValveRest.addBox(-1.5F, -4F, -1.5F, 3, 1, 3);
|
||||
ValveRest.setRotationPoint(0F, 16F, 0F);
|
||||
ValveRest.setTextureSize(128, 32);
|
||||
ValveRest.mirror = true;
|
||||
setRotation(ValveRest, 0F, 0F, 0F);
|
||||
WheelBar3 = new ModelRenderer(this, 85, 15);
|
||||
WheelBar3.addBox(-3F, -7F, -0.5F, 6, 1, 1);
|
||||
WheelBar3.setRotationPoint(0F, 16F, 0F);
|
||||
WheelBar3.setTextureSize(128, 32);
|
||||
WheelBar3.mirror = true;
|
||||
setRotation(WheelBar3, 0F, 0.7853982F, 0F);
|
||||
WheelBar4 = new ModelRenderer(this, 85, 18);
|
||||
WheelBar4.addBox(-3F, -7F, -0.5F, 6, 1, 1);
|
||||
WheelBar4.setRotationPoint(0F, 16F, 0F);
|
||||
WheelBar4.setTextureSize(128, 32);
|
||||
WheelBar4.mirror = true;
|
||||
setRotation(WheelBar4, 0F, -0.7853982F, 0F);
|
||||
Wheel = new ModelRenderer(this, 50, 13);
|
||||
Wheel.addBox(-1.5F, -7.5F, -3.5F, 3, 1, 1);
|
||||
Wheel.setRotationPoint(0F, 16F, 0F);
|
||||
Wheel.setTextureSize(128, 32);
|
||||
Wheel.mirror = true;
|
||||
setRotation(Wheel, 0F, -0.7853982F, 0F);
|
||||
Wheel2 = new ModelRenderer(this, 50, 13);
|
||||
Wheel2.addBox(-1.5F, -7.5F, -3.5F, 3, 1, 1);
|
||||
Wheel2.setRotationPoint(0F, 16F, 0F);
|
||||
Wheel2.setTextureSize(128, 32);
|
||||
Wheel2.mirror = true;
|
||||
setRotation(Wheel2, 0F, 2.356194F, 0F);
|
||||
Wheel3 = new ModelRenderer(this, 50, 13);
|
||||
Wheel3.addBox(-1.5F, -7.5F, -3.5F, 3, 1, 1);
|
||||
Wheel3.setRotationPoint(0F, 16F, 0F);
|
||||
Wheel3.setTextureSize(128, 32);
|
||||
Wheel3.mirror = true;
|
||||
setRotation(Wheel3, 0F, -2.356194F, 0F);
|
||||
Wheel4 = new ModelRenderer(this, 50, 13);
|
||||
Wheel4.addBox(-1.5F, -7.5F, -3.5F, 3, 1, 1);
|
||||
Wheel4.setRotationPoint(0F, 16F, 0F);
|
||||
Wheel4.setTextureSize(128, 32);
|
||||
Wheel4.mirror = true;
|
||||
setRotation(Wheel4, 0F, 0.7853982F, 0F);
|
||||
WheelB = new ModelRenderer(this, 50, 13);
|
||||
WheelB.addBox(-1.5F, -7.5F, 2.5F, 3, 1, 1);
|
||||
WheelB.setRotationPoint(0F, 16F, 0F);
|
||||
WheelB.setTextureSize(128, 32);
|
||||
WheelB.mirror = true;
|
||||
setRotation(WheelB, 0F, -3.141593F, 0F);
|
||||
WheelB2 = new ModelRenderer(this, 50, 13);
|
||||
WheelB2.addBox(-1.5F, -7.5F, 2.5F, 3, 1, 1);
|
||||
WheelB2.setRotationPoint(0F, 16F, 0F);
|
||||
WheelB2.setTextureSize(128, 32);
|
||||
WheelB2.mirror = true;
|
||||
setRotation(WheelB2, 0F, 0F, 0F);
|
||||
WheelB3 = new ModelRenderer(this, 50, 13);
|
||||
WheelB3.addBox(-1.5F, -7.5F, 2.5F, 3, 1, 1);
|
||||
WheelB3.setRotationPoint(0F, 16F, 0F);
|
||||
WheelB3.setTextureSize(128, 32);
|
||||
WheelB3.mirror = true;
|
||||
setRotation(WheelB3, 0F, 1.570796F, 0F);
|
||||
WheelB4 = new ModelRenderer(this, 50, 13);
|
||||
WheelB4.addBox(-1.5F, -7.5F, 2.5F, 3, 1, 1);
|
||||
WheelB4.setRotationPoint(0F, 16F, 0F);
|
||||
WheelB4.setTextureSize(128, 32);
|
||||
WheelB4.mirror = true;
|
||||
setRotation(WheelB4, 0F, -1.570796F, 0F);
|
||||
renders = new ModelRenderer[] { ValveStem, ValveWheelCenter, ValveRest, WheelBar3, WheelBar4, Wheel, Wheel2, Wheel3, Wheel4, WheelB, WheelB2, WheelB3, WheelB4 };
|
||||
ValveStem = new ModelRenderer(this, 50, 21);
|
||||
ValveStem.addBox(-1F, -6F, -1F, 2, 3, 2);
|
||||
ValveStem.setRotationPoint(0F, 16F, 0F);
|
||||
ValveStem.setTextureSize(128, 32);
|
||||
ValveStem.mirror = true;
|
||||
setRotation(ValveStem, 0F, 0F, 0F);
|
||||
ValveWheelCenter = new ModelRenderer(this, 50, 17);
|
||||
ValveWheelCenter.addBox(-0.5F, -7.5F, -0.5F, 1, 2, 1);
|
||||
ValveWheelCenter.setRotationPoint(0F, 16F, 0F);
|
||||
ValveWheelCenter.setTextureSize(128, 32);
|
||||
ValveWheelCenter.mirror = true;
|
||||
setRotation(ValveWheelCenter, 0F, 0F, 0F);
|
||||
ValveRest = new ModelRenderer(this, 50, 27);
|
||||
ValveRest.addBox(-1.5F, -4F, -1.5F, 3, 1, 3);
|
||||
ValveRest.setRotationPoint(0F, 16F, 0F);
|
||||
ValveRest.setTextureSize(128, 32);
|
||||
ValveRest.mirror = true;
|
||||
setRotation(ValveRest, 0F, 0F, 0F);
|
||||
WheelBar3 = new ModelRenderer(this, 85, 15);
|
||||
WheelBar3.addBox(-3F, -7F, -0.5F, 6, 1, 1);
|
||||
WheelBar3.setRotationPoint(0F, 16F, 0F);
|
||||
WheelBar3.setTextureSize(128, 32);
|
||||
WheelBar3.mirror = true;
|
||||
setRotation(WheelBar3, 0F, 0.7853982F, 0F);
|
||||
WheelBar4 = new ModelRenderer(this, 85, 18);
|
||||
WheelBar4.addBox(-3F, -7F, -0.5F, 6, 1, 1);
|
||||
WheelBar4.setRotationPoint(0F, 16F, 0F);
|
||||
WheelBar4.setTextureSize(128, 32);
|
||||
WheelBar4.mirror = true;
|
||||
setRotation(WheelBar4, 0F, -0.7853982F, 0F);
|
||||
Wheel = new ModelRenderer(this, 50, 13);
|
||||
Wheel.addBox(-1.5F, -7.5F, -3.5F, 3, 1, 1);
|
||||
Wheel.setRotationPoint(0F, 16F, 0F);
|
||||
Wheel.setTextureSize(128, 32);
|
||||
Wheel.mirror = true;
|
||||
setRotation(Wheel, 0F, -0.7853982F, 0F);
|
||||
Wheel2 = new ModelRenderer(this, 50, 13);
|
||||
Wheel2.addBox(-1.5F, -7.5F, -3.5F, 3, 1, 1);
|
||||
Wheel2.setRotationPoint(0F, 16F, 0F);
|
||||
Wheel2.setTextureSize(128, 32);
|
||||
Wheel2.mirror = true;
|
||||
setRotation(Wheel2, 0F, 2.356194F, 0F);
|
||||
Wheel3 = new ModelRenderer(this, 50, 13);
|
||||
Wheel3.addBox(-1.5F, -7.5F, -3.5F, 3, 1, 1);
|
||||
Wheel3.setRotationPoint(0F, 16F, 0F);
|
||||
Wheel3.setTextureSize(128, 32);
|
||||
Wheel3.mirror = true;
|
||||
setRotation(Wheel3, 0F, -2.356194F, 0F);
|
||||
Wheel4 = new ModelRenderer(this, 50, 13);
|
||||
Wheel4.addBox(-1.5F, -7.5F, -3.5F, 3, 1, 1);
|
||||
Wheel4.setRotationPoint(0F, 16F, 0F);
|
||||
Wheel4.setTextureSize(128, 32);
|
||||
Wheel4.mirror = true;
|
||||
setRotation(Wheel4, 0F, 0.7853982F, 0F);
|
||||
WheelB = new ModelRenderer(this, 50, 13);
|
||||
WheelB.addBox(-1.5F, -7.5F, 2.5F, 3, 1, 1);
|
||||
WheelB.setRotationPoint(0F, 16F, 0F);
|
||||
WheelB.setTextureSize(128, 32);
|
||||
WheelB.mirror = true;
|
||||
setRotation(WheelB, 0F, -3.141593F, 0F);
|
||||
WheelB2 = new ModelRenderer(this, 50, 13);
|
||||
WheelB2.addBox(-1.5F, -7.5F, 2.5F, 3, 1, 1);
|
||||
WheelB2.setRotationPoint(0F, 16F, 0F);
|
||||
WheelB2.setTextureSize(128, 32);
|
||||
WheelB2.mirror = true;
|
||||
setRotation(WheelB2, 0F, 0F, 0F);
|
||||
WheelB3 = new ModelRenderer(this, 50, 13);
|
||||
WheelB3.addBox(-1.5F, -7.5F, 2.5F, 3, 1, 1);
|
||||
WheelB3.setRotationPoint(0F, 16F, 0F);
|
||||
WheelB3.setTextureSize(128, 32);
|
||||
WheelB3.mirror = true;
|
||||
setRotation(WheelB3, 0F, 1.570796F, 0F);
|
||||
WheelB4 = new ModelRenderer(this, 50, 13);
|
||||
WheelB4.addBox(-1.5F, -7.5F, 2.5F, 3, 1, 1);
|
||||
WheelB4.setRotationPoint(0F, 16F, 0F);
|
||||
WheelB4.setTextureSize(128, 32);
|
||||
WheelB4.mirror = true;
|
||||
setRotation(WheelB4, 0F, -1.570796F, 0F);
|
||||
renders = new ModelRenderer[] { ValveStem, ValveWheelCenter, ValveRest, WheelBar3, WheelBar4, Wheel, Wheel2, Wheel3, Wheel4, WheelB, WheelB2, WheelB3, WheelB4 };
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void render()
|
||||
{
|
||||
ModelRenderer[] renderSet = renders;
|
||||
for(int i = 0; i < renders.length;i++)
|
||||
{
|
||||
renderSet[i].render(0.0625F);
|
||||
}
|
||||
}
|
||||
public void render()
|
||||
{
|
||||
ModelRenderer[] renderSet = renders;
|
||||
for (int i = 0; i < renders.length; i++)
|
||||
{
|
||||
renderSet[i].render(0.0625F);
|
||||
}
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,101 +11,101 @@ import net.minecraft.client.model.ModelRenderer;
|
|||
|
||||
public class ModelSink extends ModelBase
|
||||
{
|
||||
// fields
|
||||
ModelRenderer Base;
|
||||
ModelRenderer FrontLip;
|
||||
ModelRenderer BottomLip;
|
||||
ModelRenderer RightLip;
|
||||
ModelRenderer LeftLip;
|
||||
ModelRenderer BLip;
|
||||
ModelRenderer Edge;
|
||||
ModelRenderer Edge2;
|
||||
ModelRenderer Water;
|
||||
// fields
|
||||
ModelRenderer Base;
|
||||
ModelRenderer FrontLip;
|
||||
ModelRenderer BottomLip;
|
||||
ModelRenderer RightLip;
|
||||
ModelRenderer LeftLip;
|
||||
ModelRenderer BLip;
|
||||
ModelRenderer Edge;
|
||||
ModelRenderer Edge2;
|
||||
ModelRenderer Water;
|
||||
|
||||
public ModelSink()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
public ModelSink()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
|
||||
Base = new ModelRenderer(this, 0, 0);
|
||||
Base.addBox(-7F, 0F, -7F, 14, 12, 14);
|
||||
Base.setRotationPoint(0F, 12F, 0F);
|
||||
Base.setTextureSize(128, 128);
|
||||
Base.mirror = true;
|
||||
setRotation(Base, 0F, 0F, 0F);
|
||||
FrontLip = new ModelRenderer(this, 10, 62);
|
||||
FrontLip.addBox(-8F, -4F, -8F, 16, 4, 2);
|
||||
FrontLip.setRotationPoint(0F, 12F, 0F);
|
||||
FrontLip.setTextureSize(128, 128);
|
||||
FrontLip.mirror = true;
|
||||
setRotation(FrontLip, 0F, 0F, 0F);
|
||||
BottomLip = new ModelRenderer(this, 5, 37);
|
||||
BottomLip.addBox(-8F, -4F, 4F, 16, 4, 4);
|
||||
BottomLip.setRotationPoint(0F, 12F, 0F);
|
||||
BottomLip.setTextureSize(128, 128);
|
||||
BottomLip.mirror = true;
|
||||
setRotation(BottomLip, 0F, 0F, 0F);
|
||||
RightLip = new ModelRenderer(this, 0, 47);
|
||||
RightLip.addBox(-8F, -4F, -6F, 2, 4, 10);
|
||||
RightLip.setRotationPoint(0F, 12F, 0F);
|
||||
RightLip.setTextureSize(128, 128);
|
||||
RightLip.mirror = true;
|
||||
setRotation(RightLip, 0F, 0F, 0F);
|
||||
LeftLip = new ModelRenderer(this, 25, 47);
|
||||
LeftLip.addBox(6F, -4F, -6F, 2, 4, 10);
|
||||
LeftLip.setRotationPoint(0F, 12F, 0F);
|
||||
LeftLip.setTextureSize(128, 128);
|
||||
LeftLip.mirror = true;
|
||||
setRotation(LeftLip, 0F, 0F, 0F);
|
||||
BLip = new ModelRenderer(this, 9, 32);
|
||||
BLip.addBox(-1F, -1F, 4F, 2, 2, 2);
|
||||
BLip.setRotationPoint(0F, 12F, 0F);
|
||||
BLip.setTextureSize(128, 128);
|
||||
BLip.mirror = true;
|
||||
setRotation(BLip, 0.5061455F, 0F, 0F);
|
||||
Edge = new ModelRenderer(this, 5, 64);
|
||||
Edge.addBox(0F, 0F, 0F, 1, 12, 1);
|
||||
Edge.setRotationPoint(7F, 12F, 7F);
|
||||
Edge.setTextureSize(128, 128);
|
||||
Edge.mirror = true;
|
||||
setRotation(Edge, 0F, 0F, 0F);
|
||||
Edge2 = new ModelRenderer(this, 0, 64);
|
||||
Edge2.addBox(0F, 0F, 0F, 1, 12, 1);
|
||||
Edge2.setRotationPoint(-8F, 12F, 7F);
|
||||
Edge2.setTextureSize(128, 128);
|
||||
Edge2.mirror = true;
|
||||
setRotation(Edge2, 0F, 0F, 0F);
|
||||
Water = new ModelRenderer(this, 0, 0);
|
||||
Water.addBox(-6F, 0F, -6F, 12, 0, 10);
|
||||
Water.setRotationPoint(0F, 12F, 0F);
|
||||
Water.setTextureSize(128, 128);
|
||||
Water.mirror = true;
|
||||
setRotation(Water, 0F, 0F, 0F);
|
||||
}
|
||||
Base = new ModelRenderer(this, 0, 0);
|
||||
Base.addBox(-7F, 0F, -7F, 14, 12, 14);
|
||||
Base.setRotationPoint(0F, 12F, 0F);
|
||||
Base.setTextureSize(128, 128);
|
||||
Base.mirror = true;
|
||||
setRotation(Base, 0F, 0F, 0F);
|
||||
FrontLip = new ModelRenderer(this, 10, 62);
|
||||
FrontLip.addBox(-8F, -4F, -8F, 16, 4, 2);
|
||||
FrontLip.setRotationPoint(0F, 12F, 0F);
|
||||
FrontLip.setTextureSize(128, 128);
|
||||
FrontLip.mirror = true;
|
||||
setRotation(FrontLip, 0F, 0F, 0F);
|
||||
BottomLip = new ModelRenderer(this, 5, 37);
|
||||
BottomLip.addBox(-8F, -4F, 4F, 16, 4, 4);
|
||||
BottomLip.setRotationPoint(0F, 12F, 0F);
|
||||
BottomLip.setTextureSize(128, 128);
|
||||
BottomLip.mirror = true;
|
||||
setRotation(BottomLip, 0F, 0F, 0F);
|
||||
RightLip = new ModelRenderer(this, 0, 47);
|
||||
RightLip.addBox(-8F, -4F, -6F, 2, 4, 10);
|
||||
RightLip.setRotationPoint(0F, 12F, 0F);
|
||||
RightLip.setTextureSize(128, 128);
|
||||
RightLip.mirror = true;
|
||||
setRotation(RightLip, 0F, 0F, 0F);
|
||||
LeftLip = new ModelRenderer(this, 25, 47);
|
||||
LeftLip.addBox(6F, -4F, -6F, 2, 4, 10);
|
||||
LeftLip.setRotationPoint(0F, 12F, 0F);
|
||||
LeftLip.setTextureSize(128, 128);
|
||||
LeftLip.mirror = true;
|
||||
setRotation(LeftLip, 0F, 0F, 0F);
|
||||
BLip = new ModelRenderer(this, 9, 32);
|
||||
BLip.addBox(-1F, -1F, 4F, 2, 2, 2);
|
||||
BLip.setRotationPoint(0F, 12F, 0F);
|
||||
BLip.setTextureSize(128, 128);
|
||||
BLip.mirror = true;
|
||||
setRotation(BLip, 0.5061455F, 0F, 0F);
|
||||
Edge = new ModelRenderer(this, 5, 64);
|
||||
Edge.addBox(0F, 0F, 0F, 1, 12, 1);
|
||||
Edge.setRotationPoint(7F, 12F, 7F);
|
||||
Edge.setTextureSize(128, 128);
|
||||
Edge.mirror = true;
|
||||
setRotation(Edge, 0F, 0F, 0F);
|
||||
Edge2 = new ModelRenderer(this, 0, 64);
|
||||
Edge2.addBox(0F, 0F, 0F, 1, 12, 1);
|
||||
Edge2.setRotationPoint(-8F, 12F, 7F);
|
||||
Edge2.setTextureSize(128, 128);
|
||||
Edge2.mirror = true;
|
||||
setRotation(Edge2, 0F, 0F, 0F);
|
||||
Water = new ModelRenderer(this, 0, 0);
|
||||
Water.addBox(-6F, 0F, -6F, 12, 0, 10);
|
||||
Water.setRotationPoint(0F, 12F, 0F);
|
||||
Water.setTextureSize(128, 128);
|
||||
Water.mirror = true;
|
||||
setRotation(Water, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(float f5)
|
||||
{
|
||||
Base.render(f5);
|
||||
FrontLip.render(f5);
|
||||
BottomLip.render(f5);
|
||||
RightLip.render(f5);
|
||||
LeftLip.render(f5);
|
||||
BLip.render(f5);
|
||||
Edge.render(f5);
|
||||
Edge2.render(f5);
|
||||
public void render(float f5)
|
||||
{
|
||||
Base.render(f5);
|
||||
FrontLip.render(f5);
|
||||
BottomLip.render(f5);
|
||||
RightLip.render(f5);
|
||||
LeftLip.render(f5);
|
||||
BLip.render(f5);
|
||||
Edge.render(f5);
|
||||
Edge2.render(f5);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void renderLiquid(float f5,float level)
|
||||
{
|
||||
Water.setRotationPoint(0F, 12F - level, 0F);
|
||||
Water.render(f5);
|
||||
}
|
||||
public void renderLiquid(float f5, float level)
|
||||
{
|
||||
Water.setRotationPoint(0F, 12F - level, 0F);
|
||||
Water.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,17 +121,14 @@ public class ModelTankSide extends ModelBase
|
|||
setRotation(rightTopSide, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param size - render size normal is 0.0625F
|
||||
/** @param size - render size normal is 0.0625F
|
||||
* @param left - is the an instance of this to the left
|
||||
* @param right - "" to the right
|
||||
* @param bot - "" to the bot
|
||||
* @param top - "" to the top
|
||||
*
|
||||
* Not this only renders one side of the block. You will need to rotate it to face another
|
||||
* direction then render it. If rotating up or down you will need to translate it a bit
|
||||
*/
|
||||
* direction then render it. If rotating up or down you will need to translate it a bit */
|
||||
public void render(float size, boolean left, boolean right, boolean bot, boolean top)
|
||||
{
|
||||
if (!top)
|
||||
|
|
|
@ -9,8 +9,6 @@ import dark.fluid.client.model.ModelConstructionPump;
|
|||
import dark.fluid.common.FluidMech;
|
||||
import dark.fluid.common.pump.TileEntityConstructionPump;
|
||||
|
||||
|
||||
|
||||
public class RenderConstructionPump extends TileEntitySpecialRenderer
|
||||
{
|
||||
int type = 0;
|
||||
|
@ -45,9 +43,9 @@ public class RenderConstructionPump extends TileEntitySpecialRenderer
|
|||
break;
|
||||
}
|
||||
model.render(0.0625F);
|
||||
if(tileEntity instanceof TileEntityConstructionPump)
|
||||
if (tileEntity instanceof TileEntityConstructionPump)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
model.renderMotor(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
|
|
|
@ -9,50 +9,49 @@ import dark.fluid.client.model.ModelPump;
|
|||
import dark.fluid.common.FluidMech;
|
||||
import dark.fluid.common.pump.TileEntityStarterPump;
|
||||
|
||||
|
||||
public class RenderPump extends TileEntitySpecialRenderer
|
||||
{
|
||||
int type = 0;
|
||||
private ModelPump model;
|
||||
int type = 0;
|
||||
private ModelPump model;
|
||||
|
||||
public RenderPump()
|
||||
{
|
||||
model = new ModelPump();
|
||||
}
|
||||
public RenderPump()
|
||||
{
|
||||
model = new ModelPump();
|
||||
}
|
||||
|
||||
public void renderAModelAt(TileEntityStarterPump te, double d, double d1, double d2, float f)
|
||||
{
|
||||
int meta = te.worldObj.getBlockMetadata(te.xCoord, te.yCoord, te.zCoord);
|
||||
public void renderAModelAt(TileEntityStarterPump te, double d, double d1, double d2, float f)
|
||||
{
|
||||
int meta = te.worldObj.getBlockMetadata(te.xCoord, te.yCoord, te.zCoord);
|
||||
|
||||
bindTextureByName(FluidMech.MODEL_TEXTURE_DIRECTORY + "pumps/WaterPump.png");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
GL11.glScalef(1.0F, -1F, -1F);
|
||||
switch (meta)
|
||||
{
|
||||
case 2:
|
||||
GL11.glRotatef(0f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 3:
|
||||
GL11.glRotatef(90f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 0:
|
||||
GL11.glRotatef(180f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 1:
|
||||
GL11.glRotatef(270f, 0f, 1f, 0f);
|
||||
break;
|
||||
}
|
||||
model.render(0.0625F);
|
||||
model.renderMotion(0.0625F, te.pos);
|
||||
GL11.glPopMatrix();
|
||||
bindTextureByName(FluidMech.MODEL_TEXTURE_DIRECTORY + "pumps/WaterPump.png");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
GL11.glScalef(1.0F, -1F, -1F);
|
||||
switch (meta)
|
||||
{
|
||||
case 2:
|
||||
GL11.glRotatef(0f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 3:
|
||||
GL11.glRotatef(90f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 0:
|
||||
GL11.glRotatef(180f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 1:
|
||||
GL11.glRotatef(270f, 0f, 1f, 0f);
|
||||
break;
|
||||
}
|
||||
model.render(0.0625F);
|
||||
model.renderMotion(0.0625F, te.pos);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double var2, double var4, double var6, float var8)
|
||||
{
|
||||
this.renderAModelAt((TileEntityStarterPump) tileEntity, var2, var4, var6, var8);
|
||||
}
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double var2, double var4, double var6, float var8)
|
||||
{
|
||||
this.renderAModelAt((TileEntityStarterPump) tileEntity, var2, var4, var6, var8);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,18 +1,18 @@
|
|||
package dark.fluid.client.render;
|
||||
|
||||
|
||||
public class RenderRotation
|
||||
{
|
||||
float angle;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
public RenderRotation(float angle, float x, float y, float z)
|
||||
{
|
||||
this.angle = angle;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
|
||||
}
|
||||
float angle;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
|
||||
public RenderRotation(float angle, float x, float y, float z)
|
||||
{
|
||||
this.angle = angle;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package dark.fluid.client.render;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -11,63 +10,69 @@ import dark.fluid.client.model.ModelSink;
|
|||
import dark.fluid.common.FluidMech;
|
||||
import dark.fluid.common.machines.TileEntitySink;
|
||||
|
||||
|
||||
public class RenderSink extends TileEntitySpecialRenderer
|
||||
{
|
||||
int type = 0;
|
||||
private ModelSink model;
|
||||
int type = 0;
|
||||
private ModelSink model;
|
||||
|
||||
public RenderSink()
|
||||
{
|
||||
model = new ModelSink();
|
||||
}
|
||||
public RenderSink()
|
||||
{
|
||||
model = new ModelSink();
|
||||
}
|
||||
|
||||
public void renderWater(LiquidStack stack)
|
||||
{
|
||||
if (stack == null || stack.amount <= 1) { return; }
|
||||
bindTextureByName(Block.waterStill.getBlockTextureFromSide(0)+ "blue.png");
|
||||
float p = 0;
|
||||
if(stack.amount > 0)p = 0.5f;
|
||||
if(stack.amount > 500)p=1.5f;
|
||||
if(stack.amount > 1000)p=2.5f;
|
||||
if(stack.amount > 1500)p=3.5f;
|
||||
|
||||
model.renderLiquid(0.0625F, p);
|
||||
}
|
||||
public void renderWater(LiquidStack stack)
|
||||
{
|
||||
if (stack == null || stack.amount <= 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bindTextureByName(Block.waterStill.getBlockTextureFromSide(0) + "blue.png");
|
||||
float p = 0;
|
||||
if (stack.amount > 0)
|
||||
p = 0.5f;
|
||||
if (stack.amount > 500)
|
||||
p = 1.5f;
|
||||
if (stack.amount > 1000)
|
||||
p = 2.5f;
|
||||
if (stack.amount > 1500)
|
||||
p = 3.5f;
|
||||
|
||||
public void renderAModelAt(TileEntitySink te, double d, double d1, double d2, float f)
|
||||
{
|
||||
int meta = te.worldObj.getBlockMetadata(te.xCoord, te.yCoord, te.zCoord);
|
||||
model.renderLiquid(0.0625F, p);
|
||||
}
|
||||
|
||||
bindTextureByName(FluidMech.MODEL_TEXTURE_DIRECTORY + "Sink.png");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
GL11.glScalef(1.0F, -1F, -1F);
|
||||
switch (meta)
|
||||
{
|
||||
case 3:
|
||||
GL11.glRotatef(90f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 0:
|
||||
GL11.glRotatef(180f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 1:
|
||||
GL11.glRotatef(270f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 2:
|
||||
GL11.glRotatef(0f, 0f, 1f, 0f);
|
||||
break;
|
||||
}
|
||||
model.render(0.0625F);
|
||||
renderWater(te.getStoredLiquid());
|
||||
GL11.glPopMatrix();
|
||||
public void renderAModelAt(TileEntitySink te, double d, double d1, double d2, float f)
|
||||
{
|
||||
int meta = te.worldObj.getBlockMetadata(te.xCoord, te.yCoord, te.zCoord);
|
||||
|
||||
}
|
||||
bindTextureByName(FluidMech.MODEL_TEXTURE_DIRECTORY + "Sink.png");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
GL11.glScalef(1.0F, -1F, -1F);
|
||||
switch (meta)
|
||||
{
|
||||
case 3:
|
||||
GL11.glRotatef(90f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 0:
|
||||
GL11.glRotatef(180f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 1:
|
||||
GL11.glRotatef(270f, 0f, 1f, 0f);
|
||||
break;
|
||||
case 2:
|
||||
GL11.glRotatef(0f, 0f, 1f, 0f);
|
||||
break;
|
||||
}
|
||||
model.render(0.0625F);
|
||||
renderWater(te.getStoredLiquid());
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double var2, double var4, double var6, float var8)
|
||||
{
|
||||
this.renderAModelAt((TileEntitySink) tileEntity, var2, var4, var6, var8);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double var2, double var4, double var6, float var8)
|
||||
{
|
||||
this.renderAModelAt((TileEntitySink) tileEntity, var2, var4, var6, var8);
|
||||
}
|
||||
|
||||
}
|
|
@ -3,12 +3,10 @@ package dark.fluid.client.render;
|
|||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import dark.core.api.ColorCode;
|
||||
import dark.core.hydraulic.helpers.LiquidRenderer;
|
||||
import dark.fluid.client.model.ModelTankSide;
|
||||
import dark.fluid.common.machines.TileEntityTank;
|
||||
|
||||
|
|
|
@ -4,17 +4,13 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import universalelectricity.core.vector.Vector3;
|
||||
import dark.fluid.common.pipes.TileEntityPipe;
|
||||
|
||||
/**
|
||||
* Class for TileEntity Renders that extend the pipe class to use instead of extending
|
||||
/** Class for TileEntity Renders that extend the pipe class to use instead of extending
|
||||
* TileEntitySpecialRender
|
||||
*
|
||||
* @author Rseifert
|
||||
*
|
||||
*/
|
||||
* @author Rseifert */
|
||||
public interface IPipeExtentionRender
|
||||
{
|
||||
/**
|
||||
* Renders the pipe extension just like a normal tileEntity render however this is called and
|
||||
/** Renders the pipe extension just like a normal tileEntity render however this is called and
|
||||
* process threw the RenderPipe.class so you don't need to do all the GL11 calls for scaling,
|
||||
* translation, etc
|
||||
*
|
||||
|
@ -22,7 +18,6 @@ public interface IPipeExtentionRender
|
|||
* @param pipe - TileEntity this extension is attached too
|
||||
* @param location - position too be rendered from the players plane
|
||||
* @param size - This should be the size of the render, correct me if wrong
|
||||
* @param facingDirection - Facing direction of the extension in relation to its pipe frame
|
||||
*/
|
||||
* @param facingDirection - Facing direction of the extension in relation to its pipe frame */
|
||||
public void renderAModelAt(RenderPipe renderPipe, TileEntityPipe pipe, Vector3 location, float size, ForgeDirection facingDirection);
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ public class RenderPipeWindow implements IPipeExtentionRender
|
|||
@Override
|
||||
public void renderAModelAt(RenderPipe renderPipe, TileEntityPipe pipe, Vector3 location, float size, ForgeDirection facingDirection)
|
||||
{
|
||||
renderPipe.bindTextureForPipe(RenderPipe.getPipeTexture(0,false));
|
||||
renderPipe.bindTextureForPipe(RenderPipe.getPipeTexture(0, false));
|
||||
this.render(facingDirection.ordinal());
|
||||
System.out.println("Rendered Window Pipe");
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
|
||||
|
@ -36,10 +34,8 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
|||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import dark.core.DarkMain;
|
||||
import dark.core.api.ColorCode;
|
||||
import dark.core.hydraulic.helpers.FluidRestrictionHandler;
|
||||
import dark.fluid.common.fluids.BlockWasteLiquid;
|
||||
import dark.fluid.common.item.ItemParts;
|
||||
import dark.fluid.common.item.ItemParts.Parts;
|
||||
import dark.fluid.common.item.ItemTools;
|
||||
|
@ -65,8 +61,6 @@ import dark.fluid.common.pump.TileEntityDrain;
|
|||
import dark.fluid.common.pump.TileEntityStarterPump;
|
||||
import dark.mech.common.machines.BlockGenerator;
|
||||
import dark.mech.common.machines.BlockRod;
|
||||
import dark.mech.common.machines.TileEntityGenerator;
|
||||
import dark.mech.common.machines.TileEntityRod;
|
||||
|
||||
@ModstatInfo(prefix = "fluidmech")
|
||||
@Mod(modid = FluidMech.MOD_ID, name = FluidMech.MOD_NAME, version = FluidMech.VERSION, dependencies = "after:BasicComponents", useMetadata = true)
|
||||
|
|
|
@ -6,11 +6,9 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import dark.fluid.common.TabFluidMech;
|
||||
|
||||
/**
|
||||
* A metadata item containing parts of various machines in Liquid Mechanics Mod.
|
||||
/** A metadata item containing parts of various machines in Liquid Mechanics Mod.
|
||||
*
|
||||
* @author Rs
|
||||
*/
|
||||
* @author Rs */
|
||||
public class ItemParts extends ItemBasic
|
||||
{
|
||||
public enum Parts
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package dark.fluid.common.item;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -32,9 +31,9 @@ public class ItemTools extends ItemBasic
|
|||
int meta = itemStack.getItemDamage();
|
||||
if (meta == 0)
|
||||
{
|
||||
return "item."+"PipeGauge";
|
||||
return "item." + "PipeGauge";
|
||||
}
|
||||
return "item."+this.getUnlocalizedName() + "." + meta;
|
||||
return "item." + this.getUnlocalizedName() + "." + meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,20 +7,20 @@ import net.minecraft.item.ItemStack;
|
|||
public class ItemBlockReleaseValve extends ItemBlock
|
||||
{
|
||||
|
||||
public ItemBlockReleaseValve(int id)
|
||||
{
|
||||
super(id);
|
||||
this.setMaxDamage(0);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
public ItemBlockReleaseValve(int id)
|
||||
{
|
||||
super(id);
|
||||
this.setMaxDamage(0);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage)
|
||||
{
|
||||
return damage;
|
||||
}
|
||||
@Override
|
||||
public int getMetadata(int damage)
|
||||
{
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
return Block.blocksList[this.getBlockID()].getUnlocalizedName() + "." + itemStack.getItemDamage();
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package dark.fluid.common.machines;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -8,14 +7,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import dark.core.api.ColorCode;
|
||||
import dark.core.api.IColorCoded;
|
||||
import dark.core.api.IToolReadOut;
|
||||
import dark.core.api.ITileConnector;
|
||||
import dark.core.api.IToolReadOut.EnumTools;
|
||||
import dark.core.api.IToolReadOut;
|
||||
import dark.core.network.fluid.NetworkPipes;
|
||||
import dark.fluid.api.INetworkPipe;
|
||||
import dark.fluid.common.prefab.TileEntityFluidDevice;
|
||||
|
@ -70,7 +65,7 @@ public class TileEntityReleaseValve extends TileEntityFluidDevice implements ITi
|
|||
INetworkPipe inputPipe = this.findValidPipe(stack);
|
||||
if (inputPipe != null)
|
||||
{
|
||||
int ammountFilled = ((NetworkPipes)inputPipe.getTileNetwork()).addFluidToNetwork((TileEntity) drainedTank, stack, true);
|
||||
int ammountFilled = ((NetworkPipes) inputPipe.getTileNetwork()).addFluidToNetwork((TileEntity) drainedTank, stack, true);
|
||||
drainedTank.drain(ForgeDirection.UNKNOWN, ammountFilled, true);
|
||||
}
|
||||
}
|
||||
|
@ -111,11 +106,9 @@ public class TileEntityReleaseValve extends TileEntityFluidDevice implements ITi
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* if any of allowed list is true
|
||||
/** if any of allowed list is true
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
* @return true */
|
||||
public boolean isRestricted()
|
||||
{
|
||||
for (int i = 0; i < this.allowed.length; i++)
|
||||
|
@ -128,10 +121,8 @@ public class TileEntityReleaseValve extends TileEntityFluidDevice implements ITi
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Collects info about the surrounding 6 tiles and orders them into drain-able(ITankContainer)
|
||||
* and fill-able(TileEntityPipes) instances
|
||||
*/
|
||||
/** Collects info about the surrounding 6 tiles and orders them into drain-able(ITankContainer)
|
||||
* and fill-able(TileEntityPipes) instances */
|
||||
public void validateNBuildList()
|
||||
{
|
||||
// cleanup
|
||||
|
|
|
@ -4,9 +4,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import universalelectricity.prefab.network.IPacketReceiver;
|
||||
import universalelectricity.prefab.network.PacketManager;
|
||||
|
||||
|
@ -87,5 +84,4 @@ public class TileEntitySink extends TileEntityFluidStorage implements IPacketRec
|
|||
return ColorCode.BLUE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -12,11 +12,6 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.tileentity.TileEntityComparator;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.liquids.LiquidTank;
|
||||
|
||||
import org.bouncycastle.util.Arrays;
|
||||
|
||||
|
@ -212,7 +207,7 @@ public class TileEntityTank extends TileEntityFluidDevice implements ITankContai
|
|||
connectedBlocks.add(tileEntity);
|
||||
}
|
||||
}
|
||||
if(tileEntity instanceof TileEntityComparator)
|
||||
if (tileEntity instanceof TileEntityComparator)
|
||||
{
|
||||
this.worldObj.markBlockForUpdate(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
|
||||
}
|
||||
|
|
|
@ -10,14 +10,15 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
import universalelectricity.prefab.block.BlockAdvanced;
|
||||
import dark.core.hydraulic.helpers.FluidRestrictionHandler;
|
||||
import dark.fluid.api.INetworkPipe;
|
||||
import dark.fluid.common.FluidMech;
|
||||
import dark.fluid.common.TabFluidMech;
|
||||
import dark.library.machine.BlockMachine;
|
||||
|
||||
public class BlockPipe extends BlockAdvanced
|
||||
public class BlockPipe extends BlockMachine
|
||||
{
|
||||
public BlockPipe(int id)
|
||||
{
|
||||
|
@ -115,7 +116,7 @@ public class BlockPipe extends BlockAdvanced
|
|||
TileEntity entity = world.getBlockTileEntity(x, y, z);
|
||||
if (entity instanceof TileEntityPipe)
|
||||
{
|
||||
ILiquidTank tank = ((TileEntityPipe) entity).getTank();
|
||||
IFluidTank tank = ((TileEntityPipe) entity).getTank();
|
||||
if (tank != null && tank.getLiquid() != null && tank.getLiquid().amount > 0)
|
||||
{
|
||||
if (tank.getLiquid().itemID == Block.waterStill.blockID)
|
||||
|
|
|
@ -23,8 +23,8 @@ public class ItemBlockPipe extends ItemBlock
|
|||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
if(itemStack.itemID == FluidMech.blockPipe.blockID)
|
||||
{
|
||||
if (itemStack.itemID == FluidMech.blockPipe.blockID)
|
||||
{
|
||||
return "tile.rpipe." + itemStack.getItemDamage();
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ package dark.fluid.common.pipes;
|
|||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.core.vector.VectorHelper;
|
||||
import dark.core.api.ColorCode;
|
||||
|
|
|
@ -13,11 +13,12 @@ import net.minecraft.network.packet.Packet250CustomPayload;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.liquids.LiquidTank;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
import org.bouncycastle.util.Arrays;
|
||||
|
||||
|
@ -33,9 +34,8 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import dark.core.api.ColorCode;
|
||||
import dark.core.api.IColorCoded;
|
||||
import dark.core.api.IToolReadOut;
|
||||
import dark.core.api.ITileConnector;
|
||||
import dark.core.api.IToolReadOut.EnumTools;
|
||||
import dark.core.api.IToolReadOut;
|
||||
import dark.core.hydraulic.helpers.FluidHelper;
|
||||
import dark.core.hydraulic.helpers.FluidRestrictionHandler;
|
||||
import dark.core.network.fluid.NetworkPipes;
|
||||
|
@ -44,11 +44,11 @@ import dark.fluid.api.INetworkPipe;
|
|||
import dark.fluid.common.FluidMech;
|
||||
import dark.fluid.common.pipes.addon.IPipeExtention;
|
||||
|
||||
public class TileEntityPipe extends TileEntityAdvanced implements ITankContainer, IToolReadOut, IColorCoded, INetworkPipe, IPacketReceiver
|
||||
public class TileEntityPipe extends TileEntityAdvanced implements IFluidHandler, IToolReadOut, IColorCoded, INetworkPipe, IPacketReceiver
|
||||
{
|
||||
|
||||
/* TANK TO FAKE OTHER TILES INTO BELIVING THIS HAS AN INTERNAL STORAGE */
|
||||
protected LiquidTank fakeTank = new LiquidTank(LiquidContainerRegistry.BUCKET_VOLUME);
|
||||
protected FluidTank fakeTank = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME);
|
||||
/* CURRENTLY CONNECTED TILE ENTITIES TO THIS */
|
||||
private List<TileEntity> connectedBlocks = new ArrayList<TileEntity>();
|
||||
public boolean[] renderConnection = new boolean[6];
|
||||
|
@ -202,10 +202,21 @@ public class TileEntityPipe extends TileEntityAdvanced implements ITankContainer
|
|||
public void readFromNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.readFromNBT(nbt);
|
||||
LiquidStack liquid = LiquidStack.loadLiquidStackFromNBT(nbt.getCompoundTag("stored"));
|
||||
FluidStack liquid = FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag("FluidTank"));
|
||||
if (nbt.hasKey("stored"))
|
||||
{
|
||||
NBTTagCompound tag = nbt.getCompoundTag("stored");
|
||||
String name = tag.getString("LiquidName");
|
||||
int amount = nbt.getInteger("Amount");
|
||||
Fluid fluid = FluidRegistry.getFluid(name);
|
||||
if (fluid != null)
|
||||
{
|
||||
liquid = new FluidStack(fluid, amount);
|
||||
}
|
||||
}
|
||||
if (liquid != null)
|
||||
{
|
||||
this.fakeTank.setLiquid(liquid);
|
||||
this.fakeTank.setFluid(liquid);
|
||||
}
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
|
@ -221,9 +232,9 @@ public class TileEntityPipe extends TileEntityAdvanced implements ITankContainer
|
|||
public void writeToNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.writeToNBT(nbt);
|
||||
if (this.fakeTank.containsValidLiquid())
|
||||
if (this.fakeTank != null)
|
||||
{
|
||||
nbt.setTag("stored", this.fakeTank.getLiquid().writeToNBT(new NBTTagCompound()));
|
||||
nbt.setTag("FluidTank", this.fakeTank.getFluid().writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
|
@ -384,9 +395,9 @@ public class TileEntityPipe extends TileEntityAdvanced implements ITankContainer
|
|||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, LiquidStack resource, boolean doFill)
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill)
|
||||
{
|
||||
if (resource == null || !FluidRestrictionHandler.isValidLiquid(this.getColor(), resource))
|
||||
if (resource == null || !FluidRestrictionHandler.isValidLiquid(this.getColor(), resource.getFluid()))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -394,16 +405,6 @@ public class TileEntityPipe extends TileEntityAdvanced implements ITankContainer
|
|||
return ((NetworkPipes) this.getTileNetwork()).addFluidToNetwork(tile, resource, doFill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(int tankIndex, LiquidStack resource, boolean doFill)
|
||||
{
|
||||
if (tankIndex != 0 || resource == null || !FluidRestrictionHandler.isValidLiquid(this.getColor(), resource))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return ((NetworkPipes) this.getTileNetwork()).addFluidToNetwork(this, resource, doFill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LiquidStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
|
||||
{
|
||||
|
@ -489,7 +490,7 @@ public class TileEntityPipe extends TileEntityAdvanced implements ITankContainer
|
|||
boolean[] previousConnections = this.renderConnection.clone();
|
||||
this.connectedBlocks.clear();
|
||||
|
||||
for (ForgeDirection dir: ForgeDirection.VALID_DIRECTIONS)
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity ent = new Vector3(this).modifyPositionFromSide(dir).getTileEntity(this.worldObj);
|
||||
this.renderConnection[dir.ordinal()] = this.validateConnectionSide(ent, dir);
|
||||
|
|
|
@ -13,29 +13,22 @@ public interface IPipeExtention extends IPacketReceiver
|
|||
|
||||
public void setPipe(TileEntityPipe pipe);
|
||||
|
||||
/**
|
||||
* how many ticks before next update
|
||||
*/
|
||||
/** how many ticks before next update */
|
||||
public int updateTick();
|
||||
|
||||
/**
|
||||
* if this sub tile needs a packet update
|
||||
* @param
|
||||
*/
|
||||
/** if this sub tile needs a packet update
|
||||
*
|
||||
* @param */
|
||||
public boolean shouldSendPacket(boolean server);
|
||||
|
||||
/**
|
||||
* data that will be sent to this extension
|
||||
*/
|
||||
/** data that will be sent to this extension */
|
||||
public NBTTagCompound getExtentionPacketData(boolean server);
|
||||
|
||||
/**
|
||||
* render class to be used to render this pipe extension of the face of the main pipe
|
||||
*/
|
||||
/** render class to be used to render this pipe extension of the face of the main pipe */
|
||||
public Class<?> getExtentionRenderClass();
|
||||
|
||||
|
||||
public void setDirection(ForgeDirection dir);
|
||||
|
||||
|
||||
public ForgeDirection getDirection();
|
||||
|
||||
}
|
||||
|
|
|
@ -11,13 +11,10 @@ import com.google.common.io.ByteArrayDataInput;
|
|||
|
||||
import dark.fluid.common.pipes.TileEntityPipe;
|
||||
|
||||
/**
|
||||
* Pipe Extension for the TileEntityPipe.class is a sub TileEntity and is not loaded the same way as
|
||||
/** Pipe Extension for the TileEntityPipe.class is a sub TileEntity and is not loaded the same way as
|
||||
* a normal TileEntity
|
||||
*
|
||||
* @author Rseifert
|
||||
*
|
||||
*/
|
||||
* @author Rseifert */
|
||||
public abstract class TileEntityPipeExtention extends TileEntityAdvanced implements IPipeExtention, IPacketReceiver
|
||||
{
|
||||
|
||||
|
|
|
@ -4,11 +4,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import dark.core.network.fluid.NetworkPipes;
|
||||
import dark.fluid.client.render.pipe.RenderPipeWindow;
|
||||
import dark.fluid.common.pipes.TileEntityPipe;
|
||||
|
||||
|
@ -18,8 +16,6 @@ public class TileEntityPipeWindow extends TileEntityPipeExtention
|
|||
private TileEntityPipe pipe = null;
|
||||
private boolean shouldUpdate = false;
|
||||
|
||||
LiquidStack stack = new LiquidStack(0, 0, 0);
|
||||
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
|
@ -30,8 +26,6 @@ public class TileEntityPipeWindow extends TileEntityPipeExtention
|
|||
{
|
||||
if (pipe != null)
|
||||
{
|
||||
stack = ((NetworkPipes) pipe.getTileNetwork()).combinedStorage().getLiquid();
|
||||
worldObj.setBlockMetadataWithNotify(xCoord, yCoord + 1, yCoord, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,33 +1,23 @@
|
|||
package dark.fluid.common.pipes.tele;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import dark.fluid.api.INetworkPipe;
|
||||
|
||||
/**
|
||||
* Used by IFluidNetworkPart to signal this block is remotely connected to another network. It will
|
||||
* cause that network to seak out all other connected network and try to merge them
|
||||
*
|
||||
*/
|
||||
/** Used by IFluidNetworkPart to signal this block is remotely connected to another network. It will
|
||||
* cause that network to seak out all other connected network and try to merge them */
|
||||
public interface INetworkConnector extends INetworkPipe
|
||||
{
|
||||
/**
|
||||
* gets the pipes frequency
|
||||
*/
|
||||
/** gets the pipes frequency */
|
||||
public int getFrequency();
|
||||
|
||||
public void setFrequency(int id);
|
||||
|
||||
/**
|
||||
* gets the pipes owner
|
||||
*/
|
||||
/** gets the pipes owner */
|
||||
public String getOwner();
|
||||
|
||||
public void setOwner(String username);
|
||||
|
||||
/**
|
||||
* gets a list off all INetworkConnector this pipe shares frequency and owner with
|
||||
*/
|
||||
/** gets a list off all INetworkConnector this pipe shares frequency and owner with */
|
||||
public List<INetworkConnector> getConnectedParts();
|
||||
}
|
||||
|
|
|
@ -2,13 +2,9 @@ package dark.fluid.common.prefab;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import universalelectricity.prefab.tile.TileEntityAdvanced;
|
||||
import dark.core.api.IToolReadOut;
|
||||
import dark.core.api.ITileConnector;
|
||||
import dark.core.api.IToolReadOut;
|
||||
import dark.core.network.fluid.HydraulicNetworkHelper;
|
||||
|
||||
public abstract class TileEntityFluidDevice extends TileEntityAdvanced implements IToolReadOut, ITileConnector
|
||||
|
@ -21,22 +17,4 @@ public abstract class TileEntityFluidDevice extends TileEntityAdvanced implement
|
|||
super.invalidate();
|
||||
HydraulicNetworkHelper.invalidate(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills an ITankContainer in the direction
|
||||
*
|
||||
* @param stack - LiquidStack that will be inputed in the tile
|
||||
* @param side - direction to fill in
|
||||
* @return the ammount filled
|
||||
*/
|
||||
public int fillSide(LiquidStack stack, ForgeDirection side, boolean doFill)
|
||||
{
|
||||
TileEntity tileEntity = worldObj.getBlockTileEntity(xCoord + side.offsetX, yCoord + side.offsetY, zCoord + side.offsetZ);
|
||||
|
||||
if (stack != null && stack.amount > 0 && tileEntity instanceof ITankContainer)
|
||||
{
|
||||
return ((ITankContainer) tileEntity).fill(side.getOpposite(), stack, doFill);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,69 +4,53 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.liquids.LiquidTank;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import dark.core.api.IColorCoded;
|
||||
import dark.core.api.IToolReadOut.EnumTools;
|
||||
import dark.core.hydraulic.helpers.FluidHelper;
|
||||
import dark.core.hydraulic.helpers.FluidRestrictionHandler;
|
||||
|
||||
public abstract class TileEntityFluidStorage extends TileEntityFluidDevice implements ITankContainer, IColorCoded
|
||||
public abstract class TileEntityFluidStorage extends TileEntityFluidDevice implements IFluidHandler, IColorCoded
|
||||
{
|
||||
/* INTERNAL TANK */
|
||||
public LiquidTank tank = new LiquidTank(this.getTankSize());
|
||||
public FluidTank tank = new FluidTank(this.getTankSize());
|
||||
|
||||
/**
|
||||
* gets the max storage limit of the tank
|
||||
*/
|
||||
/** gets the max storage limit of the tank */
|
||||
public abstract int getTankSize();
|
||||
|
||||
@Override
|
||||
public String getMeterReading(EntityPlayer user, ForgeDirection side, EnumTools tool)
|
||||
{
|
||||
if(tool != EnumTools.PIPE_GUAGE)
|
||||
if (tool != EnumTools.PIPE_GUAGE)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (this.tank.getLiquid() == null)
|
||||
if (this.tank.getFluid() == null)
|
||||
{
|
||||
return "Empty";
|
||||
}
|
||||
return String.format("%d/%d %S Stored", tank.getLiquid().amount / LiquidContainerRegistry.BUCKET_VOLUME, tank.getCapacity() / LiquidContainerRegistry.BUCKET_VOLUME, LiquidDictionary.findLiquidName(tank.getLiquid()));
|
||||
return String.format("%d/%d %S Stored", tank.getFluid().amount / FluidContainerRegistry.BUCKET_VOLUME, tank.getCapacity() / FluidContainerRegistry.BUCKET_VOLUME, tank.getFluid().getFluid().getLocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTileConnect(TileEntity entity, ForgeDirection dir)
|
||||
{
|
||||
if (entity instanceof ITankContainer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return entity instanceof IFluidHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, LiquidStack resource, boolean doFill)
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill)
|
||||
{
|
||||
return this.fill(0, resource, doFill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(int tankIndex, LiquidStack resource, boolean doFill)
|
||||
{
|
||||
if (resource == null || tankIndex != 0)
|
||||
if (resource == null || resource.getFluid() == null || !FluidRestrictionHandler.isValidLiquid(getColor(), resource.getFluid()))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (!FluidRestrictionHandler.isValidLiquid(getColor(),resource))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (this.tank.getLiquid() != null && !resource.isLiquidEqual(this.tank.getLiquid()))
|
||||
else if (this.tank.getFluid() != null && !resource.isFluidEqual(this.tank.getFluid()))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -74,19 +58,13 @@ public abstract class TileEntityFluidStorage extends TileEntityFluidDevice imple
|
|||
}
|
||||
|
||||
@Override
|
||||
public LiquidStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
|
||||
{
|
||||
return this.drain(0, maxDrain, doDrain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LiquidStack drain(int tankIndex, int maxDrain, boolean doDrain)
|
||||
{
|
||||
if (tankIndex != 0 || this.tank.getLiquid() == null)
|
||||
if (this.tank.getFluid() == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
LiquidStack stack = this.tank.getLiquid();
|
||||
FluidStack stack = this.tank.getFluid();
|
||||
if (maxDrain < stack.amount)
|
||||
{
|
||||
stack = FluidHelper.getStack(stack, maxDrain);
|
||||
|
@ -95,23 +73,13 @@ public abstract class TileEntityFluidStorage extends TileEntityFluidDevice imple
|
|||
}
|
||||
|
||||
@Override
|
||||
public ILiquidTank[] getTanks(ForgeDirection dir)
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from)
|
||||
{
|
||||
return new ILiquidTank[] { this.tank };
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILiquidTank getTank(ForgeDirection dir, LiquidStack type)
|
||||
{
|
||||
if (type == null)
|
||||
if (this.tank != null)
|
||||
{
|
||||
return null;
|
||||
return new FluidTankInfo[] { new FluidTankInfo(this.tank.getFluid(), this.tank.getCapacity()) };
|
||||
}
|
||||
if (type.isLiquidEqual(this.tank.getLiquid()))
|
||||
{
|
||||
return this.tank;
|
||||
}
|
||||
return null;
|
||||
return new FluidTankInfo[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -119,10 +87,21 @@ public abstract class TileEntityFluidStorage extends TileEntityFluidDevice imple
|
|||
{
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
LiquidStack liquid = LiquidStack.loadLiquidStackFromNBT(nbt.getCompoundTag("stored"));
|
||||
FluidStack liquid = FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag("FluidTank"));
|
||||
if (nbt.hasKey("stored"))
|
||||
{
|
||||
NBTTagCompound tag = nbt.getCompoundTag("stored");
|
||||
String name = tag.getString("LiquidName");
|
||||
int amount = nbt.getInteger("Amount");
|
||||
Fluid fluid = FluidRegistry.getFluid(name);
|
||||
if (fluid != null)
|
||||
{
|
||||
liquid = new FluidStack(fluid, amount);
|
||||
}
|
||||
}
|
||||
if (liquid != null)
|
||||
{
|
||||
tank.setLiquid(liquid);
|
||||
tank.setFluid(liquid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,30 +109,26 @@ public abstract class TileEntityFluidStorage extends TileEntityFluidDevice imple
|
|||
public void writeToNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.writeToNBT(nbt);
|
||||
if (this.tank.containsValidLiquid())
|
||||
if (this.tank != null)
|
||||
{
|
||||
nbt.setTag("stored", this.tank.getLiquid().writeToNBT(new NBTTagCompound()));
|
||||
nbt.setTag("FluidTank", this.tank.getFluid().writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the internal tank full
|
||||
*/
|
||||
/** Is the internal tank full */
|
||||
public boolean isFull()
|
||||
{
|
||||
if (this.tank.getLiquid() == null || this.tank.getLiquid().amount < this.tank.getCapacity())
|
||||
if (this.tank.getFluid() == null || this.tank.getFluid().amount < this.tank.getCapacity())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the liquidStack stored in the internal tank
|
||||
*/
|
||||
public LiquidStack getStoredLiquid()
|
||||
/** gets the liquidStack stored in the internal tank */
|
||||
public FluidStack getStoredLiquid()
|
||||
{
|
||||
return this.tank.getLiquid();
|
||||
return this.tank.getFluid();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.minecraft.entity.EntityLivingBase;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatMessageComponent;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -97,7 +98,7 @@ public class BlockDrain extends BlockMachine
|
|||
TileEntity entity = world.getBlockTileEntity(x, y, z);
|
||||
if (entity instanceof TileEntityDrain)
|
||||
{
|
||||
entityPlayer.sendChatToPlayer("Draining Sources? " + ((TileEntityDrain) entity).canDrainSources());
|
||||
entityPlayer.sendChatToPlayer(ChatMessageComponent.func_111066_d("Draining Sources? " + ((TileEntityDrain) entity).canDrainSources()));
|
||||
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package dark.fluid.common.pump;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -13,9 +12,7 @@ import universalelectricity.core.vector.Vector2;
|
|||
import universalelectricity.core.vector.Vector3;
|
||||
import dark.core.hydraulic.helpers.FluidHelper;
|
||||
|
||||
/**
|
||||
* A simpler pathfinder based on Calclavia's PathFinder from UE api
|
||||
*/
|
||||
/** A simpler pathfinder based on Calclavia's PathFinder from UE api */
|
||||
public class LiquidPathFinder
|
||||
{
|
||||
private World world; /* MC WORLD */
|
||||
|
@ -52,12 +49,10 @@ public class LiquidPathFinder
|
|||
bn.add(ForgeDirection.SOUTH);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True on success finding, false on failure.
|
||||
*/
|
||||
/** @return True on success finding, false on failure. */
|
||||
public boolean findNodes(Vector3 node)
|
||||
{
|
||||
if(node == null)
|
||||
if (node == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -74,11 +69,11 @@ public class LiquidPathFinder
|
|||
|
||||
int id = node.getBlockID(world);
|
||||
int meta = node.getBlockID(world);
|
||||
if (this.fill && (id == 0 || (FluidHelper.getBlockFluidStack(id) != null && meta != 0)))
|
||||
if (this.fill && (id == 0 || (FluidHelper.isFillable(world, node))))
|
||||
{
|
||||
this.results.add(node);
|
||||
}
|
||||
else if (!this.fill && FluidHelper.isSourceBlock(world, node))
|
||||
else if (!this.fill && FluidHelper.drainBlock(world, node, false) != null)
|
||||
{
|
||||
this.results.add(node);
|
||||
}
|
||||
|
@ -133,15 +128,7 @@ public class LiquidPathFinder
|
|||
|
||||
public boolean isValidNode(Vector3 pos)
|
||||
{
|
||||
int blockID = pos.getBlockID(world);
|
||||
if (!this.fill)
|
||||
{
|
||||
return FluidHelper.getBlockFluidStack(pos.getBlockID(world)) != null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FluidHelper.getBlockFluidStack(pos.getBlockID(world)) != null || (blockID == 0 && FluidHelper.getConnectedSources(world, pos) > 0);
|
||||
}
|
||||
return FluidHelper.drainBlock(world, pos, false) != null;
|
||||
}
|
||||
|
||||
public boolean isDone(Vector3 vec)
|
||||
|
@ -153,9 +140,7 @@ public class LiquidPathFinder
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to execute the pathfinding operation.
|
||||
*/
|
||||
/** Called to execute the pathfinding operation. */
|
||||
public LiquidPathFinder init(final Vector3 startNode, final boolean fill)
|
||||
{
|
||||
this.Start = startNode.toVector2();
|
||||
|
|
|
@ -8,7 +8,6 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
@ -125,7 +124,7 @@ public class TileEntityDrain extends TileEntityFluidDevice implements IFluidHand
|
|||
if (stack != null)
|
||||
{
|
||||
/* GET STACKS */
|
||||
|
||||
|
||||
FluidStack requestStack = request.getValue();
|
||||
|
||||
if (stack != null && requestStack != null && (requestStack.isFluidEqual(stack) || requestStack.getFluid().getBlockID() == -111))
|
||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.tileentity.TileEntity;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import dark.fluid.common.FluidMech;
|
||||
import dark.mech.client.model.ModelGearRod;
|
||||
|
||||
public class RenderGearRod extends TileEntitySpecialRenderer
|
||||
|
|
|
@ -5,11 +5,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import dark.fluid.common.FluidMech;
|
||||
import dark.mech.client.model.ModelGenerator;
|
||||
|
||||
|
||||
|
||||
public class RenderGenerator extends TileEntitySpecialRenderer
|
||||
{
|
||||
int type = 0;
|
||||
|
|
|
@ -6,7 +6,6 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -4,7 +4,6 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
|
Loading…
Reference in a new issue