This commit is contained in:
Rseifert 2013-03-31 02:31:06 -04:00
parent 9bd0dfee26
commit 83eb1f75a5
8 changed files with 28 additions and 39 deletions

View file

@ -25,7 +25,7 @@ import fluidmech.common.machines.pipes.BlockPipe;
import fluidmech.common.machines.pipes.TileEntityPipe;
import fluidmech.common.machines.pipes.TileEntityPipe;
import hydraulic.api.ColorCode;
import hydraulic.fluidnetwork.FluidHelper;
import hydraulic.helpers.FluidHelper;
import java.io.File;
import java.util.logging.Logger;
@ -325,7 +325,6 @@ public class FluidMech extends DummyModContainer
// add Default Liquids to current list, done last to let other mods use
// there liquid data first if used
LiquidStack waste = LiquidDictionary.getOrCreateLiquid("Waste", new LiquidStack(FluidMech.blockWasteLiquid, 1));
FluidHelper.addDefaultLiquids();
FMLog.info("Done Loading");
}
}

View file

@ -1,6 +1,6 @@
package fluidmech.common.block;
import hydraulic.fluidnetwork.FluidHelper;
import hydraulic.helpers.FluidHelper;
import hydraulic.helpers.MetaGroup;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLiving;

View file

@ -1,6 +1,6 @@
package fluidmech.common.block;
import hydraulic.fluidnetwork.FluidHelper;
import hydraulic.helpers.FluidHelper;
import java.util.List;

View file

@ -5,7 +5,7 @@ import java.util.Random;
import fluidmech.common.FluidMech;
import hydraulic.api.ColorCode;
import hydraulic.api.IColorCoded;
import hydraulic.fluidnetwork.FluidHelper;
import hydraulic.helpers.FluidHelper;
import hydraulic.prefab.tile.TileEntityFluidStorage;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;

View file

@ -3,7 +3,7 @@ package fluidmech.common.machines;
import fluidmech.common.FluidMech;
import hydraulic.api.ColorCode;
import hydraulic.api.IColorCoded;
import hydraulic.fluidnetwork.FluidHelper;
import hydraulic.helpers.FluidHelper;
import hydraulic.prefab.tile.TileEntityFluidStorage;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;

View file

@ -1,6 +1,6 @@
package hydraulic.api;
import hydraulic.fluidnetwork.FluidHelper;
import hydraulic.helpers.FluidHelper;
import java.util.ArrayList;
import java.util.List;

View file

@ -1,4 +1,4 @@
package hydraulic.fluidnetwork;
package hydraulic.helpers;
import hydraulic.api.ColorCode;
@ -15,41 +15,31 @@ import net.minecraftforge.liquids.LiquidStack;
public class FluidHelper
{
private static HashMap<LiquidStack, Integer> getMaxFlowPerRequest = new HashMap<LiquidStack, Integer>();
public static Logger FMLog = Logger.getLogger("LiquidHandler");
/**
* Called to add the default liquids to the allowed list
* The default built in flow rate of the liquid threw the pipes. Will correct this later to use
* a visc value instead of flow value so that the size of the pipe can play a factor in flow
*/
public static void addDefaultLiquids()
{
}
@ForgeSubscribe
public void liquidRegisterEvent(LiquidDictionary.LiquidRegisterEvent event)
{
if (event.Name.equalsIgnoreCase("UraniumHexafluoride"))
{
getMaxFlowPerRequest.put(event.Liquid, 1000);
}
else if (event.Name.equalsIgnoreCase("methane"))
{
getMaxFlowPerRequest.put(event.Liquid, 1000);
}
else if (event.Name.equalsIgnoreCase("steam"))
{
getMaxFlowPerRequest.put(event.Liquid, 2000);
}
}
public int getDefaultFlowRate(LiquidStack stack)
{
if (getMaxFlowPerRequest.containsKey(stack))
if (stack != null)
{
return getMaxFlowPerRequest.get(stack);
String stackName = LiquidDictionary.findLiquidName(stack);
if (stackName.equalsIgnoreCase("UraniumHexafluoride"))
{
return 1000;
}
else if (stackName.equalsIgnoreCase("steam"))
{
return 1000;
}
else if (stackName.equalsIgnoreCase("methane"))
{
return 1000;
}
else if (stackName.equalsIgnoreCase("lava"))
{
return 250;
}
}
return 500;
}

View file

@ -3,7 +3,7 @@ package hydraulic.prefab.tile;
import fluidmech.common.machines.TileEntityTank;
import hydraulic.api.ColorCode;
import hydraulic.api.IColorCoded;
import hydraulic.fluidnetwork.FluidHelper;
import hydraulic.helpers.FluidHelper;
import java.util.EnumSet;