net.minecraft.state

public abstract class State<O, S>

net.minecraft.world.level.block.state.StateHolder
net.minecraft.class_2688
net.minecraft.state.State

Field summary

Modifier and TypeField
private static final int
VALUE_NOT_FOUND
field_1_2479
field_1_2479
public static final String
NAME_TAG
field_31385
NAME
public static final String
PROPERTIES_TAG
field_31386
PROPERTIES
protected final O
owner
field_24739
owner
private final Property<?>[]
propertyKeys
field_1_2480
properties
private final Comparable<?>[]
propertyValues
field_1_2481
values
private S[][]
neighbors
field_24741
withMap
static final boolean
$assertionsDisabled
field_1_2478
field_1_2478

Constructor summary

ModifierConstructor
protected (O owner, Property<?>[] properties, Comparable<?>[] values)

Method summary

Modifier and TypeMethod
public <T extends Comparable<T>> S
cycle(Property<T> property)
method_28493(class_2769<T> arg0)
cycle(Property<T> property)
protected static <T> T
findNextInCollection(List<T> values, T current)
method_28495(List<T> arg0, T arg1)
getNext(List<T> values, T value)
public Collection<Property<?>>
getProperties()
method_28501()
getProperties()
private int
valueIndex(Property<?> property)
method_1_2998(class_2769<?> arg0)
indexOfProperty(Property<?> property)
public boolean
hasProperty(Property<?> property)
method_28498(class_2769<?> arg0)
contains(Property<?> property)
private <T extends Comparable<T>> T
getNullableValue(Property<T> property)
method_61768(class_2769<T> arg0)
getNullable(Property<T> property)
public <T extends Comparable<T>> T
getValue(Property<T> property)
method_11654(class_2769<T> arg0)
get(Property<T> property)
public <T extends Comparable<T>> Optional<T>
getOptionalValue(Property<T> property)
method_28500(class_2769<T> arg0)
getOrEmpty(Property<T> property)
public <T extends Comparable<T>> T
getValueOrElse(Property<T> property, T defaultValue)
method_61767(class_2769<T> arg0, T arg1)
get(Property<T> property, T fallback)
public <T extends Comparable<T>, V extends T> S
setValue(Property<T> property, V value)
method_11657(class_2769<T> arg0, V arg1)
with(Property<T> property, V value)
public <T extends Comparable<T>, V extends T> S
trySetValue(Property<T> property, V value)
method_47968(class_2769<T> arg0, V arg1)
withIfExists(Property<T> property, V value)
private <T extends Comparable<T>, V extends T> S
setValueInternal(Property<T> property, int propertyIndex, V value)
method_64216(class_2769<T> arg0, int arg1, V arg2)
with(Property<T> property, int propertyIndex, V newValue)
void
initializeNeighbors(S[][] neighbors)
method_1_2994(S[][] arg0)
setWithMap(S[][] withMap)
public boolean
isSingletonState()
method_1_2995()
hasNoProperties()
public Stream<Property$Value<?>>
getValues()
method_1_2993()
propertyValues()
private static <T extends Comparable<T>> Property$Value<T>
createValue(Property<T> propertyKey, Comparable<?> propertyValue)
method_1_2992(class_2769<T> arg0, Comparable<?> arg1)
propertyValue(Property<T> property, Comparable<?> value)
protected static <O, S extends State<O, S>> com.mojang.serialization.Codec<S>
codec(com.mojang.serialization.Codec<O> ownerCodec, Function<O, S> defaultState, Function<O, StateDefinition<O, S>> stateDefinition)
method_28494(com.mojang.serialization.Codec<O> arg0, Function<O, S> arg1, Function<O, class_2689<O, S>> arg2)
createCodec(com.mojang.serialization.Codec<O> codec, Function<O, S> defaultStateGetter, Function<O, StateManager<O, S>> stateManagerGetter)
private static com.mojang.serialization.MapCodec
lambda$codec$1(Function arg0, Function arg1, Object arg2)
method_1_2996(Function arg0, Function arg1, Object arg2)
method_1_2996(Function arg0, Function arg1, Object state)
private static State
lambda$codec$2(StateHolder arg0, Optional arg1)
method_38860(class_2688 arg0, Optional arg1)
method_38860(State arg0, Optional state)
private static Object
lambda$codec$0(StateHolder arg0)
method_28492(class_2688 arg0)
method_28492(State state)
private Property$Value
lambda$getValues$0(int arg0)
method_1_2997(int arg0)
method_1_2997(int i)