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 xx
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 Lxx;b:Lxy;
      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 Lxx;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 Lxx;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 Lxx;e:Lxx;
      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> Lxx;<init>(Lcom/mojang/serialization/DynamicOps;Lxy;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> dynamicOps, ResourceManager resourceManager, DynamicRegistryManager registryManager)
      Mappings:
      Namespace Name Mixin selector
      official a Lxx;a(Lcom/mojang/serialization/DynamicOps;Lafe;Lgy;)Lxx;
      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> dynamicOps, EntryLoader entryLoader, DynamicRegistryManager registryManager)
      Mappings:
      Namespace Name Mixin selector
      official a Lxx;a(Lcom/mojang/serialization/DynamicOps;Lxy;Lgy;)Lxx;
      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 Lxx;b(Lcom/mojang/serialization/DynamicOps;Lafe;Lgy;)Lxx;
      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 Lxx;b(Lcom/mojang/serialization/DynamicOps;Lxy;Lgy;)Lxx;
      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 Lxx;a(Ljava/lang/Object;Lya;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 Lxx;a(Lgs;Lya;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 Lxx;a(Lya;Lhd;Lcom/mojang/serialization/Codec;Lya;)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;
    • method_39744

      private static <E> Supplier<E> method_39744(MutableRegistry<E> mutableRegistry, RegistryKey<E> registryKey)
      Mappings:
      Namespace Name Mixin selector
      official a Lxx;a(Lhd;Lya;)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 method_39744 Lnet/minecraft/util/dynamic/RegistryOps;method_39744(Lnet/minecraft/util/registry/MutableRegistry;Lnet/minecraft/util/registry/RegistryKey;)Ljava/util/function/Supplier;
    • method_39743

      private static <E> Supplier<E> method_39743(Registry<E> registry, RegistryKey<E> registryKey)
      Mappings:
      Namespace Name Mixin selector
      official a Lxx;a(Lgx;Lya;)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 method_39743 Lnet/minecraft/util/dynamic/RegistryOps;method_39743(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 Lxx;b(Lya;)Lxx$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 Lxx;a(Lya;)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;