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 aSelectorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.<O,S extends StateHolder<O, S>>
Predicate<S> instantiate(StateDefinition<O, S> pStateDefinition) final StringtoString()Returns a string representation of this record class.variant()Returns the value of thevariantrecord component.
-
Field Details
-
condition
The field for theconditionrecord component. -
variant
The field for thevariantrecord component. -
CODEC
-
-
Constructor Details
-
Selector
Creates an instance of aSelectorrecord class.- Parameters:
condition- the value for theconditionrecord componentvariant- the value for thevariantrecord component
-
-
Method Details
-
instantiate
public <O,S extends StateHolder<O, Predicate<S> instantiateS>> (StateDefinition<O, S> pStateDefinition) -
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 theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
variant
Returns the value of thevariantrecord component.- Returns:
- the value of the
variantrecord component
-