Advertisement
Mouamle

RenderLavaTank

Jan 24th, 2017
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. public class RenderLavaTank extends TileEntitySpecialRenderer<TileLavaTank> {
  2.  
  3.     protected static Minecraft mc = Minecraft.getMinecraft();
  4.  
  5.     @Override
  6.     public void renderTileEntityAt(TileLavaTank tank, double x, double y, double z, float partialTicks, int destroyStage) {
  7.         FluidStack liquid = tank.getTank().getFluid();
  8.  
  9.         if (liquid != null) {
  10.  
  11.             float height = ((float) liquid.amount) / (float) tank.getTank().getCapacity();
  12.             height += (1 * 0.0625);
  13.             float d = RenderUtil.FLUID_OFFSET;
  14.             //RenderUtil.renderFluidCuboid(liquid, tank.getPos(), x + (2 * 0.0625), y, z + (2 * 0.0625), 15 * (2 * 0.0625), height, 1);
  15.             RenderUtil.renderFluidCuboid(liquid, tank.getPos(), x + (2 * 0.0625), y, z + (2 * 0.0625), d, d, d, 1d - d - (4 * 0.0625), height - (2 * 0.0625), 1d - d - (4 * 0.0625));
  16.         }
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement