Class StateHolder<O,S>
java.lang.Object
net.minecraft.world.level.block.state.StateHolder<O,S>
- Direct Known Subclasses:
BlockBehaviour.BlockStateBase
,FluidState
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
private com.google.common.collect.Table
<Property<?>, Comparable<?>, S> protected final O
static final String
protected final com.mojang.serialization.MapCodec
<S> private static final Function
<Map.Entry<Property<?>, Comparable<?>>, String> private final it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap
<Property<?>, Comparable<?>> -
Constructor Summary
ModifierConstructorDescriptionprotected
StateHolder
(O p_61117_, it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap<Property<?>, Comparable<?>> p_331170_, com.mojang.serialization.MapCodec<S> p_61119_) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <O,
S extends StateHolder<O, S>>
com.mojang.serialization.Codec<S> <T extends Comparable<T>>
Sprotected static <T> T
findNextInCollection
(Collection<T> p_61131_, T p_61132_) <T extends Comparable<T>>
Optional<T> getOptionalValue
(Property<T> p_61146_) Collection
<Property<?>> <T extends Comparable<T>>
TMap
<Property<?>, Comparable<?>> <T extends Comparable<T>>
booleanhasProperty
(Property<T> p_61139_) private Map
<Property<?>, Comparable<?>> makeNeighbourValues
(Property<?> p_61141_, Comparable<?> p_61142_) void
populateNeighbours
(Map<Map<Property<?>, Comparable<?>>, S> p_61134_) <T extends Comparable<T>,
V extends T>
StoString()
<T extends Comparable<T>,
V extends T>
StrySetValue
(Property<T> p_263324_, V p_263334_)
-
Field Details
-
NAME_TAG
- See Also:
-
PROPERTIES_TAG
- See Also:
-
PROPERTY_ENTRY_TO_STRING_FUNCTION
private static final Function<Map.Entry<Property<?>,Comparable<?>>, PROPERTY_ENTRY_TO_STRING_FUNCTIONString> -
owner
-
values
private final it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap<Property<?>,Comparable<?>> values -
neighbours
-
propertiesCodec
-
-
Constructor Details
-
StateHolder
protected StateHolder(O p_61117_, it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap<Property<?>, Comparable<?>> p_331170_, com.mojang.serialization.MapCodec<S> p_61119_)
-
-
Method Details
-
cycle
-
findNextInCollection
-
toString
-
getProperties
-
hasProperty
-
getValue
-
getOptionalValue
-
setValue
-
trySetValue
-
populateNeighbours
-
makeNeighbourValues
private Map<Property<?>,Comparable<?>> makeNeighbourValues(Property<?> p_61141_, Comparable<?> p_61142_) -
getValues
-
codec
protected static <O,S extends StateHolder<O, com.mojang.serialization.Codec<S> codecS>> (com.mojang.serialization.Codec<O> p_61128_, Function<O, S> p_61129_)
-