Package codechicken.lib.render
Class BakedVertexSource
java.lang.Object
codechicken.lib.render.BakedVertexSource
- All Implemented Interfaces:
IVertexConsumer,IVertexSource
Created by covers1624 on 12/5/20.
-
Method Summary
Modifier and TypeMethodDescriptionintDeprecated, for removal: This API element is subject to removal in a future version.<T> TgetAttribute(AttributeKey<T> attr) Gets an attribute from thisIVertexSource.intThe number of vertices available in the model.com.mojang.blaze3d.vertex.VertexFormatVertex5[]The vertices for this model.booleanhasAttribute(AttributeKey<?> attr) Returnstrueif the specified attribute is provided by thisIVertexSource.static BakedVertexSourceinstance()voidprepareVertex(CCRenderState ccrs) Called before the pipeline processes a vertex.voidput(int element, float... data) voidAssumes the data is already completely unpacked.voidreset()voidreset(CachedFormat format) voidsetApplyDiffuseLighting(boolean diffuse) voidsetQuadOrientation(net.minecraft.core.Direction orientation) voidsetQuadTint(int tint) voidsetTexture(net.minecraft.client.renderer.texture.TextureAtlasSprite texture) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface codechicken.lib.model.IVertexConsumer
put
-
Method Details
-
instance
-
getVertices
Description copied from interface:IVertexSourceThe vertices for this model.- Specified by:
getVerticesin interfaceIVertexSource- Returns:
- The Vertices.
-
getVertexCount
public int getVertexCount()Description copied from interface:IVertexSourceThe number of vertices available in the model. By default, this method just returns the length of the @link #getVertices()} array.- Specified by:
getVertexCountin interfaceIVertexSource- Returns:
- The number of vertices available.
-
getAttribute
Description copied from interface:IVertexSourceGets an attribute from thisIVertexSource.- Specified by:
getAttributein interfaceIVertexSource- Parameters:
attr- The vertex attribute to get- Returns:
- The
Tfor the givenAttributeKeyornullof the Attribute does not exist.
-
hasAttribute
Description copied from interface:IVertexSourceReturnstrueif the specified attribute is provided by thisIVertexSource.The
IVertexSourcewill either return data fromIVertexSource.getAttribute(AttributeKey)or set the state inIVertexSource.prepareVertex(CCRenderState).- Specified by:
hasAttributein interfaceIVertexSource- Returns:
trueif the attribute exists.
-
prepareVertex
Description copied from interface:IVertexSourceCalled before the pipeline processes a vertex.- Specified by:
prepareVertexin interfaceIVertexSource- Parameters:
ccrs- The instance.
-
reset
public void reset() -
reset
-
availableVertices
Deprecated, for removal: This API element is subject to removal in a future version. -
put
Description copied from interface:IVertexConsumerAssumes the data is already completely unpacked. You must always copy the data from the quad provided to an internal cache. basically: this.quad.put(quad);- Specified by:
putin interfaceIVertexConsumer- Parameters:
quad- The quad to copy data from.
-
put
public void put(int element, float... data) - Specified by:
putin interfaceIVertexConsumer
-
getVertexFormat
public com.mojang.blaze3d.vertex.VertexFormat getVertexFormat()- Specified by:
getVertexFormatin interfaceIVertexConsumer
-
setQuadTint
public void setQuadTint(int tint) - Specified by:
setQuadTintin interfaceIVertexConsumer
-
setQuadOrientation
public void setQuadOrientation(net.minecraft.core.Direction orientation) - Specified by:
setQuadOrientationin interfaceIVertexConsumer
-
setApplyDiffuseLighting
public void setApplyDiffuseLighting(boolean diffuse) - Specified by:
setApplyDiffuseLightingin interfaceIVertexConsumer
-
setTexture
public void setTexture(net.minecraft.client.renderer.texture.TextureAtlasSprite texture) - Specified by:
setTexturein interfaceIVertexConsumer
-