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 String
private com.google.common.collect.Table<Property<?>,Comparable<?>,S>
protected O
static String
protected com.mojang.serialization.MapCodec<S>
private static Function<Map.Entry<Property<?>,Comparable<?>>,String>
private com.google.common.collect.ImmutableMap<Property<?>,Comparable<?>>
-
Constructor Summary
ModifierConstructorDescriptionprotected
StateHolder(O p_61117_, com.google.common.collect.ImmutableMap<Property<?>,Comparable<?>> p_61118_, 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>>
Tcom.google.common.collect.ImmutableMap<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()
-
Field Details
-
NAME_TAG
- See Also:
- Constant Field Values
-
PROPERTIES_TAG
- See Also:
- Constant Field Values
-
PROPERTY_ENTRY_TO_STRING_FUNCTION
private static final Function<Map.Entry<Property<?>,Comparable<?>>,String> PROPERTY_ENTRY_TO_STRING_FUNCTION -
owner
-
values
-
neighbours
-
propertiesCodec
-
-
Constructor Details
-
StateHolder
protected StateHolder(O p_61117_, com.google.common.collect.ImmutableMap<Property<?>,Comparable<?>> p_61118_, com.mojang.serialization.MapCodec<S> p_61119_)
-
-
Method Details
-
cycle
-
findNextInCollection
-
toString
-
getProperties
-
hasProperty
-
getValue
-
getOptionalValue
-
setValue
-
populateNeighbours
-
makeNeighbourValues
private Map<Property<?>,Comparable<?>> makeNeighbourValues(Property<?> p_61141_, Comparable<?> p_61142_) -
getValues
-
codec
protected static <O, S extends StateHolder<O, S>> com.mojang.serialization.Codec<S> codec(com.mojang.serialization.Codec<O> p_61128_, Function<O,S> p_61129_)
-