Package net.minecraftforge.client.model
Record Class ForgeFaceData
java.lang.Object
java.lang.Record
net.minecraftforge.client.model.ForgeFaceData
- Record Components:
- color- Color in ARGB format
- blockLight- Block Light for this face from 0-15 (inclusive)
- skyLight- Sky Light for this face from 0-15 (inclusive)
- ambientOcclusion- If this face has AO
- calculateNormals- If we should manually calculate the normals for this block or inherit facing normals like vanilla
public record ForgeFaceData(int color, int blockLight, int skyLight, boolean ambientOcclusion, boolean calculateNormals)
extends Record
Holds extra data that may be injected into a face.
 Used by ItemLayerModel, BlockElement and BlockElementFace
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theambientOcclusionrecord component.private final intThe field for theblockLightrecord component.private final booleanThe field for thecalculateNormalsrecord component.static final com.mojang.serialization.Codec<ForgeFaceData>private final intThe field for thecolorrecord component.static final com.mojang.serialization.Codec<Integer>static final ForgeFaceDataprivate final intThe field for theskyLightrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionForgeFaceData(int color, int blockLight, int skyLight, boolean ambientOcclusion) ForgeFaceData(int color, int blockLight, int skyLight, boolean ambientOcclusion, boolean calculateNormals) Creates an instance of aForgeFaceDatarecord class.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns the value of theambientOcclusionrecord component.intReturns the value of theblockLightrecord component.booleanReturns the value of thecalculateNormalsrecord component.intcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ForgeFaceDataread(com.google.gson.JsonElement obj, ForgeFaceData fallback) Parses a ForgeFaceData from JSONintskyLight()Returns the value of theskyLightrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
colorprivate final int colorThe field for thecolorrecord component.
- 
blockLightprivate final int blockLightThe field for theblockLightrecord component.
- 
skyLightprivate final int skyLightThe field for theskyLightrecord component.
- 
ambientOcclusionprivate final boolean ambientOcclusionThe field for theambientOcclusionrecord component.
- 
calculateNormalsprivate final boolean calculateNormalsThe field for thecalculateNormalsrecord component.
- 
DEFAULT
- 
COLOR
- 
CODEC
 
- 
- 
Constructor Details- 
ForgeFaceDatapublic ForgeFaceData(int color, int blockLight, int skyLight, boolean ambientOcclusion) 
- 
ForgeFaceDatapublic ForgeFaceData(int color, int blockLight, int skyLight, boolean ambientOcclusion, boolean calculateNormals) Creates an instance of aForgeFaceDatarecord class.- Parameters:
- color- the value for the- colorrecord component
- blockLight- the value for the- blockLightrecord component
- skyLight- the value for the- skyLightrecord component
- ambientOcclusion- the value for the- ambientOcclusionrecord component
- calculateNormals- the value for the- calculateNormalsrecord component
 
 
- 
- 
Method Details- 
read@Nullable public static ForgeFaceData read(@Nullable com.google.gson.JsonElement obj, @Nullable ForgeFaceData fallback) throws com.google.gson.JsonParseException Parses a ForgeFaceData from JSON- Parameters:
- obj- The JsonObject to parse from, weakly-typed to JsonElement to reduce logic complexity.
- fallback- What to return if the first parameter is null.
- Returns:
- The parsed ForgeFaceData, or the fallback parameter if the first parmeter is null.
- Throws:
- com.google.gson.JsonParseException
 
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
- 
colorpublic int color()Returns the value of thecolorrecord component.- Returns:
- the value of the colorrecord component
 
- 
blockLightpublic int blockLight()Returns the value of theblockLightrecord component.- Returns:
- the value of the blockLightrecord component
 
- 
skyLightpublic int skyLight()Returns the value of theskyLightrecord component.- Returns:
- the value of the skyLightrecord component
 
- 
ambientOcclusionpublic boolean ambientOcclusion()Returns the value of theambientOcclusionrecord component.- Returns:
- the value of the ambientOcclusionrecord component
 
- 
calculateNormalspublic boolean calculateNormals()Returns the value of thecalculateNormalsrecord component.- Returns:
- the value of the calculateNormalsrecord component
 
 
-