Package net.minecraft.state
Class StateHolder<O,S>
java.lang.Object
net.minecraft.state.StateHolder<O,S>
- Direct Known Subclasses:
AbstractBlock.AbstractBlockState
,FluidState
-
Field Summary
Modifier and TypeFieldDescriptionprivate com.google.common.collect.Table<Property<?>,
Comparable<?>, S> protected final O
protected final com.mojang.serialization.MapCodec<S>
private static final Function<Map.Entry<Property<?>,
Comparable<?>>, String> private final com.google.common.collect.ImmutableMap<Property<?>,
Comparable<?>> -
Constructor Summary
ModifierConstructorDescriptionprotected
StateHolder
(O p_i231879_1_, com.google.common.collect.ImmutableMap<Property<?>, Comparable<?>> p_i231879_2_, com.mojang.serialization.MapCodec<S> p_i231879_3_) -
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_235898_0_, T p_235898_1_) <T extends Comparable<T>>
Optional<T>getOptionalValue
(Property<T> p_235903_1_) Collection<Property<?>>
<T extends Comparable<T>>
Tcom.google.common.collect.ImmutableMap<Property<?>,
Comparable<?>> <T extends Comparable<T>>
booleanhasProperty
(Property<T> p_235901_1_) private Map<Property<?>,
Comparable<?>> makeNeighbourValues
(Property<?> p_235902_1_, Comparable<?> p_235902_2_) void
populateNeighbours
(Map<Map<Property<?>, Comparable<?>>, S> p_235899_1_) <T extends Comparable<T>,
V extends T>
StoString()
-
Field Details
-
PROPERTY_ENTRY_TO_STRING_FUNCTION
private static final Function<Map.Entry<Property<?>,Comparable<?>>, PROPERTY_ENTRY_TO_STRING_FUNCTIONString> -
owner
-
values
-
neighbours
-
propertiesCodec
-
-
Constructor Details
-
StateHolder
protected StateHolder(O p_i231879_1_, com.google.common.collect.ImmutableMap<Property<?>, Comparable<?>> p_i231879_2_, com.mojang.serialization.MapCodec<S> p_i231879_3_)
-
-
Method Details
-
cycle
-
findNextInCollection
-
toString
-
getProperties
-
hasProperty
-
getValue
-
getOptionalValue
-
setValue
-
populateNeighbours
-
makeNeighbourValues
private Map<Property<?>,Comparable<?>> makeNeighbourValues(Property<?> p_235902_1_, Comparable<?> p_235902_2_) -
getValues
-
codec
protected static <O,S extends StateHolder<O, com.mojang.serialization.Codec<S> codecS>> (com.mojang.serialization.Codec<O> p_235897_0_, Function<O, S> p_235897_1_)
-