记录类 ForgeFaceData
java.lang.Object
java.lang.Record
net.minecraftforge.client.model.ForgeFaceData
- 记录组件:
color
- Color in ARGB formatblockLight
- Block Light for this face from 0-15 (inclusive)skyLight
- Sky Light for this face from 0-15 (inclusive)ambientOcclusion
- If this face has AOcalculateNormals
- 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
-
字段概要
字段修饰符和类型字段说明private final boolean
ambientOcclusion
记录组件的字段。private final int
blockLight
记录组件的字段。private final boolean
calculateNormals
记录组件的字段。static final com.mojang.serialization.Codec
<ForgeFaceData> private final int
color
记录组件的字段。static final com.mojang.serialization.Codec
<Integer> static final ForgeFaceData
private final int
skyLight
记录组件的字段。 -
构造器概要
构造器构造器说明ForgeFaceData
(int color, int blockLight, int skyLight, boolean ambientOcclusion) ForgeFaceData
(int color, int blockLight, int skyLight, boolean ambientOcclusion, boolean calculateNormals) 创建ForgeFaceData
记录类的实例。 -
方法概要
修饰符和类型方法说明boolean
返回ambientOcclusion
记录组件的值。int
返回blockLight
记录组件的值。boolean
返回calculateNormals
记录组件的值。int
color()
返回color
记录组件的值。final boolean
指示某个其他对象是否“等于”此对象。final int
hashCode()
返回此对象的哈希代码值。static ForgeFaceData
read
(com.google.gson.JsonElement obj, ForgeFaceData fallback) Parses a ForgeFaceData from JSONint
skyLight()
返回skyLight
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。
-
字段详细资料
-
color
private final int colorcolor
记录组件的字段。 -
blockLight
private final int blockLightblockLight
记录组件的字段。 -
skyLight
private final int skyLightskyLight
记录组件的字段。 -
ambientOcclusion
private final boolean ambientOcclusionambientOcclusion
记录组件的字段。 -
calculateNormals
private final boolean calculateNormalscalculateNormals
记录组件的字段。 -
DEFAULT
-
COLOR
-
CODEC
-
-
构造器详细资料
-
ForgeFaceData
public ForgeFaceData(int color, int blockLight, int skyLight, boolean ambientOcclusion) -
ForgeFaceData
public ForgeFaceData(int color, int blockLight, int skyLight, boolean ambientOcclusion, boolean calculateNormals) 创建ForgeFaceData
记录类的实例。- 参数:
color
-color
记录组件的值blockLight
-blockLight
记录组件的值skyLight
-skyLight
记录组件的值ambientOcclusion
-ambientOcclusion
记录组件的值calculateNormals
-calculateNormals
记录组件的值
-
-
方法详细资料
-
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- 参数:
obj
- The JsonObject to parse from, weakly-typed to JsonElement to reduce logic complexity.fallback
- What to return if the first parameter is null.- 返回:
- The parsed ForgeFaceData, or the fallback parameter if the first parmeter is null.
- 抛出:
com.google.gson.JsonParseException
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用 '==' 进行比较。 -
color
public int color()返回color
记录组件的值。- 返回:
color
记录组件的值
-
blockLight
public int blockLight()返回blockLight
记录组件的值。- 返回:
blockLight
记录组件的值
-
skyLight
public int skyLight()返回skyLight
记录组件的值。- 返回:
skyLight
记录组件的值
-
ambientOcclusion
public boolean ambientOcclusion()返回ambientOcclusion
记录组件的值。- 返回:
ambientOcclusion
记录组件的值
-
calculateNormals
public boolean calculateNormals()返回calculateNormals
记录组件的值。- 返回:
calculateNormals
记录组件的值
-