Class BakedQuad
java.lang.Object
net.minecraft.client.renderer.block.model.BakedQuad
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Direction
private final boolean
private final boolean
protected final TextureAtlasSprite
protected final int
protected final int[]
Joined 4 vertex records, each stores packed data according to the VertexFormat of the quad. -
Constructor Summary
ConstructorsConstructorDescriptionBakedQuad
(int[] pVertices, int pTintIndex, Direction pDirection, TextureAtlasSprite pSprite, boolean pShade) BakedQuad
(int[] pVertices, int pTintIndex, Direction pDirection, TextureAtlasSprite pSprite, boolean pShade, boolean hasAmbientOcclusion) -
Method Summary
Modifier and TypeMethodDescriptionint
int[]
boolean
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)
.boolean
isShade()
boolean
isTinted()
-
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 -
hasAmbientOcclusion
private final boolean hasAmbientOcclusion
-
-
Constructor Details
-
BakedQuad
public BakedQuad(int[] pVertices, int pTintIndex, Direction pDirection, TextureAtlasSprite pSprite, boolean pShade) -
BakedQuad
public BakedQuad(int[] pVertices, int pTintIndex, Direction pDirection, TextureAtlasSprite pSprite, boolean pShade, boolean hasAmbientOcclusion)
-
-
Method Details
-
getSprite
-
getVertices
public int[] getVertices() -
isTinted
public boolean isTinted() -
getTintIndex
public int getTintIndex() -
getDirection
-
isShade
public boolean isShade() -
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)
-