Class State<O,S>

java.lang.Object
net.minecraft.state.State<O,S>
Direct Known Subclasses:
AbstractBlock.AbstractBlockState, FluidState

public abstract class State<O,S> extends Object
Mappings:
Namespace Name
named net/minecraft/state/State
intermediary net/minecraft/class_2688
official dxw
  • Field Details

    • NAME

      public static final String NAME
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named NAME Lnet/minecraft/state/State;NAME:Ljava/lang/String;
      intermediary field_31385 Lnet/minecraft/class_2688;field_31385:Ljava/lang/String;
      official b Ldxw;b:Ljava/lang/String;
    • PROPERTIES

      public static final String PROPERTIES
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named PROPERTIES Lnet/minecraft/state/State;PROPERTIES:Ljava/lang/String;
      intermediary field_31386 Lnet/minecraft/class_2688;field_31386:Ljava/lang/String;
      official c Ldxw;c:Ljava/lang/String;
    • PROPERTY_MAP_PRINTER

      private static final Function<Map.Entry<Property<?>,Comparable<?>>,String> PROPERTY_MAP_PRINTER
      Mappings:
      Namespace Name Mixin selector
      named PROPERTY_MAP_PRINTER Lnet/minecraft/state/State;PROPERTY_MAP_PRINTER:Ljava/util/function/Function;
      intermediary field_24737 Lnet/minecraft/class_2688;field_24737:Ljava/util/function/Function;
      official a Ldxw;a:Ljava/util/function/Function;
    • owner

      protected final O owner
      Mappings:
      Namespace Name Mixin selector
      named owner Lnet/minecraft/state/State;owner:Ljava/lang/Object;
      intermediary field_24739 Lnet/minecraft/class_2688;field_24739:Ljava/lang/Object;
      official d Ldxw;d:Ljava/lang/Object;
    • propertyMap

      private final Reference2ObjectArrayMap<Property<?>,Comparable<?>> propertyMap
      Mappings:
      Namespace Name Mixin selector
      named propertyMap Lnet/minecraft/state/State;propertyMap:Lit/unimi/dsi/fastutil/objects/Reference2ObjectArrayMap;
      intermediary field_24738 Lnet/minecraft/class_2688;field_24738:Lit/unimi/dsi/fastutil/objects/Reference2ObjectArrayMap;
      official f Ldxw;f:Lit/unimi/dsi/fastutil/objects/Reference2ObjectArrayMap;
    • withMap

      private Map<Property<?>,S[]> withMap
      Mappings:
      Namespace Name Mixin selector
      named withMap Lnet/minecraft/state/State;withMap:Ljava/util/Map;
      intermediary field_24741 Lnet/minecraft/class_2688;field_24741:Ljava/util/Map;
      official g Ldxw;g:Ljava/util/Map;
    • codec

      protected final com.mojang.serialization.MapCodec<S> codec
      Mappings:
      Namespace Name Mixin selector
      named codec Lnet/minecraft/state/State;codec:Lcom/mojang/serialization/MapCodec;
      intermediary field_24740 Lnet/minecraft/class_2688;field_24740:Lcom/mojang/serialization/MapCodec;
      official e Ldxw;e:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

    • State

      protected State(O owner, Reference2ObjectArrayMap<Property<?>,Comparable<?>> propertyMap, com.mojang.serialization.MapCodec<S> codec)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/state/State;<init>(Ljava/lang/Object;Lit/unimi/dsi/fastutil/objects/Reference2ObjectArrayMap;Lcom/mojang/serialization/MapCodec;)V
      intermediary <init> Lnet/minecraft/class_2688;<init>(Ljava/lang/Object;Lit/unimi/dsi/fastutil/objects/Reference2ObjectArrayMap;Lcom/mojang/serialization/MapCodec;)V
      official <init> Ldxw;<init>(Ljava/lang/Object;Lit/unimi/dsi/fastutil/objects/Reference2ObjectArrayMap;Lcom/mojang/serialization/MapCodec;)V
  • Method Details

    • cycle

      public <T extends Comparable<T>> S cycle(Property<T> property)
      Mappings:
      Namespace Name Mixin selector
      named cycle Lnet/minecraft/state/State;cycle(Lnet/minecraft/state/property/Property;)Ljava/lang/Object;
      intermediary method_28493 Lnet/minecraft/class_2688;method_28493(Lnet/minecraft/class_2769;)Ljava/lang/Object;
      official a Ldxw;a(Ldyw;)Ljava/lang/Object;
    • getNext

      protected static <T> T getNext(List<T> values, T value)
      Mappings:
      Namespace Name Mixin selector
      named getNext Lnet/minecraft/state/State;getNext(Ljava/util/List;Ljava/lang/Object;)Ljava/lang/Object;
      intermediary method_28495 Lnet/minecraft/class_2688;method_28495(Ljava/util/List;Ljava/lang/Object;)Ljava/lang/Object;
      official a Ldxw;a(Ljava/util/List;Ljava/lang/Object;)Ljava/lang/Object;
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getProperties

      public Collection<Property<?>> getProperties()
      Mappings:
      Namespace Name Mixin selector
      named getProperties Lnet/minecraft/state/State;getProperties()Ljava/util/Collection;
      intermediary method_28501 Lnet/minecraft/class_2688;method_28501()Ljava/util/Collection;
      official F Ldxw;F()Ljava/util/Collection;
    • contains

      public <T extends Comparable<T>> boolean contains(Property<T> property)
      Mappings:
      Namespace Name Mixin selector
      named contains Lnet/minecraft/state/State;contains(Lnet/minecraft/state/property/Property;)Z
      intermediary method_28498 Lnet/minecraft/class_2688;method_28498(Lnet/minecraft/class_2769;)Z
      official b Ldxw;b(Ldyw;)Z
    • get

      public <T extends Comparable<T>> T get(Property<T> property)
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/state/State;get(Lnet/minecraft/state/property/Property;)Ljava/lang/Comparable;
      intermediary method_11654 Lnet/minecraft/class_2688;method_11654(Lnet/minecraft/class_2769;)Ljava/lang/Comparable;
      official c Ldxw;c(Ldyw;)Ljava/lang/Comparable;
    • getOrEmpty

      public <T extends Comparable<T>> Optional<T> getOrEmpty(Property<T> property)
      Mappings:
      Namespace Name Mixin selector
      named getOrEmpty Lnet/minecraft/state/State;getOrEmpty(Lnet/minecraft/state/property/Property;)Ljava/util/Optional;
      intermediary method_28500 Lnet/minecraft/class_2688;method_28500(Lnet/minecraft/class_2769;)Ljava/util/Optional;
      official d Ldxw;d(Ldyw;)Ljava/util/Optional;
    • get

      public <T extends Comparable<T>> T get(Property<T> property, T fallback)
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/state/State;get(Lnet/minecraft/state/property/Property;Ljava/lang/Comparable;)Ljava/lang/Comparable;
      intermediary method_61767 Lnet/minecraft/class_2688;method_61767(Lnet/minecraft/class_2769;Ljava/lang/Comparable;)Ljava/lang/Comparable;
      official a Ldxw;a(Ldyw;Ljava/lang/Comparable;)Ljava/lang/Comparable;
    • getNullable

      @Nullable public <T extends Comparable<T>> T getNullable(Property<T> property)
      Mappings:
      Namespace Name Mixin selector
      named getNullable Lnet/minecraft/state/State;getNullable(Lnet/minecraft/state/property/Property;)Ljava/lang/Comparable;
      intermediary method_61768 Lnet/minecraft/class_2688;method_61768(Lnet/minecraft/class_2769;)Ljava/lang/Comparable;
      official e Ldxw;e(Ldyw;)Ljava/lang/Comparable;
    • with

      public <T extends Comparable<T>, V extends T> S with(Property<T> property, V value)
      Mappings:
      Namespace Name Mixin selector
      named with Lnet/minecraft/state/State;with(Lnet/minecraft/state/property/Property;Ljava/lang/Comparable;)Ljava/lang/Object;
      intermediary method_11657 Lnet/minecraft/class_2688;method_11657(Lnet/minecraft/class_2769;Ljava/lang/Comparable;)Ljava/lang/Object;
      official b Ldxw;b(Ldyw;Ljava/lang/Comparable;)Ljava/lang/Object;
    • withIfExists

      public <T extends Comparable<T>, V extends T> S withIfExists(Property<T> property, V value)
      Mappings:
      Namespace Name Mixin selector
      named withIfExists Lnet/minecraft/state/State;withIfExists(Lnet/minecraft/state/property/Property;Ljava/lang/Comparable;)Ljava/lang/Object;
      intermediary method_47968 Lnet/minecraft/class_2688;method_47968(Lnet/minecraft/class_2769;Ljava/lang/Comparable;)Ljava/lang/Object;
      official c Ldxw;c(Ldyw;Ljava/lang/Comparable;)Ljava/lang/Object;
    • with

      private <T extends Comparable<T>, V extends T> S with(Property<T> property, V newValue, Comparable<?> oldValue)
      Mappings:
      Namespace Name Mixin selector
      named with Lnet/minecraft/state/State;with(Lnet/minecraft/state/property/Property;Ljava/lang/Comparable;Ljava/lang/Comparable;)Ljava/lang/Object;
      intermediary method_64216 Lnet/minecraft/class_2688;method_64216(Lnet/minecraft/class_2769;Ljava/lang/Comparable;Ljava/lang/Comparable;)Ljava/lang/Object;
      official a Ldxw;a(Ldyw;Ljava/lang/Comparable;Ljava/lang/Comparable;)Ljava/lang/Object;
    • createWithMap

      public void createWithMap(Map<Map<Property<?>,Comparable<?>>,S> states)
      Mappings:
      Namespace Name Mixin selector
      named createWithMap Lnet/minecraft/state/State;createWithMap(Ljava/util/Map;)V
      intermediary method_28496 Lnet/minecraft/class_2688;method_28496(Ljava/util/Map;)V
      official a Ldxw;a(Ljava/util/Map;)V
    • toMapWith

      private Map<Property<?>,Comparable<?>> toMapWith(Property<?> property, Comparable<?> value)
      Mappings:
      Namespace Name Mixin selector
      named toMapWith Lnet/minecraft/state/State;toMapWith(Lnet/minecraft/state/property/Property;Ljava/lang/Comparable;)Ljava/util/Map;
      intermediary method_28499 Lnet/minecraft/class_2688;method_28499(Lnet/minecraft/class_2769;Ljava/lang/Comparable;)Ljava/util/Map;
      official d Ldxw;d(Ldyw;Ljava/lang/Comparable;)Ljava/util/Map;
    • getEntries

      public Map<Property<?>,Comparable<?>> getEntries()
      Mappings:
      Namespace Name Mixin selector
      named getEntries Lnet/minecraft/state/State;getEntries()Ljava/util/Map;
      intermediary method_11656 Lnet/minecraft/class_2688;method_11656()Ljava/util/Map;
      official G Ldxw;G()Ljava/util/Map;
    • 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
      named createCodec Lnet/minecraft/state/State;createCodec(Lcom/mojang/serialization/Codec;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
      intermediary method_28494 Lnet/minecraft/class_2688;method_28494(Lcom/mojang/serialization/Codec;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
      official a Ldxw;a(Lcom/mojang/serialization/Codec;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;