commit
e2af94bcb4
1 changed files with 9 additions and 2 deletions
|
@ -30,11 +30,18 @@ public class RenderTank extends TileEntitySpecialRenderer {
|
||||||
TileTank tank = (TileTank) CoreProxy.proxy.getServerTile(tileentity);
|
TileTank tank = (TileTank) CoreProxy.proxy.getServerTile(tileentity);
|
||||||
|
|
||||||
FluidStack liquid = tank.tank.getFluid();
|
FluidStack liquid = tank.tank.getFluid();
|
||||||
int color = tank.tank.colorRenderCache;
|
if (liquid == null || liquid.getFluid() == null || liquid.amount <= 0) {
|
||||||
if (liquid == null || liquid.amount <= 0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Workaround: The colorRenderCache from the server tile from getServerTile(...) does not get synced properly
|
||||||
|
int color;
|
||||||
|
if(tank.getWorldObj().isRemote) {
|
||||||
|
color = tank.tank.colorRenderCache;
|
||||||
|
} else {
|
||||||
|
color = liquid.getFluid().getColor(liquid);
|
||||||
|
}
|
||||||
|
|
||||||
int[] displayList = FluidRenderer.getFluidDisplayLists(liquid, tileentity.getWorldObj(), false);
|
int[] displayList = FluidRenderer.getFluidDisplayLists(liquid, tileentity.getWorldObj(), false);
|
||||||
if (displayList == null) {
|
if (displayList == null) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue