Record Class StateDefinition.StateCollection<S extends StateHolder<?,?> >
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.state.StateDefinition.StateCollection<S>
- Enclosing class:
StateDefinition<O, S extends StateHolder<O,S>>
static record StateDefinition.StateCollection<S extends StateHolder<?,?>> (Map<List<Comparable<?>>, S extends StateHolder<?,?>> statesByValues, Map<List<Comparable<?>>, S extends StateHolder<?,?>[]> statesByPivotCache)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<List<Comparable<?>>, S[]> The field for thestatesByPivotCacherecord component.private final Map<List<Comparable<?>>, S> The field for thestatesByValuesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStateCollection(Map<List<Comparable<?>>, S> statesByValues, Map<List<Comparable<?>>, S[]> statesByPivotCache) Creates an instance of aStateCollectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionprivate <T extends Comparable<T>>
S[]computeStatesForPivot(List<Comparable<?>> valuesKey, Property<T> pivot, int pivotIndex) final booleanIndicates whether some other object is "equal to" this one.S[][]fillNeighborsForState(Property<?>[] propertyKeys, List<Comparable<?>> propertyValues) private <T extends Comparable<T>>
S[]fillStatesForPivot(List<Comparable<?>> valuesKey, Property<T> pivot, int pivotIndex) final inthashCode()Returns a hash code value for this object.Map<List<Comparable<?>>, S[]> Returns the value of thestatesByPivotCacherecord component.Map<List<Comparable<?>>, S> Returns the value of thestatesByValuesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
statesByValues
The field for thestatesByValuesrecord component. -
statesByPivotCache
The field for thestatesByPivotCacherecord component.
-
-
Constructor Details
-
StateCollection
StateCollection(Map<List<Comparable<?>>, S> statesByValues, Map<List<Comparable<?>>, S[]> statesByPivotCache) Creates an instance of aStateCollectionrecord class.- Parameters:
statesByValues- the value for thestatesByValuesrecord componentstatesByPivotCache- the value for thestatesByPivotCacherecord component
-
-
Method Details
-
fillNeighborsForState
-
fillStatesForPivot
private <T extends Comparable<T>> S[] fillStatesForPivot(List<Comparable<?>> valuesKey, Property<T> pivot, int pivotIndex) -
computeStatesForPivot
private <T extends Comparable<T>> S[] computeStatesForPivot(List<Comparable<?>> valuesKey, Property<T> pivot, int pivotIndex) -
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). -
statesByValues
Returns the value of thestatesByValuesrecord component.- Returns:
- the value of the
statesByValuesrecord component
-
statesByPivotCache
Returns the value of thestatesByPivotCacherecord component.- Returns:
- the value of the
statesByPivotCacherecord component
-