Class RegistryOps<T>

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

public class RegistryOps<T> extends ForwardingDynamicOps<T>
Mappings:
Namespace Name
official wt
intermediary net/minecraft/class_5382
named net/minecraft/util/dynamic/RegistryOps
  • Field Details

    • LOGGER

      static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official b Lwt;b:Lorg/apache/logging/log4j/Logger;
      intermediary field_25509 Lnet/minecraft/class_5382;field_25509:Lorg/apache/logging/log4j/Logger;
      named LOGGER Lnet/minecraft/util/dynamic/RegistryOps;LOGGER:Lorg/apache/logging/log4j/Logger;
    • JSON_FILE_EXTENSION

      private static final String JSON_FILE_EXTENSION
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official c Lwt;c:Ljava/lang/String;
      intermediary field_33379 Lnet/minecraft/class_5382;field_33379:Ljava/lang/String;
      named JSON_FILE_EXTENSION Lnet/minecraft/util/dynamic/RegistryOps;JSON_FILE_EXTENSION:Ljava/lang/String;
    • entryLoader

      private final RegistryOps.EntryLoader entryLoader
      Mappings:
      Namespace Name Mixin selector
      official d Lwt;d:Lwt$b;
      intermediary field_26738 Lnet/minecraft/class_5382;field_26738:Lnet/minecraft/class_5382$class_5506;
      named entryLoader Lnet/minecraft/util/dynamic/RegistryOps;entryLoader:Lnet/minecraft/util/dynamic/RegistryOps$EntryLoader;
    • registryManager

      private final DynamicRegistryManager registryManager
      Mappings:
      Namespace Name Mixin selector
      official e Lwt;e:Lgx;
      intermediary field_25511 Lnet/minecraft/class_5382;field_25511:Lnet/minecraft/class_5455;
      named registryManager Lnet/minecraft/util/dynamic/RegistryOps;registryManager:Lnet/minecraft/util/registry/DynamicRegistryManager;
    • valueHolders

      private final Map<RegistryKey<? extends Registry<?>>,​RegistryOps.ValueHolder<?>> valueHolders
      Mappings:
      Namespace Name Mixin selector
      official f Lwt;f:Ljava/util/Map;
      intermediary field_25512 Lnet/minecraft/class_5382;field_25512:Ljava/util/Map;
      named valueHolders Lnet/minecraft/util/dynamic/RegistryOps;valueHolders:Ljava/util/Map;
    • entryOps

      private final RegistryOps<JsonElement> entryOps
      Mappings:
      Namespace Name Mixin selector
      official g Lwt;g:Lwt;
      intermediary field_26739 Lnet/minecraft/class_5382;field_26739:Lnet/minecraft/class_5382;
      named entryOps Lnet/minecraft/util/dynamic/RegistryOps;entryOps:Lnet/minecraft/util/dynamic/RegistryOps;
  • Constructor Details

    • RegistryOps

      private RegistryOps(com.mojang.serialization.DynamicOps<T> delegate, RegistryOps.EntryLoader entryLoader, DynamicRegistryManager registryManager, IdentityHashMap<RegistryKey<? extends Registry<?>>,​RegistryOps.ValueHolder<?>> valueHolders)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lwt;<init>(Lcom/mojang/serialization/DynamicOps;Lwt$b;Lgx;Ljava/util/IdentityHashMap;)V
      intermediary <init> Lnet/minecraft/class_5382;<init>(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_5382$class_5506;Lnet/minecraft/class_5455;Ljava/util/IdentityHashMap;)V
      named <init> Lnet/minecraft/util/dynamic/RegistryOps;<init>(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/util/dynamic/RegistryOps$EntryLoader;Lnet/minecraft/util/registry/DynamicRegistryManager;Ljava/util/IdentityHashMap;)V
  • Method Details

    • method_36574

      public static <T> RegistryOps<T> method_36574(com.mojang.serialization.DynamicOps<T> dynamicOps, ResourceManager resourceManager, DynamicRegistryManager dynamicRegistryManager)
      Mappings:
      Namespace Name Mixin selector
      official a Lwt;a(Lcom/mojang/serialization/DynamicOps;Ladt;Lgx;)Lwt;
      intermediary method_36574 Lnet/minecraft/class_5382;method_36574(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_3300;Lnet/minecraft/class_5455;)Lnet/minecraft/class_5382;
      named method_36574 Lnet/minecraft/util/dynamic/RegistryOps;method_36574(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/registry/DynamicRegistryManager;)Lnet/minecraft/util/dynamic/RegistryOps;
    • method_36575

      public static <T> RegistryOps<T> method_36575(com.mojang.serialization.DynamicOps<T> dynamicOps, RegistryOps.EntryLoader entryLoader, DynamicRegistryManager dynamicRegistryManager)
      Mappings:
      Namespace Name Mixin selector
      official a Lwt;a(Lcom/mojang/serialization/DynamicOps;Lwt$b;Lgx;)Lwt;
      intermediary method_36575 Lnet/minecraft/class_5382;method_36575(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_5382$class_5506;Lnet/minecraft/class_5455;)Lnet/minecraft/class_5382;
      named method_36575 Lnet/minecraft/util/dynamic/RegistryOps;method_36575(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/util/dynamic/RegistryOps$EntryLoader;Lnet/minecraft/util/registry/DynamicRegistryManager;)Lnet/minecraft/util/dynamic/RegistryOps;
    • of

      public static <T> RegistryOps<T> of(com.mojang.serialization.DynamicOps<T> delegate, ResourceManager resourceManager, DynamicRegistryManager dynamicRegistryManager)
      Mappings:
      Namespace Name Mixin selector
      official b Lwt;b(Lcom/mojang/serialization/DynamicOps;Ladt;Lgx;)Lwt;
      intermediary method_29753 Lnet/minecraft/class_5382;method_29753(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_3300;Lnet/minecraft/class_5455;)Lnet/minecraft/class_5382;
      named of Lnet/minecraft/util/dynamic/RegistryOps;of(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/registry/DynamicRegistryManager;)Lnet/minecraft/util/dynamic/RegistryOps;
    • of

      public static <T> RegistryOps<T> of(com.mojang.serialization.DynamicOps<T> delegate, RegistryOps.EntryLoader entryLoader, DynamicRegistryManager dynamicRegistryManager)
      Mappings:
      Namespace Name Mixin selector
      official b Lwt;b(Lcom/mojang/serialization/DynamicOps;Lwt$b;Lgx;)Lwt;
      intermediary method_31150 Lnet/minecraft/class_5382;method_31150(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_5382$class_5506;Lnet/minecraft/class_5455;)Lnet/minecraft/class_5382;
      named of Lnet/minecraft/util/dynamic/RegistryOps;of(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/util/dynamic/RegistryOps$EntryLoader;Lnet/minecraft/util/registry/DynamicRegistryManager;)Lnet/minecraft/util/dynamic/RegistryOps;
    • decodeOrId

      protected <E> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<Supplier<E>,​T>> decodeOrId(T t, RegistryKey<? extends Registry<E>> key, com.mojang.serialization.Codec<E> codec, boolean allowInlineDefinitions)
      Encode an id for a registry element than a full object if possible.

      This method is called by casting an arbitrary dynamic ops to a registry reading ops.

      See Also:
      RegistryReadingOps.encodeOrId(Object, Object, RegistryKey, Codec)
      Mappings:
      Namespace Name Mixin selector
      official a Lwt;a(Ljava/lang/Object;Lwv;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/DataResult;
      intermediary method_29759 Lnet/minecraft/class_5382;method_29759(Ljava/lang/Object;Lnet/minecraft/class_5321;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/DataResult;
      named decodeOrId Lnet/minecraft/util/dynamic/RegistryOps;decodeOrId(Ljava/lang/Object;Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/DataResult;
    • loadToRegistry

      public <E> com.mojang.serialization.DataResult<SimpleRegistry<E>> loadToRegistry(SimpleRegistry<E> registry, RegistryKey<? extends Registry<E>> key, com.mojang.serialization.Codec<E> codec)
      Loads elements into a registry just loaded from a decoder.
      Mappings:
      Namespace Name Mixin selector
      official a Lwt;a(Lgr;Lwv;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/DataResult;
      intermediary method_29755 Lnet/minecraft/class_5382;method_29755(Lnet/minecraft/class_2370;Lnet/minecraft/class_5321;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/DataResult;
      named loadToRegistry Lnet/minecraft/util/dynamic/RegistryOps;loadToRegistry(Lnet/minecraft/util/registry/SimpleRegistry;Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/DataResult;
    • readSupplier

      private <E> com.mojang.serialization.DataResult<Supplier<E>> readSupplier(RegistryKey<? extends Registry<E>> key, MutableRegistry<E> registry, com.mojang.serialization.Codec<E> codec, Identifier elementId)
      Reads a supplier for a registry element.

      This logic is used by both decodeOrId and loadToRegistry.

      Mappings:
      Namespace Name Mixin selector
      official a Lwt;a(Lwv;Lhc;Lcom/mojang/serialization/Codec;Lww;)Lcom/mojang/serialization/DataResult;
      intermediary method_29763 Lnet/minecraft/class_5382;method_29763(Lnet/minecraft/class_5321;Lnet/minecraft/class_2385;Lcom/mojang/serialization/Codec;Lnet/minecraft/class_2960;)Lcom/mojang/serialization/DataResult;
      named readSupplier Lnet/minecraft/util/dynamic/RegistryOps;readSupplier(Lnet/minecraft/util/registry/RegistryKey;Lnet/minecraft/util/registry/MutableRegistry;Lcom/mojang/serialization/Codec;Lnet/minecraft/util/Identifier;)Lcom/mojang/serialization/DataResult;
    • getValueHolder

      private <E> RegistryOps.ValueHolder<E> getValueHolder(RegistryKey<? extends Registry<E>> registryRef)
      Mappings:
      Namespace Name Mixin selector
      official b Lwt;b(Lwv;)Lwt$a;
      intermediary method_29761 Lnet/minecraft/class_5382;method_29761(Lnet/minecraft/class_5321;)Lnet/minecraft/class_5382$class_5383;
      named getValueHolder Lnet/minecraft/util/dynamic/RegistryOps;getValueHolder(Lnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/util/dynamic/RegistryOps$ValueHolder;
    • getRegistry

      protected <E> com.mojang.serialization.DataResult<Registry<E>> getRegistry(RegistryKey<? extends Registry<E>> key)
      Mappings:
      Namespace Name Mixin selector
      official a Lwt;a(Lwv;)Lcom/mojang/serialization/DataResult;
      intermediary method_31152 Lnet/minecraft/class_5382;method_31152(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/DataResult;
      named getRegistry Lnet/minecraft/util/dynamic/RegistryOps;getRegistry(Lnet/minecraft/util/registry/RegistryKey;)Lcom/mojang/serialization/DataResult;