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

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official b Lvy;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;
    • entryLoader

      private final RegistryOps.EntryLoader entryLoader
      Mappings:
      Namespace Name Mixin selector
      official c Lvy;c:Lvy$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.Impl registryManager
      Mappings:
      Namespace Name Mixin selector
      official d Lvy;d:Lgo$b;
      intermediary field_25511 Lnet/minecraft/class_5382;field_25511:Lnet/minecraft/class_5455$class_5457;
      named registryManager Lnet/minecraft/util/dynamic/RegistryOps;registryManager:Lnet/minecraft/util/registry/DynamicRegistryManager$Impl;
    • valueHolders

      private final Map<RegistryKey<? extends Registry<?>>,​RegistryOps.ValueHolder<?>> valueHolders
      Mappings:
      Namespace Name Mixin selector
      official e Lvy;e: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 f Lvy;f:Lvy;
      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.Impl registryManager, IdentityHashMap<RegistryKey<? extends Registry<?>>,​RegistryOps.ValueHolder<?>> valueHolders)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lvy;<init>(Lcom/mojang/serialization/DynamicOps;Lvy$b;Lgo$b;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$class_5457;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$Impl;Ljava/util/IdentityHashMap;)V
  • Method Details

    • of

      public static <T> RegistryOps<T> of​(com.mojang.serialization.DynamicOps<T> delegate, ResourceManager resourceManager, DynamicRegistryManager.Impl registryManager)
      Mappings:
      Namespace Name Mixin selector
      official a Lvy;a(Lcom/mojang/serialization/DynamicOps;Lacx;Lgo$b;)Lvy;
      intermediary method_29753 Lnet/minecraft/class_5382;method_29753(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_3300;Lnet/minecraft/class_5455$class_5457;)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$Impl;)Lnet/minecraft/util/dynamic/RegistryOps;
    • of

      public static <T> RegistryOps<T> of​(com.mojang.serialization.DynamicOps<T> delegate, RegistryOps.EntryLoader entryLoader, DynamicRegistryManager.Impl registryManager)
      Mappings:
      Namespace Name Mixin selector
      official a Lvy;a(Lcom/mojang/serialization/DynamicOps;Lvy$b;Lgo$b;)Lvy;
      intermediary method_31150 Lnet/minecraft/class_5382;method_31150(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_5382$class_5506;Lnet/minecraft/class_5455$class_5457;)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$Impl;)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>> registryKey, 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 Lvy;a(Ljava/lang/Object;Lwa;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>> registryKey, com.mojang.serialization.Codec<E> codec)
      Loads elements into a registry just loaded from a decoder.
      Mappings:
      Namespace Name Mixin selector
      official a Lvy;a(Lgi;Lwa;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, 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 Lvy;a(Lwa;Lgt;Lcom/mojang/serialization/Codec;Lwb;)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 Lvy;b(Lwa;)Lvy$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;
    • method_31152

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