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> definition) final StringtoString()Returns a string representation of this record class.variant()Returns the value of thevariantrecord component.
-
Field Details
-
condition
-
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
-
toString
-
hashCode
-
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
-
variant
Returns the value of thevariantrecord component.- Returns:
- the value of the
variantrecord component
-