public class FluidRenderer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FluidRenderer.TankSize |
Modifier and Type | Field and Description |
---|---|
static MutableVertex |
vertex |
Constructor and Description |
---|
FluidRenderer() |
Modifier and Type | Method and Description |
---|---|
static void |
drawFluidForGui(net.minecraftforge.fluids.FluidStack fluid,
double startX,
double startY,
double endX,
double endY)
Fills up the given region with the fluids texture, repeated.
|
static void |
onTextureStitchPost(net.minecraft.client.renderer.texture.TextureMap map) |
static void |
onTextureStitchPre(net.minecraft.client.renderer.texture.TextureMap map) |
static void |
renderFluid(FluidSpriteType type,
net.minecraftforge.fluids.FluidStack fluid,
double amount,
double cap,
net.minecraft.util.math.Vec3d min,
net.minecraft.util.math.Vec3d max,
net.minecraft.client.renderer.VertexBuffer vbIn,
boolean[] sideRender)
Render's a fluid cuboid to the given vertex buffer.
|
static void |
renderFluid(FluidSpriteType type,
net.minecraftforge.fluids.FluidStack fluid,
int cap,
net.minecraft.util.math.Vec3d min,
net.minecraft.util.math.Vec3d max,
net.minecraft.client.renderer.VertexBuffer vbIn,
boolean[] sideRender)
Render's a fluid cuboid to the given vertex buffer.
|
static void |
renderFluid(FluidSpriteType type,
net.minecraftforge.fluids.IFluidTank tank,
net.minecraft.util.math.Vec3d min,
net.minecraft.util.math.Vec3d max,
net.minecraft.client.renderer.VertexBuffer vbIn,
boolean[] sideRender)
Render's a fluid cuboid to the given vertex buffer.
|
public static final MutableVertex vertex
public static void onTextureStitchPre(net.minecraft.client.renderer.texture.TextureMap map)
public static void onTextureStitchPost(net.minecraft.client.renderer.texture.TextureMap map)
public static void renderFluid(FluidSpriteType type, net.minecraftforge.fluids.IFluidTank tank, net.minecraft.util.math.Vec3d min, net.minecraft.util.math.Vec3d max, net.minecraft.client.renderer.VertexBuffer vbIn, boolean[] sideRender)
type
- The type of sprite to use. See FluidSpriteType
for more details.tank
- The fluid tank that should be rendered.min
- The minimum coordinate that the tank should be rendered frommax
- The maximum coordinate that the tank will be rendered to.vbIn
- The VertexBuffer
that the fluid will be rendered into.sideRender
- A size 6 boolean array that determines if the face will be rendered. If it is null then all
faces will be rendered. The indexes are determined by what Enum.ordinal()
returns.renderFluid(FluidSpriteType, FluidStack, double, double, Vec3d, Vec3d, VertexBuffer, boolean[])
public static void renderFluid(FluidSpriteType type, net.minecraftforge.fluids.FluidStack fluid, int cap, net.minecraft.util.math.Vec3d min, net.minecraft.util.math.Vec3d max, net.minecraft.client.renderer.VertexBuffer vbIn, boolean[] sideRender)
type
- The type of sprite to use. See FluidSpriteType
for more details.fluid
- The stack that represents the fluid to rendercap
- The maximum amount of fluid that could be in the stack. Usually the capacity of the tank.min
- The minimum coordinate that the tank should be rendered frommax
- The maximum coordinate that the tank will be rendered to.vbIn
- The VertexBuffer
that the fluid will be rendered into.sideRender
- A size 6 boolean array that determines if the face will be rendered. If it is null then all
faces will be rendered. The indexes are determined by what Enum.ordinal()
returns.public static void renderFluid(FluidSpriteType type, net.minecraftforge.fluids.FluidStack fluid, double amount, double cap, net.minecraft.util.math.Vec3d min, net.minecraft.util.math.Vec3d max, net.minecraft.client.renderer.VertexBuffer vbIn, boolean[] sideRender)
type
- The type of sprite to use. See FluidSpriteType
for more details.fluid
- The stack that represents the fluid to render. Note that the amount from the stack is NOT used.amount
- The actual amount of fluid in the stack. Is a "double" rather than an "int" as then you can
interpolate between frames.cap
- The maximum amount of fluid that could be in the stack. Usually the capacity of the tank.min
- The minimum coordinate that the tank should be rendered frommax
- The maximum coordinate that the tank will be rendered to.vbIn
- The VertexBuffer
that the fluid will be rendered into.sideRender
- A size 6 boolean array that determines if the face will be rendered. If it is null then all
faces will be rendered. The indexes are determined by what Enum.ordinal()
returns.public static void drawFluidForGui(net.minecraftforge.fluids.FluidStack fluid, double startX, double startY, double endX, double endY)
FluidStack.amount
. Use
GuiUtil
's fluid drawing methods in preference to this.