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 booleanapplyDiffuseLightingprivate booleancontractUVsprivate intelementsprivate floatepsprivate booleanfullprivate Directionorientationprivate static intSIZEprivate TextureAtlasSpritetextureprivate inttintprivate float[][][]unpackedDataprivate intvertices
-
Constructor Summary
Constructors Constructor Description BakedQuadBuilder()BakedQuadBuilder(TextureAtlasSprite texture)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BakedQuadbuild()VertexFormatgetVertexFormat()voidput(int element, float... data)voidsetApplyDiffuseLighting(boolean diffuse)voidsetContractUVs(boolean value)voidsetQuadOrientation(Direction orientation)voidsetQuadTint(int tint)voidsetTexture(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:
getVertexFormatin interfaceIVertexConsumer- Returns:
- the format that should be used for passed data.
-
setQuadTint
public void setQuadTint(int tint)
- Specified by:
setQuadTintin interfaceIVertexConsumer
-
setQuadOrientation
public void setQuadOrientation(Direction orientation)
- Specified by:
setQuadOrientationin interfaceIVertexConsumer
-
setTexture
public void setTexture(TextureAtlasSprite texture)
- Specified by:
setTexturein interfaceIVertexConsumer
-
setApplyDiffuseLighting
public void setApplyDiffuseLighting(boolean diffuse)
- Specified by:
setApplyDiffuseLightingin interfaceIVertexConsumer
-
put
public void put(int element, float... data)- Specified by:
putin interfaceIVertexConsumer
-
build
public BakedQuad build()
-
-