类 State<O,S>
- java.lang.Object
-
- net.minecraft.state.State<O,S>
-
public abstract class State<O,S> extends Object
- Mappings:
Namespace Name official cjtintermediary net/minecraft/class_2688named net/minecraft/state/State
-
-
字段概要
字段 修饰符和类型 字段 说明 protected com.mojang.serialization.MapCodec<S>codecprivate ImmutableMap<Property<?>,Comparable<?>>entriesstatic StringNAMEprotected Oownerstatic StringPROPERTIESprivate static Function<Map.Entry<Property<?>,Comparable<?>>,String>PROPERTY_MAP_PRINTERprivate Table<Property<?>,Comparable<?>,S>withTable
-
构造器概要
构造器 限定符 构造器 说明 protectedState(O owner, ImmutableMap<Property<?>,Comparable<?>> entries, com.mojang.serialization.MapCodec<S> codec)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 <T extends Comparable<T>>
booleancontains(Property<T> property)protected static <O,S extends State<O,S>>
com.mojang.serialization.Codec<S>createCodec(com.mojang.serialization.Codec<O> codec, Function<O,S> ownerToStateFunction)voidcreateWithTable(Map<Map<Property<?>,Comparable<?>>,S> states)<T extends Comparable<T>>
Scycle(Property<T> property)<T extends Comparable<T>>
Tget(Property<T> property)ImmutableMap<Property<?>,Comparable<?>>getEntries()protected static <T> TgetNext(Collection<T> values, T value)<T extends Comparable<T>>
Optional<T>getOrEmpty(Property<T> property)Collection<Property<?>>getProperties()private Map<Property<?>,Comparable<?>>toMapWith(Property<?> property, Comparable<?> value)StringtoString()<T extends Comparable<T>,V extends T>
Swith(Property<T> property, V value)
-
-
-
字段详细资料
-
NAME
public static final String NAME
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official cLcjt;c:Ljava/lang/String;intermediary field_31385Lnet/minecraft/class_2688;field_31385:Ljava/lang/String;named NAMELnet/minecraft/state/State;NAME:Ljava/lang/String;
-
PROPERTIES
public static final String PROPERTIES
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official dLcjt;d:Ljava/lang/String;intermediary field_31386Lnet/minecraft/class_2688;field_31386:Ljava/lang/String;named PROPERTIESLnet/minecraft/state/State;PROPERTIES:Ljava/lang/String;
-
PROPERTY_MAP_PRINTER
private static final Function<Map.Entry<Property<?>,Comparable<?>>,String> PROPERTY_MAP_PRINTER
- Mappings:
Namespace Name Mixin selector official aLcjt;a:Ljava/util/function/Function;intermediary field_24737Lnet/minecraft/class_2688;field_24737:Ljava/util/function/Function;named PROPERTY_MAP_PRINTERLnet/minecraft/state/State;PROPERTY_MAP_PRINTER:Ljava/util/function/Function;
-
owner
protected final O owner
- Mappings:
Namespace Name Mixin selector official eLcjt;e:Ljava/lang/Object;intermediary field_24739Lnet/minecraft/class_2688;field_24739:Ljava/lang/Object;named ownerLnet/minecraft/state/State;owner:Ljava/lang/Object;
-
entries
private final ImmutableMap<Property<?>,Comparable<?>> entries
- Mappings:
Namespace Name Mixin selector official bLcjt;b:Lcom/google/common/collect/ImmutableMap;intermediary field_24738Lnet/minecraft/class_2688;field_24738:Lcom/google/common/collect/ImmutableMap;named entriesLnet/minecraft/state/State;entries:Lcom/google/common/collect/ImmutableMap;
-
withTable
private Table<Property<?>,Comparable<?>,S> withTable
- Mappings:
Namespace Name Mixin selector official gLcjt;g:Lcom/google/common/collect/Table;intermediary field_24741Lnet/minecraft/class_2688;field_24741:Lcom/google/common/collect/Table;named withTableLnet/minecraft/state/State;withTable:Lcom/google/common/collect/Table;
-
codec
protected final com.mojang.serialization.MapCodec<S> codec
- Mappings:
Namespace Name Mixin selector official fLcjt;f:Lcom/mojang/serialization/MapCodec;intermediary field_24740Lnet/minecraft/class_2688;field_24740:Lcom/mojang/serialization/MapCodec;named codecLnet/minecraft/state/State;codec:Lcom/mojang/serialization/MapCodec;
-
-
构造器详细资料
-
State
protected State(O owner, ImmutableMap<Property<?>,Comparable<?>> entries, com.mojang.serialization.MapCodec<S> codec)
- Mappings:
Namespace Name Mixin selector official <init>Lcjt;<init>(Ljava/lang/Object;Lcom/google/common/collect/ImmutableMap;Lcom/mojang/serialization/MapCodec;)Vintermediary <init>Lnet/minecraft/class_2688;<init>(Ljava/lang/Object;Lcom/google/common/collect/ImmutableMap;Lcom/mojang/serialization/MapCodec;)Vnamed <init>Lnet/minecraft/state/State;<init>(Ljava/lang/Object;Lcom/google/common/collect/ImmutableMap;Lcom/mojang/serialization/MapCodec;)V
-
-
方法详细资料
-
cycle
public <T extends Comparable<T>> S cycle(Property<T> property)
- Mappings:
Namespace Name Mixin selector official aLcjt;a(Lcku;)Ljava/lang/Object;intermediary method_28493Lnet/minecraft/class_2688;method_28493(Lnet/minecraft/class_2769;)Ljava/lang/Object;named cycleLnet/minecraft/state/State;cycle(Lnet/minecraft/state/property/Property;)Ljava/lang/Object;
-
getNext
protected static <T> T getNext(Collection<T> values, T value)
- Mappings:
Namespace Name Mixin selector official aLcjt;a(Ljava/util/Collection;Ljava/lang/Object;)Ljava/lang/Object;intermediary method_28495Lnet/minecraft/class_2688;method_28495(Ljava/util/Collection;Ljava/lang/Object;)Ljava/lang/Object;named getNextLnet/minecraft/state/State;getNext(Ljava/util/Collection;Ljava/lang/Object;)Ljava/lang/Object;
-
toString
public String toString()
-
getProperties
public Collection<Property<?>> getProperties()
- Mappings:
Namespace Name Mixin selector official sLcjt;s()Ljava/util/Collection;intermediary method_28501Lnet/minecraft/class_2688;method_28501()Ljava/util/Collection;named getPropertiesLnet/minecraft/state/State;getProperties()Ljava/util/Collection;
-
contains
public <T extends Comparable<T>> boolean contains(Property<T> property)
- Mappings:
Namespace Name Mixin selector official bLcjt;b(Lcku;)Zintermediary method_28498Lnet/minecraft/class_2688;method_28498(Lnet/minecraft/class_2769;)Znamed containsLnet/minecraft/state/State;contains(Lnet/minecraft/state/property/Property;)Z
-
get
public <T extends Comparable<T>> T get(Property<T> property)
- Mappings:
Namespace Name Mixin selector official cLcjt;c(Lcku;)Ljava/lang/Comparable;intermediary method_11654Lnet/minecraft/class_2688;method_11654(Lnet/minecraft/class_2769;)Ljava/lang/Comparable;named getLnet/minecraft/state/State;get(Lnet/minecraft/state/property/Property;)Ljava/lang/Comparable;
-
getOrEmpty
public <T extends Comparable<T>> Optional<T> getOrEmpty(Property<T> property)
- Mappings:
Namespace Name Mixin selector official dLcjt;d(Lcku;)Ljava/util/Optional;intermediary method_28500Lnet/minecraft/class_2688;method_28500(Lnet/minecraft/class_2769;)Ljava/util/Optional;named getOrEmptyLnet/minecraft/state/State;getOrEmpty(Lnet/minecraft/state/property/Property;)Ljava/util/Optional;
-
with
public <T extends Comparable<T>,V extends T> S with(Property<T> property, V value)
- Mappings:
Namespace Name Mixin selector official aLcjt;a(Lcku;Ljava/lang/Comparable;)Ljava/lang/Object;intermediary method_11657Lnet/minecraft/class_2688;method_11657(Lnet/minecraft/class_2769;Ljava/lang/Comparable;)Ljava/lang/Object;named withLnet/minecraft/state/State;with(Lnet/minecraft/state/property/Property;Ljava/lang/Comparable;)Ljava/lang/Object;
-
createWithTable
public void createWithTable(Map<Map<Property<?>,Comparable<?>>,S> states)
- Mappings:
Namespace Name Mixin selector official aLcjt;a(Ljava/util/Map;)Vintermediary method_28496Lnet/minecraft/class_2688;method_28496(Ljava/util/Map;)Vnamed createWithTableLnet/minecraft/state/State;createWithTable(Ljava/util/Map;)V
-
toMapWith
private Map<Property<?>,Comparable<?>> toMapWith(Property<?> property, Comparable<?> value)
- Mappings:
Namespace Name Mixin selector official bLcjt;b(Lcku;Ljava/lang/Comparable;)Ljava/util/Map;intermediary method_28499Lnet/minecraft/class_2688;method_28499(Lnet/minecraft/class_2769;Ljava/lang/Comparable;)Ljava/util/Map;named toMapWithLnet/minecraft/state/State;toMapWith(Lnet/minecraft/state/property/Property;Ljava/lang/Comparable;)Ljava/util/Map;
-
getEntries
public ImmutableMap<Property<?>,Comparable<?>> getEntries()
- Mappings:
Namespace Name Mixin selector official tLcjt;t()Lcom/google/common/collect/ImmutableMap;intermediary method_11656Lnet/minecraft/class_2688;method_11656()Lcom/google/common/collect/ImmutableMap;named getEntriesLnet/minecraft/state/State;getEntries()Lcom/google/common/collect/ImmutableMap;
-
createCodec
protected static <O,S extends State<O,S>> com.mojang.serialization.Codec<S> createCodec(com.mojang.serialization.Codec<O> codec, Function<O,S> ownerToStateFunction)
- Mappings:
Namespace Name Mixin selector official aLcjt;a(Lcom/mojang/serialization/Codec;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;intermediary method_28494Lnet/minecraft/class_2688;method_28494(Lcom/mojang/serialization/Codec;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;named createCodecLnet/minecraft/state/State;createCodec(Lcom/mojang/serialization/Codec;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
-
-