Class BakedQuad
java.lang.Object
net.minecraft.client.renderer.block.model.BakedQuad
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Directionprivate final booleanprivate final intprivate final booleanprotected final TextureAtlasSpriteprotected final intprotected final int[]Joined 4 vertex records, each stores packed data according to the VertexFormat of the quad. -
Constructor Summary
ConstructorsConstructorDescriptionBakedQuad(int[] pVerticies, int pTintIndex, Direction pDirection, TextureAtlasSprite pSprite, boolean pShade, int pLightEmission) BakedQuad(int[] pVerticies, int pTintIndex, Direction pDirection, TextureAtlasSprite pSprite, boolean pShade, int pLightEmission, boolean hasAmbientOcclusion) -
Method Summary
Modifier and TypeMethodDescriptionintintint[]booleanReturns false to force-disable AO for this quad or true to use the behavior dictated byIBakedModelExtension.useAmbientOcclusion(net.minecraft.world.level.block.state.BlockState, net.neoforged.neoforge.client.model.data.ModelData, net.minecraft.client.renderer.RenderType).booleanisShade()booleanisTinted()
-
Field Details
-
vertices
protected final int[] verticesJoined 4 vertex records, each stores packed data according to the VertexFormat of the quad. Vanilla minecraft uses DefaultVertexFormats.BLOCK, Forge uses (usually) ITEM, use BakedQuad.getFormat() to get the correct format. -
tintIndex
protected final int tintIndex -
direction
-
sprite
-
shade
private final boolean shade -
lightEmission
private final int lightEmission -
hasAmbientOcclusion
private final boolean hasAmbientOcclusion
-
-
Constructor Details
-
BakedQuad
public BakedQuad(int[] pVerticies, int pTintIndex, Direction pDirection, TextureAtlasSprite pSprite, boolean pShade, int pLightEmission) -
BakedQuad
public BakedQuad(int[] pVerticies, int pTintIndex, Direction pDirection, TextureAtlasSprite pSprite, boolean pShade, int pLightEmission, boolean hasAmbientOcclusion)
-
-
Method Details
-
getSprite
-
getVertices
public int[] getVertices() -
isTinted
public boolean isTinted() -
getTintIndex
public int getTintIndex() -
getDirection
-
isShade
public boolean isShade() -
getLightEmission
public int getLightEmission() -
hasAmbientOcclusion
public boolean hasAmbientOcclusion()Returns false to force-disable AO for this quad or true to use the behavior dictated byIBakedModelExtension.useAmbientOcclusion(net.minecraft.world.level.block.state.BlockState, net.neoforged.neoforge.client.model.data.ModelData, net.minecraft.client.renderer.RenderType).- Returns:
- false to force-disable AO for this quad or true to use the behavior dictated by
IBakedModelExtension.useAmbientOcclusion(net.minecraft.world.level.block.state.BlockState, net.neoforged.neoforge.client.model.data.ModelData, net.minecraft.client.renderer.RenderType)
-