Record Class Variant.SimpleModelState
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.Variant.SimpleModelState
- Enclosing class:
Variant
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Variant.SimpleModelStatestatic final com.mojang.serialization.MapCodec<Variant.SimpleModelState> private final booleanThe field for theuvLockrecord component.private final QuadrantThe field for thexrecord component.private final QuadrantThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSimpleModelState(Quadrant x, Quadrant y, boolean uvLock) Creates an instance of aSimpleModelStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.booleanuvLock()Returns the value of theuvLockrecord component.withUvLock(boolean pUvLock) x()Returns the value of thexrecord component.y()Returns the value of theyrecord component.
-
Field Details
-
x
The field for thexrecord component. -
y
The field for theyrecord component. -
uvLock
private final boolean uvLockThe field for theuvLockrecord component. -
MAP_CODEC
-
DEFAULT
-
-
Constructor Details
-
SimpleModelState
Creates an instance of aSimpleModelStaterecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentuvLock- the value for theuvLockrecord component
-
-
Method Details
-
asModelState
-
withX
-
withY
-
withUvLock
-
toString
Returns 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. -
hashCode
public 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. -
equals
Indicates 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
x
Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
uvLock
public boolean uvLock()Returns the value of theuvLockrecord component.- Returns:
- the value of the
uvLockrecord component
-