Mekanism-tilera-Edition/common/mekanism/client/GasClientUpdate.java
Aidan C. Brady 5e379f052a Merge branch 'master' of https://github.com/aidancbrady/Mekanism
Conflicts:
	common/mekanism/api/GasNetwork.java
	common/mekanism/common/EnergyNetwork.java
	common/mekanism/common/FluidNetwork.java
	common/mekanism/common/InventoryNetwork.java
	common/mekanism/common/TileEntityEnergyCube.java
	common/mekanism/generators/common/TileEntityGenerator.java
2013-08-22 14:07:28 -04:00

42 lines
958 B
Java

package mekanism.client;
import java.util.List;
import mekanism.api.DynamicNetwork.NetworkFinder;
import mekanism.api.EnumGas;
import mekanism.api.Object3D;
import mekanism.api.TransmissionType;
import mekanism.common.TileEntityPressurizedTube;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class GasClientUpdate
{
public NetworkFinder finder;
public World worldObj;
public EnumGas gasType;
public GasClientUpdate(TileEntity head, EnumGas type)
{
worldObj = head.worldObj;
gasType = type;
finder = new NetworkFinder(head.worldObj, TransmissionType.GAS, Object3D.get(head));
}
public void clientUpdate()
{
List<Object3D> found = finder.exploreNetwork();
for(Object3D object : found)
{
TileEntity tileEntity = object.getTileEntity(worldObj);
if(tileEntity instanceof TileEntityPressurizedTube)
{
((TileEntityPressurizedTube)tileEntity).onTransfer(gasType);
}
}
}
}