Class RegistryUtils

java.lang.Object
com.portingdeadmods.portingdeadlibs.utils.RegistryUtils

public final class RegistryUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> net.minecraft.core.Holder.Reference<T>
    holder(net.minecraft.core.Registry<T> registry, T value)
    Returns the holder reference for a value on that registry.
    static <T> net.minecraft.resources.ResourceKey<T>
    resourceKey(net.minecraft.core.Registry<T> registry, T value)
    Returns the resource key for a value on that registry.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RegistryUtils

      public RegistryUtils()
  • Method Details

    • resourceKey

      public static <T> net.minecraft.resources.ResourceKey<T> resourceKey(net.minecraft.core.Registry<T> registry, T value)
      Returns the resource key for a value on that registry.
    • holder

      public static <T> net.minecraft.core.Holder.Reference<T> holder(net.minecraft.core.Registry<T> registry, T value)
      Returns the holder reference for a value on that registry.