Class BakedQuadBuilder
- java.lang.Object
-
- net.minecraftforge.client.model.pipeline.BakedQuadBuilder
-
- All Implemented Interfaces:
IVertexConsumer
public class BakedQuadBuilder extends java.lang.Object implements IVertexConsumer
Allows easier building of BakedQuad objects. During building, data is stored unpacked as floats, but is packed into the typical int array format on build.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
applyDiffuseLighting
private boolean
contractUVs
private int
elements
private float
eps
private boolean
full
private Direction
orientation
private static int
SIZE
private TextureAtlasSprite
texture
private int
tint
private float[][][]
unpackedData
private int
vertices
-
Constructor Summary
Constructors Constructor Description BakedQuadBuilder()
BakedQuadBuilder(TextureAtlasSprite texture)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BakedQuad
build()
VertexFormat
getVertexFormat()
void
put(int element, float... data)
void
setApplyDiffuseLighting(boolean diffuse)
void
setContractUVs(boolean value)
void
setQuadOrientation(Direction orientation)
void
setQuadTint(int tint)
void
setTexture(TextureAtlasSprite texture)
-
-
-
Field Detail
-
SIZE
private static final int SIZE
-
unpackedData
private final float[][][] unpackedData
-
tint
private int tint
-
orientation
private Direction orientation
-
texture
private TextureAtlasSprite texture
-
applyDiffuseLighting
private boolean applyDiffuseLighting
-
vertices
private int vertices
-
elements
private int elements
-
full
private boolean full
-
contractUVs
private boolean contractUVs
-
eps
private final float eps
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BakedQuadBuilder
public BakedQuadBuilder()
-
BakedQuadBuilder
public BakedQuadBuilder(TextureAtlasSprite texture)
-
-
Method Detail
-
setContractUVs
public void setContractUVs(boolean value)
-
getVertexFormat
public VertexFormat getVertexFormat()
- Specified by:
getVertexFormat
in interfaceIVertexConsumer
- Returns:
- the format that should be used for passed data.
-
setQuadTint
public void setQuadTint(int tint)
- Specified by:
setQuadTint
in interfaceIVertexConsumer
-
setQuadOrientation
public void setQuadOrientation(Direction orientation)
- Specified by:
setQuadOrientation
in interfaceIVertexConsumer
-
setTexture
public void setTexture(TextureAtlasSprite texture)
- Specified by:
setTexture
in interfaceIVertexConsumer
-
setApplyDiffuseLighting
public void setApplyDiffuseLighting(boolean diffuse)
- Specified by:
setApplyDiffuseLighting
in interfaceIVertexConsumer
-
put
public void put(int element, float... data)
- Specified by:
put
in interfaceIVertexConsumer
-
build
public BakedQuad build()
-
-