Class RuntimeOps

java.lang.Object
net.minecraft.util.dynamic.RuntimeOps
All Implemented Interfaces:
com.mojang.serialization.DynamicOps<Object>

public class RuntimeOps extends Object implements com.mojang.serialization.DynamicOps<Object>
A dynamic ops that "serializes" data to a Java runtime representation. This is most useful when combined with another ops.

The objects must be one of: numbers, booleans, string, Map, List, ByteList, IntList, or LongList. Arrays are not supported.

See Also:
Mappings:
Namespace Name
official auh
intermediary net/minecraft/class_8806
named net/minecraft/util/dynamic/RuntimeOps
  • Field Details

    • INSTANCE

      public static final RuntimeOps INSTANCE
      Mappings:
      Namespace Name Mixin selector
      official a Lauh;a:Lauh;
      intermediary field_46239 Lnet/minecraft/class_8806;field_46239:Lnet/minecraft/class_8806;
      named INSTANCE Lnet/minecraft/util/dynamic/RuntimeOps;INSTANCE:Lnet/minecraft/util/dynamic/RuntimeOps;
  • Constructor Details

    • RuntimeOps

      private RuntimeOps()
  • Method Details

    • empty

      public Object empty()
      Specified by:
      empty in interface com.mojang.serialization.DynamicOps<Object>
    • emptyMap

      public Object emptyMap()
      Specified by:
      emptyMap in interface com.mojang.serialization.DynamicOps<Object>
    • emptyList

      public Object emptyList()
      Specified by:
      emptyList in interface com.mojang.serialization.DynamicOps<Object>
    • convertTo

      public <U> U convertTo(com.mojang.serialization.DynamicOps<U> ops, Object object)
      Specified by:
      convertTo in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official convertTo Lauh;convertTo(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Ljava/lang/Object;
      intermediary convertTo Lnet/minecraft/class_8806;convertTo(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Ljava/lang/Object;
      named convertTo Lnet/minecraft/util/dynamic/RuntimeOps;convertTo(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Ljava/lang/Object;
    • getNumberValue

      public com.mojang.serialization.DataResult<Number> getNumberValue(Object object)
      Specified by:
      getNumberValue in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getNumberValue Lauh;getNumberValue(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getNumberValue Lnet/minecraft/class_8806;getNumberValue(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getNumberValue Lnet/minecraft/util/dynamic/RuntimeOps;getNumberValue(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • createNumeric

      public Object createNumeric(Number value)
      Specified by:
      createNumeric in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createNumeric Lauh;createNumeric(Ljava/lang/Number;)Ljava/lang/Object;
      intermediary createNumeric Lnet/minecraft/class_8806;createNumeric(Ljava/lang/Number;)Ljava/lang/Object;
      named createNumeric Lnet/minecraft/util/dynamic/RuntimeOps;createNumeric(Ljava/lang/Number;)Ljava/lang/Object;
    • createByte

      public Object createByte(byte value)
      Specified by:
      createByte in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createByte Lauh;createByte(B)Ljava/lang/Object;
      intermediary createByte Lnet/minecraft/class_8806;createByte(B)Ljava/lang/Object;
      named createByte Lnet/minecraft/util/dynamic/RuntimeOps;createByte(B)Ljava/lang/Object;
    • createShort

      public Object createShort(short value)
      Specified by:
      createShort in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createShort Lauh;createShort(S)Ljava/lang/Object;
      intermediary createShort Lnet/minecraft/class_8806;createShort(S)Ljava/lang/Object;
      named createShort Lnet/minecraft/util/dynamic/RuntimeOps;createShort(S)Ljava/lang/Object;
    • createInt

      public Object createInt(int value)
      Specified by:
      createInt in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createInt Lauh;createInt(I)Ljava/lang/Object;
      intermediary createInt Lnet/minecraft/class_8806;createInt(I)Ljava/lang/Object;
      named createInt Lnet/minecraft/util/dynamic/RuntimeOps;createInt(I)Ljava/lang/Object;
    • createLong

      public Object createLong(long value)
      Specified by:
      createLong in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createLong Lauh;createLong(J)Ljava/lang/Object;
      intermediary createLong Lnet/minecraft/class_8806;createLong(J)Ljava/lang/Object;
      named createLong Lnet/minecraft/util/dynamic/RuntimeOps;createLong(J)Ljava/lang/Object;
    • createFloat

      public Object createFloat(float value)
      Specified by:
      createFloat in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createFloat Lauh;createFloat(F)Ljava/lang/Object;
      intermediary createFloat Lnet/minecraft/class_8806;createFloat(F)Ljava/lang/Object;
      named createFloat Lnet/minecraft/util/dynamic/RuntimeOps;createFloat(F)Ljava/lang/Object;
    • createDouble

      public Object createDouble(double value)
      Specified by:
      createDouble in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createDouble Lauh;createDouble(D)Ljava/lang/Object;
      intermediary createDouble Lnet/minecraft/class_8806;createDouble(D)Ljava/lang/Object;
      named createDouble Lnet/minecraft/util/dynamic/RuntimeOps;createDouble(D)Ljava/lang/Object;
    • getBooleanValue

      public com.mojang.serialization.DataResult<Boolean> getBooleanValue(Object object)
      Specified by:
      getBooleanValue in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getBooleanValue Lauh;getBooleanValue(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getBooleanValue Lnet/minecraft/class_8806;getBooleanValue(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getBooleanValue Lnet/minecraft/util/dynamic/RuntimeOps;getBooleanValue(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • createBoolean

      public Object createBoolean(boolean value)
      Specified by:
      createBoolean in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createBoolean Lauh;createBoolean(Z)Ljava/lang/Object;
      intermediary createBoolean Lnet/minecraft/class_8806;createBoolean(Z)Ljava/lang/Object;
      named createBoolean Lnet/minecraft/util/dynamic/RuntimeOps;createBoolean(Z)Ljava/lang/Object;
    • getStringValue

      public com.mojang.serialization.DataResult<String> getStringValue(Object object)
      Specified by:
      getStringValue in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getStringValue Lauh;getStringValue(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getStringValue Lnet/minecraft/class_8806;getStringValue(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getStringValue Lnet/minecraft/util/dynamic/RuntimeOps;getStringValue(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • createString

      public Object createString(String value)
      Specified by:
      createString in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createString Lauh;createString(Ljava/lang/String;)Ljava/lang/Object;
      intermediary createString Lnet/minecraft/class_8806;createString(Ljava/lang/String;)Ljava/lang/Object;
      named createString Lnet/minecraft/util/dynamic/RuntimeOps;createString(Ljava/lang/String;)Ljava/lang/Object;
    • mergeToList

      public com.mojang.serialization.DataResult<Object> mergeToList(Object list, Object value)
      Specified by:
      mergeToList in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official mergeToList Lauh;mergeToList(Ljava/lang/Object;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary mergeToList Lnet/minecraft/class_8806;mergeToList(Ljava/lang/Object;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named mergeToList Lnet/minecraft/util/dynamic/RuntimeOps;mergeToList(Ljava/lang/Object;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • mergeToList

      public com.mojang.serialization.DataResult<Object> mergeToList(Object list, List<Object> values)
      Specified by:
      mergeToList in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official mergeToList Lauh;mergeToList(Ljava/lang/Object;Ljava/util/List;)Lcom/mojang/serialization/DataResult;
      intermediary mergeToList Lnet/minecraft/class_8806;mergeToList(Ljava/lang/Object;Ljava/util/List;)Lcom/mojang/serialization/DataResult;
      named mergeToList Lnet/minecraft/util/dynamic/RuntimeOps;mergeToList(Ljava/lang/Object;Ljava/util/List;)Lcom/mojang/serialization/DataResult;
    • mergeToMap

      public com.mojang.serialization.DataResult<Object> mergeToMap(Object map, Object key, Object value)
      Specified by:
      mergeToMap in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official mergeToMap Lauh;mergeToMap(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary mergeToMap Lnet/minecraft/class_8806;mergeToMap(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named mergeToMap Lnet/minecraft/util/dynamic/RuntimeOps;mergeToMap(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • mergeToMap

      public com.mojang.serialization.DataResult<Object> mergeToMap(Object map, Map<Object,Object> map2)
      Specified by:
      mergeToMap in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official mergeToMap Lauh;mergeToMap(Ljava/lang/Object;Ljava/util/Map;)Lcom/mojang/serialization/DataResult;
      intermediary mergeToMap Lnet/minecraft/class_8806;mergeToMap(Ljava/lang/Object;Ljava/util/Map;)Lcom/mojang/serialization/DataResult;
      named mergeToMap Lnet/minecraft/util/dynamic/RuntimeOps;mergeToMap(Ljava/lang/Object;Ljava/util/Map;)Lcom/mojang/serialization/DataResult;
    • toMap

      private static Map<Object,Object> toMap(com.mojang.serialization.MapLike<Object> mapLike)
      Mappings:
      Namespace Name Mixin selector
      official a Lauh;a(Lcom/mojang/serialization/MapLike;)Ljava/util/Map;
      intermediary method_53923 Lnet/minecraft/class_8806;method_53923(Lcom/mojang/serialization/MapLike;)Ljava/util/Map;
      named toMap Lnet/minecraft/util/dynamic/RuntimeOps;toMap(Lcom/mojang/serialization/MapLike;)Ljava/util/Map;
    • mergeToMap

      public com.mojang.serialization.DataResult<Object> mergeToMap(Object map, com.mojang.serialization.MapLike<Object> map2)
      Specified by:
      mergeToMap in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official mergeToMap Lauh;mergeToMap(Ljava/lang/Object;Lcom/mojang/serialization/MapLike;)Lcom/mojang/serialization/DataResult;
      intermediary mergeToMap Lnet/minecraft/class_8806;mergeToMap(Ljava/lang/Object;Lcom/mojang/serialization/MapLike;)Lcom/mojang/serialization/DataResult;
      named mergeToMap Lnet/minecraft/util/dynamic/RuntimeOps;mergeToMap(Ljava/lang/Object;Lcom/mojang/serialization/MapLike;)Lcom/mojang/serialization/DataResult;
    • streamEntries

      static Stream<com.mojang.datafixers.util.Pair<Object,Object>> streamEntries(Map<?,?> map)
      Mappings:
      Namespace Name Mixin selector
      official a Lauh;a(Ljava/util/Map;)Ljava/util/stream/Stream;
      intermediary method_53926 Lnet/minecraft/class_8806;method_53926(Ljava/util/Map;)Ljava/util/stream/Stream;
      named streamEntries Lnet/minecraft/util/dynamic/RuntimeOps;streamEntries(Ljava/util/Map;)Ljava/util/stream/Stream;
    • getMapValues

      public com.mojang.serialization.DataResult<Stream<com.mojang.datafixers.util.Pair<Object,Object>>> getMapValues(Object map)
      Specified by:
      getMapValues in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getMapValues Lauh;getMapValues(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getMapValues Lnet/minecraft/class_8806;getMapValues(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getMapValues Lnet/minecraft/util/dynamic/RuntimeOps;getMapValues(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • getMapEntries

      public com.mojang.serialization.DataResult<Consumer<BiConsumer<Object,Object>>> getMapEntries(Object map)
      Specified by:
      getMapEntries in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getMapEntries Lauh;getMapEntries(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getMapEntries Lnet/minecraft/class_8806;getMapEntries(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getMapEntries Lnet/minecraft/util/dynamic/RuntimeOps;getMapEntries(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • createMap

      public Object createMap(Stream<com.mojang.datafixers.util.Pair<Object,Object>> entries)
      Specified by:
      createMap in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createMap Lauh;createMap(Ljava/util/stream/Stream;)Ljava/lang/Object;
      intermediary createMap Lnet/minecraft/class_8806;createMap(Ljava/util/stream/Stream;)Ljava/lang/Object;
      named createMap Lnet/minecraft/util/dynamic/RuntimeOps;createMap(Ljava/util/stream/Stream;)Ljava/lang/Object;
    • getMap

      public com.mojang.serialization.DataResult<com.mojang.serialization.MapLike<Object>> getMap(Object map)
      Specified by:
      getMap in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getMap Lauh;getMap(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getMap Lnet/minecraft/class_8806;getMap(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getMap Lnet/minecraft/util/dynamic/RuntimeOps;getMap(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • createMap

      public Object createMap(Map<Object,Object> map)
      Specified by:
      createMap in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createMap Lauh;createMap(Ljava/util/Map;)Ljava/lang/Object;
      intermediary createMap Lnet/minecraft/class_8806;createMap(Ljava/util/Map;)Ljava/lang/Object;
      named createMap Lnet/minecraft/util/dynamic/RuntimeOps;createMap(Ljava/util/Map;)Ljava/lang/Object;
    • getStream

      public com.mojang.serialization.DataResult<Stream<Object>> getStream(Object list)
      Specified by:
      getStream in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getStream Lauh;getStream(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getStream Lnet/minecraft/class_8806;getStream(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getStream Lnet/minecraft/util/dynamic/RuntimeOps;getStream(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • getList

      public com.mojang.serialization.DataResult<Consumer<Consumer<Object>>> getList(Object list)
      Specified by:
      getList in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getList Lauh;getList(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getList Lnet/minecraft/class_8806;getList(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getList Lnet/minecraft/util/dynamic/RuntimeOps;getList(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • createList

      public Object createList(Stream<Object> stream)
      Specified by:
      createList in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createList Lauh;createList(Ljava/util/stream/Stream;)Ljava/lang/Object;
      intermediary createList Lnet/minecraft/class_8806;createList(Ljava/util/stream/Stream;)Ljava/lang/Object;
      named createList Lnet/minecraft/util/dynamic/RuntimeOps;createList(Ljava/util/stream/Stream;)Ljava/lang/Object;
    • getByteBuffer

      public com.mojang.serialization.DataResult<ByteBuffer> getByteBuffer(Object byteList)
      Specified by:
      getByteBuffer in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getByteBuffer Lauh;getByteBuffer(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getByteBuffer Lnet/minecraft/class_8806;getByteBuffer(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getByteBuffer Lnet/minecraft/util/dynamic/RuntimeOps;getByteBuffer(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • createByteList

      public Object createByteList(ByteBuffer buf)
      Specified by:
      createByteList in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createByteList Lauh;createByteList(Ljava/nio/ByteBuffer;)Ljava/lang/Object;
      intermediary createByteList Lnet/minecraft/class_8806;createByteList(Ljava/nio/ByteBuffer;)Ljava/lang/Object;
      named createByteList Lnet/minecraft/util/dynamic/RuntimeOps;createByteList(Ljava/nio/ByteBuffer;)Ljava/lang/Object;
    • getIntStream

      public com.mojang.serialization.DataResult<IntStream> getIntStream(Object intList)
      Specified by:
      getIntStream in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getIntStream Lauh;getIntStream(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getIntStream Lnet/minecraft/class_8806;getIntStream(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getIntStream Lnet/minecraft/util/dynamic/RuntimeOps;getIntStream(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • createIntList

      public Object createIntList(IntStream stream)
      Specified by:
      createIntList in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createIntList Lauh;createIntList(Ljava/util/stream/IntStream;)Ljava/lang/Object;
      intermediary createIntList Lnet/minecraft/class_8806;createIntList(Ljava/util/stream/IntStream;)Ljava/lang/Object;
      named createIntList Lnet/minecraft/util/dynamic/RuntimeOps;createIntList(Ljava/util/stream/IntStream;)Ljava/lang/Object;
    • getLongStream

      public com.mojang.serialization.DataResult<LongStream> getLongStream(Object longList)
      Specified by:
      getLongStream in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official getLongStream Lauh;getLongStream(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary getLongStream Lnet/minecraft/class_8806;getLongStream(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      named getLongStream Lnet/minecraft/util/dynamic/RuntimeOps;getLongStream(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • createLongList

      public Object createLongList(LongStream stream)
      Specified by:
      createLongList in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official createLongList Lauh;createLongList(Ljava/util/stream/LongStream;)Ljava/lang/Object;
      intermediary createLongList Lnet/minecraft/class_8806;createLongList(Ljava/util/stream/LongStream;)Ljava/lang/Object;
      named createLongList Lnet/minecraft/util/dynamic/RuntimeOps;createLongList(Ljava/util/stream/LongStream;)Ljava/lang/Object;
    • remove

      public Object remove(Object map, String key)
      Specified by:
      remove in interface com.mojang.serialization.DynamicOps<Object>
      Mappings:
      Namespace Name Mixin selector
      official remove Lauh;remove(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
      intermediary remove Lnet/minecraft/class_8806;remove(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
      named remove Lnet/minecraft/util/dynamic/RuntimeOps;remove(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
    • mapBuilder

      public com.mojang.serialization.RecordBuilder<Object> mapBuilder()
      Specified by:
      mapBuilder in interface com.mojang.serialization.DynamicOps<Object>
    • toString

      public String toString()
      Overrides:
      toString in class Object