Fixed render issues

This commit is contained in:
DarkGuardsman 2013-09-13 08:32:02 -04:00
parent 517af9442d
commit c6031ce624
10 changed files with 24 additions and 22 deletions

View file

@ -7,7 +7,7 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.core.client.renders.RenderTileMachine;
import dark.core.prefab.helpers.ConnectionHelper;
import dark.fluid.client.model.ModelCenterTank;
import dark.fluid.client.model.ModelCornerTank;
@ -15,7 +15,7 @@ import dark.fluid.client.model.ModelTank;
import dark.fluid.common.FluidMech;
import dark.fluid.common.machines.TileEntityBoiler;
@SideOnly(Side.CLIENT)
public class RenderBoiler extends RenderMachine
public class RenderBoiler extends RenderTileMachine
{
int type = 0;
private ModelTank model;

View file

@ -7,13 +7,13 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.core.client.renders.RenderTileMachine;
import dark.fluid.client.model.ModelConstructionPump;
import dark.fluid.common.FluidMech;
import dark.fluid.common.pump.TileEntityConstructionPump;
@SideOnly(Side.CLIENT)
public class RenderConstructionPump extends RenderMachine
public class RenderConstructionPump extends RenderTileMachine
{
int type = 0;
private ModelConstructionPump model;

View file

@ -7,11 +7,11 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.core.client.renders.RenderTileMachine;
import dark.fluid.client.model.ModelFurnace;
import dark.fluid.common.FluidMech;
@SideOnly(Side.CLIENT)
public class RenderFurnace extends RenderMachine
public class RenderFurnace extends RenderTileMachine
{
int type = 0;
private ModelFurnace model;

View file

@ -7,12 +7,12 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.core.client.renders.RenderTileMachine;
import dark.fluid.client.model.ModelGearPiston;
import dark.fluid.common.FluidMech;
import dark.mech.common.machines.TileEntitySteamPiston;
@SideOnly(Side.CLIENT)
public class RenderGearPiston extends RenderMachine
public class RenderGearPiston extends RenderTileMachine
{
private ModelGearPiston model;

View file

@ -7,13 +7,13 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.core.client.renders.RenderTileMachine;
import dark.fluid.client.model.ModelPump;
import dark.fluid.common.FluidMech;
import dark.fluid.common.pump.TileEntityStarterPump;
@SideOnly(Side.CLIENT)
public class RenderPump extends RenderMachine
public class RenderPump extends RenderTileMachine
{
int type = 0;
private ModelPump model;

View file

@ -7,7 +7,7 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.core.client.renders.RenderTileMachine;
import dark.core.interfaces.ColorCode;
import dark.fluid.client.model.ModelLargePipe;
import dark.fluid.client.model.ModelReleaseValve;
@ -15,7 +15,7 @@ import dark.fluid.common.FluidMech;
import dark.fluid.common.machines.TileEntityReleaseValve;
@SideOnly(Side.CLIENT)
public class RenderReleaseValve extends RenderMachine
public class RenderReleaseValve extends RenderTileMachine
{
private ModelLargePipe SixPipe;
private ModelReleaseValve valve;

View file

@ -8,13 +8,13 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.core.client.renders.RenderTileMachine;
import dark.fluid.client.model.ModelSink;
import dark.fluid.common.FluidMech;
import dark.fluid.common.machines.TileEntitySink;
@SideOnly(Side.CLIENT)
public class RenderSink extends RenderMachine
public class RenderSink extends RenderTileMachine
{
int type = 0;
private ModelSink model;

View file

@ -9,15 +9,16 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.FluidBlockRenderer;
import dark.core.client.renders.RenderMachine;
import dark.core.client.renders.RenderBlockFluid;
import dark.core.client.renders.RenderBlockFluid;
import dark.core.client.renders.RenderTileMachine;
import dark.core.interfaces.ColorCode;
import dark.fluid.client.model.ModelTankSide;
import dark.fluid.common.FluidMech;
import dark.fluid.common.machines.TileEntityTank;
@SideOnly(Side.CLIENT)
public class RenderTank extends RenderMachine
public class RenderTank extends RenderTileMachine
{
private ModelTankSide model;
@ -44,7 +45,7 @@ public class RenderTank extends RenderMachine
if (liquid != null && liquid.amount > 100)
{
int[] displayList = FluidBlockRenderer.getFluidDisplayLists(liquid, tileEntity.worldObj, false);
int[] displayList = RenderBlockFluid.getFluidDisplayLists(liquid, tileEntity.worldObj, false);
GL11.glPushMatrix();
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
@ -53,12 +54,12 @@ public class RenderTank extends RenderMachine
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
func_110628_a(FluidBlockRenderer.getFluidSheet(liquid));
func_110628_a(RenderBlockFluid.getFluidSheet(liquid));
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glScalef(1.01F, 1.01F, 1.01F);
int cap = tileEntity instanceof TileEntityTank ? ((TileEntityTank) tileEntity).getTankSize() : liquid.amount;
GL11.glCallList(displayList[(int) ((float) liquid.amount / (float) (cap) * (FluidBlockRenderer.DISPLAY_STAGES - 1))]);
GL11.glCallList(displayList[(int) ((float) liquid.amount / (float) (cap) * (RenderBlockFluid.DISPLAY_STAGES - 1))]);
GL11.glPopAttrib();
GL11.glPopMatrix();

View file

@ -10,7 +10,7 @@ import org.lwjgl.opengl.GL11;
import universalelectricity.core.vector.Vector3;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.client.renders.RenderMachine;
import dark.core.client.renders.RenderTileMachine;
import dark.core.interfaces.ColorCode;
import dark.core.prefab.helpers.FluidHelper;
import dark.fluid.client.model.ModelLargePipe;
@ -19,7 +19,7 @@ import dark.fluid.common.pipes.TileEntityPipe;
import dark.fluid.common.pipes.addon.IPipeExtention;
@SideOnly(Side.CLIENT)
public class RenderPipe extends RenderMachine
public class RenderPipe extends RenderTileMachine
{
public ModelLargePipe SixPipe;
private boolean[] renderSide = new boolean[6];

View file

@ -96,6 +96,7 @@ public class TileEntityTank extends TileEntityFluidStorage implements IFluidHand
if (id == 0)
{
this.getTank().setFluid(FluidStack.loadFluidStackFromNBT(PacketHandler.instance().readNBTTagCompound(dataStream)));
System.out.println("Received Fluid Packet Fluid = " + this.getTank().getFluid().getFluid().getName() + "@" + this.getTank().getFluid().amount);
}
else
{