renamed pump

mainly just a sync up
This commit is contained in:
RSeifert 2013-03-12 22:58:16 -04:00
parent 21a60d5c13
commit 01e0d80b85
5 changed files with 19 additions and 22 deletions

View file

@ -14,7 +14,7 @@ import fluidmech.client.render.RenderSink;
import fluidmech.client.render.RenderTank;
import fluidmech.common.CommonProxy;
import fluidmech.common.FluidMech;
import fluidmech.common.machines.TileEntityPump;
import fluidmech.common.machines.TileEntityMinorPump;
import fluidmech.common.machines.TileEntityReleaseValve;
import fluidmech.common.machines.TileEntitySink;
import fluidmech.common.machines.TileEntityTank;
@ -35,7 +35,7 @@ public class ClientProxy extends CommonProxy
public void Init()
{
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPipe.class, new RenderPipe());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPump.class, new RenderPump());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMinorPump.class, new RenderPump());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRod.class, new RenderGearRod());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGenerator.class, new RenderGenerator());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTank.class, new RenderTank());

View file

@ -7,7 +7,7 @@ import org.lwjgl.opengl.GL11;
import fluidmech.client.model.ModelPump;
import fluidmech.common.FluidMech;
import fluidmech.common.machines.TileEntityPump;
import fluidmech.common.machines.TileEntityMinorPump;
public class RenderPump extends TileEntitySpecialRenderer
{
@ -19,7 +19,7 @@ public class RenderPump extends TileEntitySpecialRenderer
model = new ModelPump();
}
public void renderAModelAt(TileEntityPump te, double d, double d1, double d2, float f)
public void renderAModelAt(TileEntityMinorPump te, double d, double d1, double d2, float f)
{
int meta = te.worldObj.getBlockMetadata(te.xCoord, te.yCoord, te.zCoord);
@ -51,7 +51,7 @@ public class RenderPump extends TileEntitySpecialRenderer
@Override
public void renderTileEntityAt(TileEntity tileEntity, double var2, double var4, double var6, float var8)
{
this.renderAModelAt((TileEntityPump) tileEntity, var2, var4, var6, var8);
this.renderAModelAt((TileEntityMinorPump) tileEntity, var2, var4, var6, var8);
}
}

View file

@ -44,7 +44,7 @@ import fluidmech.common.item.ItemPipe;
import fluidmech.common.item.ItemReleaseValve;
import fluidmech.common.item.ItemTank;
import fluidmech.common.item.ItemParts.Parts;
import fluidmech.common.machines.TileEntityPump;
import fluidmech.common.machines.TileEntityMinorPump;
import fluidmech.common.machines.TileEntityReleaseValve;
import fluidmech.common.machines.TileEntitySink;
import fluidmech.common.machines.TileEntityTank;
@ -156,7 +156,7 @@ public class FluidMech extends DummyModContainer
proxy.Init();
// TileEntities
GameRegistry.registerTileEntity(TileEntityPipe.class, "lmPipeTile");
GameRegistry.registerTileEntity(TileEntityPump.class, "lmPumpTile");
GameRegistry.registerTileEntity(TileEntityMinorPump.class, "lmPumpTile");
GameRegistry.registerTileEntity(TileEntityRod.class, "lmRodTile");
GameRegistry.registerTileEntity(TileEntityReleaseValve.class, "lmeValve");
GameRegistry.registerTileEntity(TileEntityTank.class, "lmTank");

View file

@ -7,7 +7,7 @@ import java.util.List;
import fluidmech.client.render.BlockRenderHelper;
import fluidmech.common.FluidMech;
import fluidmech.common.TabFluidMech;
import fluidmech.common.machines.TileEntityPump;
import fluidmech.common.machines.TileEntityMinorPump;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@ -107,7 +107,7 @@ public class BlockPumpMachine extends BlockMachine
}
else
{
return new TileEntityPump();
return new TileEntityMinorPump();
}
return null;
}

View file

@ -32,17 +32,15 @@ import com.google.common.io.ByteArrayDataInput;
import fluidmech.common.FluidMech;
public class TileEntityPump extends TileEntityElectricityRunnable implements IPacketReceiver, IReadOut, IPsiCreator
public class TileEntityMinorPump extends TileEntityElectricityRunnable implements IPacketReceiver, IReadOut, IPsiCreator
{
public final double WATTS_PER_TICK = (400 / 20);
double percentPumped = 0.0;
double joulesReceived = 0;
int disableTimer = 0;
int count = 0;
public int pos = 0;
private boolean converted = false;
public ColorCode color = ColorCode.BLUE;
ForgeDirection back = ForgeDirection.EAST;
@ -82,16 +80,18 @@ public class TileEntityPump extends TileEntityElectricityRunnable implements IPa
if (this.canPump(xCoord, yCoord - 1, zCoord) && this.joulesReceived >= this.WATTS_PER_TICK)
{
joulesReceived -= this.WATTS_PER_TICK;
this.pos++;
if (pos >= 8)
{
pos = 0;
}
if (percentPumped++ >= 10)
{
percentPumped = 0;
this.drainBlock(new Vector3(xCoord, yCoord - 1, zCoord));
}
// // Do animation to simulate life //
this.pos++;
if (pos >= 8)
{
pos = 0;
}
}
if (this.ticks % 10 == 0)
{
@ -137,9 +137,6 @@ public class TileEntityPump extends TileEntityElectricityRunnable implements IPa
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
switch (MetaGroup.getGrouping(meta))
{
case 0:
case 1:
return 1;
case 2:
return 20;
case 3:
@ -193,10 +190,10 @@ public class TileEntityPump extends TileEntityElectricityRunnable implements IPa
{
int blockID = worldObj.getBlockId(loc.intX(), loc.intY(), loc.intZ());
int meta = worldObj.getBlockMetadata(loc.intX(), loc.intY(), loc.intZ());
LiquidData resource = LiquidHandler.getFromBlockID(blockID);
if (color.isValidLiquid(resource) && meta == 0 && getFillTarget().fill(back, resource.getStack(), false) != 0)
if (color.isValidLiquid(resource.getStack()) && meta == 0 && getFillTarget().fill(back, resource.getStack(), false) != 0)
{
LiquidStack stack = resource.getStack();