Rendering fixes!

This commit is contained in:
Aidan Brady 2013-11-28 22:20:24 -05:00
parent 00b4c6f3e3
commit 82bae6e4bd
4 changed files with 33 additions and 16 deletions

View file

@ -266,12 +266,10 @@ public class GasNetwork extends DynamicNetwork<IGasAcceptor, GasNetwork>
protected GasNetwork create(Set<GasNetwork> networks) protected GasNetwork create(Set<GasNetwork> networks)
{ {
GasNetwork network = new GasNetwork(networks); GasNetwork network = new GasNetwork(networks);
network.refGas = refGas;
network.gasScale = gasScale;
for(GasNetwork iterNet : networks) for(GasNetwork iterNet : networks)
{ {
if(iterNet.refGas != null && iterNet.gasScale > 0) if(iterNet.refGas != null && iterNet.gasScale > network.gasScale)
{ {
network.refGas = iterNet.refGas; network.refGas = iterNet.refGas;
network.gasScale = iterNet.gasScale; network.gasScale = iterNet.gasScale;
@ -279,6 +277,8 @@ public class GasNetwork extends DynamicNetwork<IGasAcceptor, GasNetwork>
} }
} }
System.out.println(network.gasScale);
return network; return network;
} }

View file

@ -84,20 +84,20 @@ public class RenderPressurizedTube extends TileEntitySpecialRenderer
switch(ForgeDirection.getOrientation(i)) switch(ForgeDirection.getOrientation(i))
{ {
case NORTH: case NORTH:
GL11.glScalef(1, 1, 1.7f); GL11.glScalef(1, 1, 1.7F);
GL11.glTranslatef(0, 0, -.077f); GL11.glTranslatef(0, 0, -.077F);
break; break;
case SOUTH: case SOUTH:
GL11.glScalef(1, 1, 1.7f); GL11.glScalef(1, 1, 1.7F);
GL11.glTranslatef(0, 0, .077f); GL11.glTranslatef(0, 0, .077F);
break; break;
case WEST: case WEST:
GL11.glScalef(1.7f, 1, 1); GL11.glScalef(1.7F, 1, 1);
GL11.glTranslatef(.077f, 0, 0); GL11.glTranslatef(.077F, 0, 0);
break; break;
case EAST: case EAST:
GL11.glScalef(1.7f, 1, 1); GL11.glScalef(1.7F, 1, 1);
GL11.glTranslatef(-.077f, 0, 0); GL11.glTranslatef(-.077F, 0, 0);
break; break;
} }
@ -128,7 +128,9 @@ public class RenderPressurizedTube extends TileEntitySpecialRenderer
{ {
if(connectable[i]) if(connectable[i])
{ {
Block b = Block.blocksList[Object3D.get(tileEntity).getFromSide(ForgeDirection.getOrientation(i)).getBlockId(tileEntity.worldObj)]; Object3D obj = Object3D.get(tileEntity).getFromSide(ForgeDirection.getOrientation(i));
Block b = Block.blocksList[obj.getBlockId(tileEntity.worldObj)];
b.setBlockBoundsBasedOnState(tileEntity.worldObj, obj.xCoord, obj.yCoord, obj.zCoord);
getListAndRender(ForgeDirection.getOrientation(i), gasType, b).render(); getListAndRender(ForgeDirection.getOrientation(i), gasType, b).render();
} }
} }

View file

@ -419,19 +419,34 @@ public class EnergyNetwork extends DynamicNetwork<TileEntity, EnergyNetwork>
@Override @Override
protected EnergyNetwork create(ITransmitter<EnergyNetwork>... varTransmitters) protected EnergyNetwork create(ITransmitter<EnergyNetwork>... varTransmitters)
{ {
return new EnergyNetwork(varTransmitters); EnergyNetwork network = new EnergyNetwork(varTransmitters);
network.clientEnergyScale = clientEnergyScale;
return network;
} }
@Override @Override
protected EnergyNetwork create(Collection<ITransmitter<EnergyNetwork>> collection) protected EnergyNetwork create(Collection<ITransmitter<EnergyNetwork>> collection)
{ {
return new EnergyNetwork(collection); EnergyNetwork network = new EnergyNetwork(collection);
network.clientEnergyScale = clientEnergyScale;
return network;
} }
@Override @Override
protected EnergyNetwork create(Set<EnergyNetwork> networks) protected EnergyNetwork create(Set<EnergyNetwork> networks)
{ {
return new EnergyNetwork(networks); EnergyNetwork network = new EnergyNetwork(networks);
network.clientEnergyScale = clientEnergyScale;
for(EnergyNetwork iterNet : networks)
{
if(iterNet.clientEnergyScale > network.clientEnergyScale)
{
network.clientEnergyScale = iterNet.clientEnergyScale;
}
}
return network;
} }
@Override @Override

View file

@ -293,7 +293,7 @@ public class FluidNetwork extends DynamicNetwork<IFluidHandler, FluidNetwork>
for(FluidNetwork iterNet : networks) for(FluidNetwork iterNet : networks)
{ {
if(iterNet.refFluid != null && iterNet.fluidScale > 0) if(iterNet.refFluid != null && iterNet.fluidScale > network.fluidScale)
{ {
network.refFluid = iterNet.refFluid; network.refFluid = iterNet.refFluid;
network.fluidScale = iterNet.fluidScale; network.fluidScale = iterNet.fluidScale;