Mekanism-tilera-Edition/common/mekanism/client/GasClientUpdate.java
Aidan Brady 96b192efef General rendering improvements
*Faster gas rendering in Pressurized Tube.
*Lava now glows when in Dynamic Tank.
*Mechanical Pipes won't visually connect to Dynamic Valves when not part of a multiblock structure.
*Fixed energy cube GUI "Inventory" text color, fixed energy cube GUI energy scale bar.
2013-08-05 18:58:24 -04:00

41 lines
864 B
Java

package mekanism.client;
import java.util.List;
import mekanism.api.EnumGas;
import mekanism.api.GasNetwork.NetworkFinder;
import mekanism.api.IPressurizedTube;
import mekanism.api.Object3D;
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, Object3D.get(head));
}
public void clientUpdate()
{
List<Object3D> found = finder.exploreNetwork();
for(Object3D object : found)
{
TileEntity tileEntity = object.getTileEntity(worldObj);
if(tileEntity instanceof IPressurizedTube)
{
((IPressurizedTube)tileEntity).onTransfer(gasType);
}
}
}
}