Fixed Construction pump working with energy supply
Still need to do more debug for rotation and item rendering
This commit is contained in:
parent
225b3a3ebf
commit
5eff4fa74a
4 changed files with 9 additions and 12 deletions
|
@ -86,7 +86,7 @@ public class BlockRenderHelper implements ISimpleBlockRenderingHandler
|
|||
if (block.blockID == FluidMech.blockConPump.blockID && metadata < 4)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) 0.0F, (float) 1.0F, (float) 0.0F);
|
||||
GL11.glTranslatef((float) 0.0F, (float) 1.2F, (float) 0.0F);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, FMLClientHandler.instance().getClient().renderEngine.getTexture(FluidMech.MODEL_TEXTURE_DIRECTORY + "ConstructionPump.png"));
|
||||
conPump.render(0.0725F);
|
||||
|
|
|
@ -333,15 +333,8 @@ public class FluidMech extends DummyModContainer
|
|||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(blockMachine, 1, 0), new Object[] { "C@C", "BMB", "@X@", '@', "plateSteel", 'X', new ItemStack(blockPipe, 1, ColorCode.NONE.ordinal()), 'B', new ItemStack(itemParts, 1, Parts.Valve.ordinal()), 'C', "basicCircuit", 'M', "motor" }));
|
||||
// construction pump
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(blockConPump, 1, 0), new Object[] { "@C@", "BMB", "@@@", '@', "plateSteel", 'B', new ItemStack(itemParts, 1, Parts.Valve.ordinal()), 'C', "advancedCircuit", 'M', "motor" }));
|
||||
//Drain
|
||||
GameRegistry.addRecipe(new ItemStack(blockDrain, 1, 0), new Object[] {
|
||||
"IGI", "SVS", " P ",
|
||||
'I', Item.ingotIron,
|
||||
'G', Block.dispenser,
|
||||
'S', Block.stone,
|
||||
'P', new ItemStack(blockPipe, 1),
|
||||
'V', new ItemStack(itemParts, 1, Parts.Valve.ordinal())});
|
||||
|
||||
// Drain
|
||||
GameRegistry.addRecipe(new ItemStack(blockDrain, 1, 0), new Object[] { "IGI", "SVS", " P ", 'I', Item.ingotIron, 'G', Block.dispenser, 'S', Block.stone, 'P', new ItemStack(blockPipe, 1), 'V', new ItemStack(itemParts, 1, Parts.Valve.ordinal()) });
|
||||
|
||||
// release valve
|
||||
GameRegistry.addRecipe(new ItemStack(blockReleaseValve, 1), new Object[] { "RPR", "PVP", "RPR", 'P', new ItemStack(blockPipe, 1, 15), 'V', new ItemStack(itemParts, 1, Parts.Valve.ordinal()), 'R', Item.redstone });
|
||||
|
|
|
@ -29,6 +29,7 @@ import net.minecraftforge.liquids.LiquidTank;
|
|||
import org.bouncycastle.util.Arrays;
|
||||
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.core.vector.VectorHelper;
|
||||
import universalelectricity.prefab.network.IPacketReceiver;
|
||||
import universalelectricity.prefab.network.PacketManager;
|
||||
import universalelectricity.prefab.tile.TileEntityAdvanced;
|
||||
|
@ -394,7 +395,8 @@ public class TileEntityPipe extends TileEntityAdvanced implements ITankContainer
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
return this.getNetwork().addFluidToNetwork(worldObj.getBlockTileEntity(xCoord + from.offsetX, yCoord + from.offsetY, zCoord + from.offsetZ), resource, doFill);
|
||||
TileEntity tile = VectorHelper.getTileEntityFromSide(this.worldObj, new Vector3(this), from);
|
||||
return this.getNetwork().addFluidToNetwork(tile, resource, doFill);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,6 +3,7 @@ package fluidmech.common.pump;
|
|||
import hydraulic.api.IPipeConnection;
|
||||
import hydraulic.fluidnetwork.HydraulicNetworkHelper;
|
||||
import hydraulic.fluidnetwork.IFluidNetworkPart;
|
||||
import hydraulic.helpers.MetaGroup;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
|
@ -34,7 +35,7 @@ public class TileEntityConstructionPump extends TileEntityElectricityRunnable im
|
|||
|
||||
public ForgeDirection getFacing(boolean input)
|
||||
{
|
||||
int meta = 2;
|
||||
int meta = MetaGroup.getFacingMeta(worldObj.getBlockMetadata(xCoord, yCoord, zCoord));
|
||||
if (worldObj != null)
|
||||
{
|
||||
meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
|
@ -53,6 +54,7 @@ public class TileEntityConstructionPump extends TileEntityElectricityRunnable im
|
|||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
if (!worldObj.isRemote)
|
||||
{
|
||||
if (this.ticks % 10 == 0 && this.wattsReceived >= this.WATTS_PER_TICK) // TODO add electric Drain
|
||||
|
|
Loading…
Reference in a new issue