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 yd
intermediary net/minecraft/class_5382
named net/minecraft/util/dynamic/RegistryOps
  • Field Details

    • entryLoader

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

      private final DynamicRegistryManager registryManager
      Mappings:
      Namespace Name Mixin selector
      official c Lyd;c:Lgy;
      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 d Lyd;d: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 e Lyd;e:Lyd;
      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, EntryLoader entryLoader, DynamicRegistryManager registryManager, IdentityHashMap<RegistryKey<? extends Registry<?>>,RegistryOps.ValueHolder<?>> valueHolders)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lyd;<init>(Lcom/mojang/serialization/DynamicOps;Lye;Lgy;Ljava/util/IdentityHashMap;)V
      intermediary <init> Lnet/minecraft/class_5382;<init>(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/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/EntryLoader;Lnet/minecraft/util/registry/DynamicRegistryManager;Ljava/util/IdentityHashMap;)V
  • Method Details

    • ofLoaded

      public static <T> RegistryOps<T> ofLoaded(com.mojang.serialization.DynamicOps<T> ops, ResourceManager resourceManager, DynamicRegistryManager registryManager)
      Mappings:
      Namespace Name Mixin selector
      official a Lyd;a(Lcom/mojang/serialization/DynamicOps;Lafk;Lgy;)Lyd;
      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 ofLoaded Lnet/minecraft/util/dynamic/RegistryOps;ofLoaded(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/registry/DynamicRegistryManager;)Lnet/minecraft/util/dynamic/RegistryOps;
    • ofLoaded

      public static <T> RegistryOps<T> ofLoaded(com.mojang.serialization.DynamicOps<T> ops, EntryLoader entryLoader, DynamicRegistryManager registryManager)
      Mappings:
      Namespace Name Mixin selector
      official a Lyd;a(Lcom/mojang/serialization/DynamicOps;Lye;Lgy;)Lyd;
      intermediary method_36575 Lnet/minecraft/class_5382;method_36575(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_5506;Lnet/minecraft/class_5455;)Lnet/minecraft/class_5382;
      named ofLoaded Lnet/minecraft/util/dynamic/RegistryOps;ofLoaded(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/util/dynamic/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 registryManager)
      Mappings:
      Namespace Name Mixin selector
      official b Lyd;b(Lcom/mojang/serialization/DynamicOps;Lafk;Lgy;)Lyd;
      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, EntryLoader entryLoader, DynamicRegistryManager registryManager)
      Mappings:
      Namespace Name Mixin selector
      official b Lyd;b(Lcom/mojang/serialization/DynamicOps;Lye;Lgy;)Lyd;
      intermediary method_31150 Lnet/minecraft/class_5382;method_31150(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/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/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:
      Mappings:
      Namespace Name Mixin selector
      official a Lyd;a(Ljava/lang/Object;Lyg;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 Lyd;a(Lgs;Lyg;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>> registryKey, MutableRegistry<E> mutableRegistry, com.mojang.serialization.Codec<E> codec, RegistryKey<E> registryKey2)
      Reads a supplier for a registry element.

      This logic is used by both decodeOrId and loadToRegistry.

      Mappings:
      Namespace Name Mixin selector
      official a Lyd;a(Lyg;Lhd;Lcom/mojang/serialization/Codec;Lyg;)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_5321;)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/registry/RegistryKey;)Lcom/mojang/serialization/DataResult;
    • createLazyEntrySupplier

      private static <E> Supplier<E> createLazyEntrySupplier(MutableRegistry<E> registry, RegistryKey<E> key)
      Mappings:
      Namespace Name Mixin selector
      official a Lyd;a(Lhd;Lyg;)Ljava/util/function/Supplier;
      intermediary method_39744 Lnet/minecraft/class_5382;method_39744(Lnet/minecraft/class_2385;Lnet/minecraft/class_5321;)Ljava/util/function/Supplier;
      named createLazyEntrySupplier Lnet/minecraft/util/dynamic/RegistryOps;createLazyEntrySupplier(Lnet/minecraft/util/registry/MutableRegistry;Lnet/minecraft/util/registry/RegistryKey;)Ljava/util/function/Supplier;
    • createEntrySupplier

      private static <E> Supplier<E> createEntrySupplier(Registry<E> registry, RegistryKey<E> key)
      Mappings:
      Namespace Name Mixin selector
      official a Lyd;a(Lgx;Lyg;)Ljava/util/function/Supplier;
      intermediary method_39743 Lnet/minecraft/class_5382;method_39743(Lnet/minecraft/class_2378;Lnet/minecraft/class_5321;)Ljava/util/function/Supplier;
      named createEntrySupplier Lnet/minecraft/util/dynamic/RegistryOps;createEntrySupplier(Lnet/minecraft/util/registry/Registry;Lnet/minecraft/util/registry/RegistryKey;)Ljava/util/function/Supplier;
    • getValueHolder

      private <E> RegistryOps.ValueHolder<E> getValueHolder(RegistryKey<? extends Registry<E>> registryRef)
      Mappings:
      Namespace Name Mixin selector
      official b Lyd;b(Lyg;)Lyd$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 Lyd;a(Lyg;)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;