package xyz.brassgoggledcoders.steamagerevolution.modules.storage.renderers;

import javax.annotation.Nonnull;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTank;
import xyz.brassgoggledcoders.steamagerevolution.modules.storage.tileentities.TileEntityBasicFluidTank;
import xyz.brassgoggledcoders.steamagerevolution.utils.RenderUtil;

public class TileEntityBasicFluidTankRenderer extends TileEntitySpecialRenderer<TileEntityBasicFluidTank> {

	protected static Minecraft mc = Minecraft.getMinecraft();

	@Override
	public void renderTileEntityFast(@Nonnull TileEntityBasicFluidTank tile, double x, double y, double z,
			float partialTicks, int destroyStage, float partial, net.minecraft.client.renderer.BufferBuilder buffer) {
		FluidTank tank = tile.tank;
		FluidStack liquid = tank.getFluid();

		if(liquid != null) {

			float height = ((float) liquid.amount) / (float) tank.getCapacity();

			float d = RenderUtil.FLUID_OFFSET;
			RenderUtil.renderFluidCuboid(liquid, tile.getPos(), x, y, z, d, d, d, 1d - d, height - d, 1d - d);
		}
	}
}
@@ -75,42 +75,8 @@
 s;%0A%0A
-import javax.annotation.Nonnull;%0A%0A
 impo
@@ -649,32 +649,9 @@
 nder
-TileEntityFast(@Nonnull 
+(
 Tile
@@ -706,20 +706,17 @@
 ouble z,
-%0A%09%09%09
+ 
 float pa
@@ -726,17 +726,20 @@
 alTicks,
- 
+%0A%09%09%09
 int dest
@@ -758,67 +758,13 @@
 oat 
-partial, net.minecraft.client.renderer.BufferBuilder buffer
+alpha
 ) %7B%0A

Fix fluid in tank rendering