Changes
This commit is contained in:
parent
17a9507032
commit
15aa7a319a
12 changed files with 15 additions and 35 deletions
|
@ -15,7 +15,6 @@ import dark.fluid.client.render.RenderTank;
|
|||
import dark.fluid.client.render.pipe.RenderPipe;
|
||||
import dark.fluid.common.CommonProxy;
|
||||
import dark.fluid.common.FMRecipeLoader;
|
||||
import dark.fluid.common.FluidMech;
|
||||
import dark.fluid.common.machines.TileEntityReleaseValve;
|
||||
import dark.fluid.common.machines.TileEntitySink;
|
||||
import dark.fluid.common.machines.TileEntityTank;
|
||||
|
|
|
@ -2,8 +2,8 @@ package dark.fluid.common;
|
|||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import dark.core.prefab.BlockMachine;
|
||||
import dark.core.prefab.IExtraObjectInfo;
|
||||
import dark.core.prefab.machine.BlockMachine;
|
||||
|
||||
public abstract class BlockFM extends BlockMachine implements IExtraObjectInfo
|
||||
{
|
||||
|
|
|
@ -14,7 +14,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import dark.core.prefab.helpers.Pair;
|
||||
import dark.fluid.common.BlockFM;
|
||||
import dark.fluid.common.FMRecipeLoader;
|
||||
import dark.fluid.common.FluidMech;
|
||||
|
||||
public class BlockReleaseValve extends BlockFM
|
||||
{
|
||||
|
|
|
@ -14,7 +14,6 @@ import universalelectricity.prefab.tile.TileEntityAdvanced;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import dark.core.prefab.helpers.FluidHelper;
|
||||
import dark.core.prefab.helpers.MetaGroup;
|
||||
import dark.core.prefab.helpers.Pair;
|
||||
import dark.fluid.client.render.BlockRenderHelper;
|
||||
import dark.fluid.common.BlockFM;
|
||||
|
@ -44,7 +43,7 @@ public class BlockSink extends BlockFM
|
|||
public boolean onUseWrench(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
int meta = par1World.getBlockMetadata(x, y, z);
|
||||
int metaGroup = MetaGroup.getGrouping(meta);
|
||||
int metaGroup = meta % 4;
|
||||
|
||||
if (meta == (metaGroup * 4) + 3)
|
||||
{
|
||||
|
@ -66,7 +65,7 @@ public class BlockSink extends BlockFM
|
|||
int angle = MathHelper.floor_double((par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||
TileEntity ent = world.getBlockTileEntity(x, y, z);
|
||||
|
||||
world.setBlockMetadataWithNotify(x, y, z, angle + MetaGroup.getGroupStartMeta(MetaGroup.getGrouping(meta)), 3);
|
||||
world.setBlockMetadataWithNotify(x, y, z, angle * 4, 3);
|
||||
if (ent instanceof TileEntityAdvanced)
|
||||
{
|
||||
((TileEntityAdvanced) world.getBlockTileEntity(x, y, z)).initiate();
|
||||
|
|
|
@ -19,7 +19,6 @@ import dark.core.prefab.helpers.FluidHelper;
|
|||
import dark.core.prefab.helpers.Pair;
|
||||
import dark.fluid.common.BlockFM;
|
||||
import dark.fluid.common.FMRecipeLoader;
|
||||
import dark.fluid.common.FluidMech;
|
||||
|
||||
public class BlockPipe extends BlockFM
|
||||
{
|
||||
|
|
|
@ -4,7 +4,6 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import dark.fluid.common.FMRecipeLoader;
|
||||
import dark.fluid.common.FluidMech;
|
||||
|
||||
public class ItemBlockPipe extends ItemBlock
|
||||
{
|
||||
|
|
|
@ -16,7 +16,6 @@ import dark.core.prefab.helpers.Pair;
|
|||
import dark.fluid.client.render.BlockRenderHelper;
|
||||
import dark.fluid.common.BlockFM;
|
||||
import dark.fluid.common.FMRecipeLoader;
|
||||
import dark.fluid.common.FluidMech;
|
||||
|
||||
public class BlockPumpMachine extends BlockFM
|
||||
{
|
||||
|
|
|
@ -18,7 +18,6 @@ import universalelectricity.core.vector.VectorHelper;
|
|||
import dark.api.fluid.IDrain;
|
||||
import dark.api.fluid.INetworkPipe;
|
||||
import dark.api.parts.ITileConnector;
|
||||
import dark.core.prefab.helpers.MetaGroup;
|
||||
import dark.core.prefab.helpers.Pair;
|
||||
import dark.core.prefab.tilenetwork.fluid.FluidNetworkHelper;
|
||||
import dark.core.prefab.tilenetwork.fluid.NetworkFluidTiles;
|
||||
|
@ -37,25 +36,13 @@ public class TileEntityConstructionPump extends TileEntityStarterPump implements
|
|||
}
|
||||
|
||||
/** Gets the facing direction
|
||||
*
|
||||
*
|
||||
* @param input true for input side, false for output side
|
||||
* @return */
|
||||
public ForgeDirection getFacing(boolean input)
|
||||
{
|
||||
int meta = 0;
|
||||
if (worldObj != null)
|
||||
{
|
||||
meta = MetaGroup.getFacingMeta(worldObj.getBlockMetadata(xCoord, yCoord, zCoord));
|
||||
}
|
||||
if (input)
|
||||
{
|
||||
return ForgeDirection.getOrientation(meta);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ForgeDirection.getOrientation(meta).getOpposite();
|
||||
}
|
||||
|
||||
return input ? this.getDirection() : this.getDirection().getOpposite();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,7 +66,7 @@ public class TileEntityConstructionPump extends TileEntityStarterPump implements
|
|||
}
|
||||
|
||||
/** Gets the nextDrain in the list
|
||||
*
|
||||
*
|
||||
* @param inputTile - input tile must be an instance of INetworkPipe
|
||||
* @param outputTile - output tile must be an instance of IFluidHandler
|
||||
* @param ignoreList - list of drains to ignore so that the next one is selected
|
||||
|
|
|
@ -15,11 +15,11 @@ import dark.api.IToolReadOut;
|
|||
import dark.api.fluid.IDrain;
|
||||
import dark.api.parts.ITileConnector;
|
||||
import dark.core.common.ExternalModHandler;
|
||||
import dark.core.prefab.TileEntityMachine;
|
||||
import dark.core.prefab.helpers.FluidHelper;
|
||||
import dark.core.prefab.helpers.Pair;
|
||||
import dark.core.prefab.machine.TileEntityEnergyMachine;
|
||||
|
||||
public class TileEntityStarterPump extends TileEntityMachine implements IToolReadOut, ITileConnector
|
||||
public class TileEntityStarterPump extends TileEntityEnergyMachine implements IToolReadOut, ITileConnector
|
||||
{
|
||||
private int currentWorldEdits, MAX_WORLD_EDITS_PER_PROCESS;
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class TileEntityStarterPump extends TileEntityMachine implements IToolRea
|
|||
{
|
||||
this.currentWorldEdits = 0;
|
||||
|
||||
if (this.running)
|
||||
if (this.isFunctioning())
|
||||
{
|
||||
this.rotation = Math.max(Math.min(this.rotation + 1, 7), 0);
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class TileEntityStarterPump extends TileEntityMachine implements IToolRea
|
|||
}
|
||||
|
||||
/** Drains an area starting at the given location
|
||||
*
|
||||
*
|
||||
* @param world - world to drain in, most cases will be the TileEntities world
|
||||
* @param loc - origin to start the path finder with. If this is an instance of IDrain this
|
||||
* method will act different */
|
||||
|
@ -197,9 +197,9 @@ public class TileEntityStarterPump extends TileEntityMachine implements IToolRea
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canRun()
|
||||
public boolean canFunction()
|
||||
{
|
||||
return super.canRun() && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord);
|
||||
return super.canFunction() && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,7 +17,6 @@ import dark.core.prefab.helpers.Pair;
|
|||
import dark.fluid.client.render.BlockRenderHelper;
|
||||
import dark.fluid.common.BlockFM;
|
||||
import dark.fluid.common.FMRecipeLoader;
|
||||
import dark.fluid.common.FluidMech;
|
||||
|
||||
public class BlockGenerator extends BlockFM
|
||||
{
|
||||
|
|
|
@ -17,7 +17,6 @@ import dark.core.prefab.helpers.Pair;
|
|||
import dark.fluid.client.render.BlockRenderHelper;
|
||||
import dark.fluid.common.BlockFM;
|
||||
import dark.fluid.common.FMRecipeLoader;
|
||||
import dark.fluid.common.FluidMech;
|
||||
|
||||
public class BlockRod extends BlockFM
|
||||
{
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package dark.mech.common.machines;
|
||||
|
||||
import dark.core.prefab.TileEntityMachine;
|
||||
import dark.core.prefab.machine.TileEntityEnergyMachine;
|
||||
|
||||
public class TileEntitySteamPiston extends TileEntityMachine
|
||||
|
||||
public class TileEntitySteamPiston extends TileEntityEnergyMachine
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue