Record Class Selector
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.multipart.Selector
public record Selector(Optional<Condition> condition, BlockStateModel.Unbaked variant)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSelector
(Optional<Condition> condition, BlockStateModel.Unbaked variant) Creates an instance of aSelector
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecondition
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.<O,
S extends StateHolder<O, S>>
Predicate<S> instantiate
(StateDefinition<O, S> p_404970_) final String
toString()
Returns a string representation of this record class.variant()
Returns the value of thevariant
record component.
-
Field Details
-
condition
The field for thecondition
record component. -
variant
The field for thevariant
record component. -
CODEC
-
-
Constructor Details
-
Selector
Creates an instance of aSelector
record class.- Parameters:
condition
- the value for thecondition
record componentvariant
- the value for thevariant
record component
-
-
Method Details
-
instantiate
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
condition
Returns the value of thecondition
record component.- Returns:
- the value of the
condition
record component
-
variant
Returns the value of thevariant
record component.- Returns:
- the value of the
variant
record component
-