cleanup & formatting
This commit is contained in:
parent
6f8c42d9ba
commit
208078dee6
12 changed files with 22 additions and 26 deletions
|
@ -2,9 +2,7 @@ package dark.core.prefab.tilenetwork.fluid;
|
|||
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -252,6 +250,7 @@ public class NetworkFluidTiles extends NetworkTileEntities
|
|||
newNetwork.getMembers().addAll(this.getMembers());
|
||||
newNetwork.getMembers().addAll(network.getMembers());
|
||||
newNetwork.onCreated();
|
||||
newNetwork.save();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -6,11 +6,9 @@ import java.util.Map.Entry;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import dark.api.fluid.INetworkPipe;
|
||||
import dark.api.tilenetwork.INetworkPart;
|
||||
import dark.core.helpers.ConnectionHelper;
|
||||
import dark.core.prefab.fluids.FluidHelper;
|
||||
import dark.core.prefab.tilenetwork.NetworkUpdateHandler;
|
||||
|
||||
|
@ -85,13 +83,16 @@ public class NetworkPipes extends NetworkFluidTiles
|
|||
{
|
||||
for (ForgeDirection dir : entry.getValue())
|
||||
{
|
||||
int fill = tankContainer.fill(dir, stack, false);
|
||||
|
||||
if (fill > mostFill)
|
||||
if (tankContainer.canFill(dir, sta.getFluid()))
|
||||
{
|
||||
tankToFill = tankContainer;
|
||||
mostFill = fill;
|
||||
fillDir = dir;
|
||||
int fill = tankContainer.fill(dir, stack, false);
|
||||
|
||||
if (fill > mostFill)
|
||||
{
|
||||
tankToFill = tankContainer;
|
||||
mostFill = fill;
|
||||
fillDir = dir;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ import dark.core.prefab.ModPrefab;
|
|||
import dark.fluid.client.model.ModelConstructionPump;
|
||||
import dark.fluid.client.model.ModelPump;
|
||||
import dark.fluid.client.model.ModelSink;
|
||||
import dark.fluid.client.model.ModelTankSide;
|
||||
import dark.fluid.common.FMRecipeLoader;
|
||||
import dark.fluid.common.FluidMech;
|
||||
import dark.mech.client.model.ModelGearRod;
|
||||
|
@ -53,7 +52,7 @@ public class BlockRenderHelper implements ISimpleBlockRenderingHandler
|
|||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(FluidMech.instance.DOMAIN, ModPrefab.MODEL_DIRECTORY + "Sink.png"));
|
||||
sink.render(0.0565F);
|
||||
}
|
||||
else if (FMRecipeLoader.blockRod != null && block.blockID == FMRecipeLoader.blockRod.blockID)
|
||||
else if (FMRecipeLoader.blockRod != null && block.blockID == FMRecipeLoader.blockRod.blockID)
|
||||
{
|
||||
GL11.glTranslatef(0.0F, 1.5F, 0.0F);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
|
|
|
@ -16,7 +16,6 @@ import dark.fluid.client.model.ModelTankSide;
|
|||
import dark.fluid.common.FMRecipeLoader;
|
||||
import dark.fluid.common.FluidMech;
|
||||
import dark.fluid.common.machines.BlockTank;
|
||||
import dark.machines.CoreRecipeLoader;
|
||||
import dark.machines.client.renders.RenderBlockFluid;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -4,8 +4,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -14,6 +12,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
|
||||
|
@ -25,7 +24,6 @@ import dark.fluid.client.render.BlockRenderHelper;
|
|||
import dark.fluid.common.FluidPartsMaterial;
|
||||
import dark.fluid.common.pipes.ItemBlockPipe;
|
||||
import dark.fluid.common.pipes.TileEntityPipe;
|
||||
import dark.machines.machines.ItemBlockEnergyStorage;
|
||||
|
||||
public class BlockTank extends BlockFM
|
||||
{
|
||||
|
|
|
@ -2,11 +2,9 @@ package dark.fluid.common.machines;
|
|||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import dark.api.fluid.INetworkFluidPart;
|
||||
import dark.api.tilenetwork.INetworkPart;
|
||||
import dark.api.tilenetwork.ITileNetwork;
|
||||
import dark.api.tilenetwork.ITileConnector.Connection;
|
||||
import dark.core.prefab.tilenetwork.fluid.NetworkFluidContainers;
|
||||
import dark.fluid.common.prefab.TileEntityFluidNetworkTile;
|
||||
|
||||
|
@ -36,6 +34,7 @@ public class TileEntityTank extends TileEntityFluidNetworkTile
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateConnectionSide(TileEntity tileEntity, ForgeDirection side)
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ItemBlockPipe extends ItemBlock
|
|||
{
|
||||
ItemStack itemStack = new ItemStack(FMRecipeLoader.blockTank);
|
||||
FluidStack stack = ((TileEntityTank) entity).getTankInfo()[0].fluid;
|
||||
|
||||
|
||||
if (itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
|
@ -86,6 +86,7 @@ public class ItemBlockPipe extends ItemBlock
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemStackLimit(ItemStack stack)
|
||||
{
|
||||
if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("fluid"))
|
||||
|
@ -112,7 +113,7 @@ public class ItemBlockPipe extends ItemBlock
|
|||
((TileEntityFluidNetworkTile) tile).setSubID(stack.getItemDamage());
|
||||
if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("fluid"))
|
||||
{
|
||||
((TileEntityFluidNetworkTile) tile).fillTankContent(0, FluidStack.loadFluidStackFromNBT(stack.getTagCompound().getCompoundTag("fluid")), true);
|
||||
((TileEntityFluidNetworkTile) tile).fill(ForgeDirection.UNKNOWN, FluidStack.loadFluidStackFromNBT(stack.getTagCompound().getCompoundTag("fluid")), true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -133,7 +133,7 @@ public class TileEntityPipe extends TileEntityFluidNetworkTile implements IColor
|
|||
}
|
||||
|
||||
/** Calculates flow rate based on viscosity & temp of the fluid as all other factors are know
|
||||
*
|
||||
*
|
||||
* @param fluid - fluidStack
|
||||
* @param temp = tempature of the fluid
|
||||
* @param pressure - pressure difference of were the fluid is flowing too.
|
||||
|
|
|
@ -40,7 +40,7 @@ import dark.machines.DarkMain;
|
|||
public abstract class TileEntityFluidNetworkTile extends TileEntityFluidDevice implements INetworkFluidPart, ISimplePacketReceiver
|
||||
{
|
||||
private int updateTick = 1;
|
||||
public static int refreshRate = 40;
|
||||
public static int refreshRate = 10;
|
||||
protected FluidTank tank;
|
||||
protected FluidTankInfo[] internalTanksInfo = new FluidTankInfo[1];
|
||||
protected List<TileEntity> connectedBlocks = new ArrayList<TileEntity>();
|
||||
|
|
|
@ -89,7 +89,7 @@ public class TileEntityConstructionPump extends TileEntityStarterPump implements
|
|||
{
|
||||
for (Entry<IFluidHandler, EnumSet<ForgeDirection>> entry : ((NetworkFluidTiles) ((INetworkPipe) inputTile).getTileNetwork()).connctedFluidHandlers.entrySet())
|
||||
{
|
||||
|
||||
|
||||
if (entry.getKey() instanceof IDrain && !ignoreList.contains(entry.getKey()))
|
||||
{
|
||||
drain = (IDrain) entry.getKey();
|
||||
|
|
|
@ -17,7 +17,6 @@ import com.builtbroken.common.Pair;
|
|||
import dark.api.IToolReadOut;
|
||||
import dark.api.fluid.IDrain;
|
||||
import dark.api.tilenetwork.ITileConnector;
|
||||
import dark.core.ExternalModHandler;
|
||||
import dark.core.prefab.fluids.FluidHelper;
|
||||
import dark.core.prefab.machine.TileEntityEnergyMachine;
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package dark.mech.common.machines;
|
|||
|
||||
import dark.core.prefab.machine.TileEntityEnergyMachine;
|
||||
|
||||
public class TileEntitySteamPiston extends TileEntityEnergyMachine {
|
||||
|
||||
public class TileEntitySteamPiston extends TileEntityEnergyMachine
|
||||
{
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue