Class DefaultedRegistry<T>

All Implemented Interfaces:
com.mojang.serialization.Codec<T>, com.mojang.serialization.Decoder<T>, com.mojang.serialization.Encoder<T>, com.mojang.serialization.Keyable, Iterable<T>, IndexedIterable<T>

public class DefaultedRegistry<T> extends SimpleRegistry<T>
Mappings:
Namespace Name
official gk
intermediary net/minecraft/class_2348
named net/minecraft/util/registry/DefaultedRegistry
  • Field Details

    • defaultId

      private final Identifier defaultId
      Mappings:
      Namespace Name Mixin selector
      official bv Lgk;bv:Lww;
      intermediary field_11014 Lnet/minecraft/class_2348;field_11014:Lnet/minecraft/class_2960;
      named defaultId Lnet/minecraft/util/registry/DefaultedRegistry;defaultId:Lnet/minecraft/util/Identifier;
    • defaultValue

      private T defaultValue
      Mappings:
      Namespace Name Mixin selector
      official bw Lgk;bw:Ljava/lang/Object;
      intermediary field_11015 Lnet/minecraft/class_2348;field_11015:Ljava/lang/Object;
      named defaultValue Lnet/minecraft/util/registry/DefaultedRegistry;defaultValue:Ljava/lang/Object;
  • Constructor Details

    • DefaultedRegistry

      public DefaultedRegistry(String defaultId, RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lgk;<init>(Ljava/lang/String;Lwv;Lcom/mojang/serialization/Lifecycle;)V
      intermediary <init> Lnet/minecraft/class_2348;<init>(Ljava/lang/String;Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;)V
      named <init> Lnet/minecraft/util/registry/DefaultedRegistry;<init>(Ljava/lang/String;Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;)V
  • Method Details

    • set

      public <V extends T> V set(int rawId, RegistryKey<T> key, V entry, com.mojang.serialization.Lifecycle lifecycle)
      Overrides:
      set in class SimpleRegistry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lhc;a(ILwv;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;
    • getRawId

      public int getRawId(@Nullable T entry)
      Specified by:
      getRawId in interface IndexedIterable<T>
      Overrides:
      getRawId in class SimpleRegistry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lgp;a(Ljava/lang/Object;)I
      intermediary method_10206 Lnet/minecraft/class_2359;method_10206(Ljava/lang/Object;)I
      named getRawId Lnet/minecraft/util/collection/IndexedIterable;getRawId(Ljava/lang/Object;)I
    • getId

      @NotNull public @NotNull Identifier getId(T entry)
      Overrides:
      getId in class SimpleRegistry<T>
      Mappings:
      Namespace Name Mixin selector
      official b Lgw;b(Ljava/lang/Object;)Lww;
      intermediary method_10221 Lnet/minecraft/class_2378;method_10221(Ljava/lang/Object;)Lnet/minecraft/class_2960;
      named getId Lnet/minecraft/util/registry/Registry;getId(Ljava/lang/Object;)Lnet/minecraft/util/Identifier;
    • get

      @NotNull public T get(@Nullable @Nullable Identifier id)
      Overrides:
      get in class SimpleRegistry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lgw;a(Lww;)Ljava/lang/Object;
      intermediary method_10223 Lnet/minecraft/class_2378;method_10223(Lnet/minecraft/class_2960;)Ljava/lang/Object;
      named get Lnet/minecraft/util/registry/Registry;get(Lnet/minecraft/util/Identifier;)Ljava/lang/Object;
    • getOrEmpty

      public Optional<T> getOrEmpty(@Nullable @Nullable Identifier id)
      Overrides:
      getOrEmpty in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official b Lgw;b(Lww;)Ljava/util/Optional;
      intermediary method_17966 Lnet/minecraft/class_2378;method_17966(Lnet/minecraft/class_2960;)Ljava/util/Optional;
      named getOrEmpty Lnet/minecraft/util/registry/Registry;getOrEmpty(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
    • get

      @NotNull public T get(int index)
      Specified by:
      get in interface IndexedIterable<T>
      Overrides:
      get in class SimpleRegistry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lgp;a(I)Ljava/lang/Object;
      intermediary method_10200 Lnet/minecraft/class_2359;method_10200(I)Ljava/lang/Object;
      named get Lnet/minecraft/util/collection/IndexedIterable;get(I)Ljava/lang/Object;
    • getRandom

      @NotNull public T getRandom(Random random)
      Overrides:
      getRandom in class SimpleRegistry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lgw;a(Ljava/util/Random;)Ljava/lang/Object;
      intermediary method_10240 Lnet/minecraft/class_2378;method_10240(Ljava/util/Random;)Ljava/lang/Object;
      named getRandom Lnet/minecraft/util/registry/Registry;getRandom(Ljava/util/Random;)Ljava/lang/Object;
    • getDefaultId

      public Identifier getDefaultId()
      Mappings:
      Namespace Name Mixin selector
      official a Lgk;a()Lww;
      intermediary method_10137 Lnet/minecraft/class_2348;method_10137()Lnet/minecraft/class_2960;
      named getDefaultId Lnet/minecraft/util/registry/DefaultedRegistry;getDefaultId()Lnet/minecraft/util/Identifier;