类 MutableRegistry<T>

  • 所有已实现的接口:
    com.mojang.serialization.Codec<T>, com.mojang.serialization.Decoder<T>, com.mojang.serialization.Encoder<T>, com.mojang.serialization.Keyable, Iterable<T>, IndexedIterable<T>
    直接已知子类:
    SimpleRegistry

    public abstract class MutableRegistry<T>
    extends Registry<T>
    Mappings:
    Namespace Name
    official gx
    intermediary net/minecraft/class_2385
    named net/minecraft/util/registry/MutableRegistry
    • 构造器详细资料

      • MutableRegistry

        public MutableRegistry​(RegistryKey<? extends Registry<T>> key,
                               com.mojang.serialization.Lifecycle lifecycle)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lgr;<init>(Lwo;Lcom/mojang/serialization/Lifecycle;)V
        intermediary <init> Lnet/minecraft/class_2378;<init>(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;)V
        named <init> Lnet/minecraft/util/registry/Registry;<init>(Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;)V
    • 方法详细资料

      • set

        public abstract <V extends T> V set​(int rawId,
                                            RegistryKey<T> key,
                                            V entry,
                                            com.mojang.serialization.Lifecycle lifecycle)
        Mappings:
        Namespace Name Mixin selector
        official a Lgx;a(ILwo;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Ljava/lang/Object;
        intermediary method_10273 Lnet/minecraft/class_2385;method_10273(ILnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Ljava/lang/Object;
        named set Lnet/minecraft/util/registry/MutableRegistry;set(ILnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Ljava/lang/Object;
      • add

        public abstract <V extends T> V add​(RegistryKey<T> key,
                                            V entry,
                                            com.mojang.serialization.Lifecycle lifecycle)
        Mappings:
        Namespace Name Mixin selector
        official a Lgx;a(Lwo;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Ljava/lang/Object;
        intermediary method_10272 Lnet/minecraft/class_2385;method_10272(Lnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Ljava/lang/Object;
        named add Lnet/minecraft/util/registry/MutableRegistry;add(Lnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Ljava/lang/Object;
      • replace

        public abstract <V extends T> V replace​(OptionalInt rawId,
                                                RegistryKey<T> key,
                                                V newEntry,
                                                com.mojang.serialization.Lifecycle lifecycle)
        If the given key is already present in the registry, replaces the entry associated with the given key with the new entry. This method asserts that the raw ID is equal to the value already in the registry. The raw ID not being present may lead to buggy behavior.

        If the given key is not already present in the registry, adds the entry to the registry. If rawId is present, then this method gives the entry this raw ID. Otherwise, uses the next available ID.

        Mappings:
        Namespace Name Mixin selector
        official a Lgx;a(Ljava/util/OptionalInt;Lwo;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Ljava/lang/Object;
        intermediary method_31062 Lnet/minecraft/class_2385;method_31062(Ljava/util/OptionalInt;Lnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Ljava/lang/Object;
        named replace Lnet/minecraft/util/registry/MutableRegistry;replace(Ljava/util/OptionalInt;Lnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Ljava/lang/Object;
      • method_35863

        public abstract boolean method_35863()
        Mappings:
        Namespace Name Mixin selector
        official e Lgx;e()Z
        intermediary method_35863 Lnet/minecraft/class_2385;method_35863()Z
        named method_35863 Lnet/minecraft/util/registry/MutableRegistry;method_35863()Z