Class RegistryUtils

java.lang.Object
com.binaris.wizardry.api.content.util.RegistryUtils

public final class RegistryUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.item.Item
    getArmor(WizardArmorType type, Element element, net.minecraft.util.RandomSource randomSource)
    Gets a random wizard armor item of the given type and element.
    static net.minecraft.world.item.Item
    getArmor(WizardArmorType wizardArmorType, Element element, net.minecraft.world.entity.EquipmentSlot slot)
    Gets a wizard armor item based on the given parameters, searching for its implementation in the item registry by constructing its registry name accordingly.
    static net.minecraft.world.item.Item
     
    static net.minecraft.world.item.Item
    getWand(@NotNull SpellTier tier, @Nullable Element element)
    Returns the wand Item corresponding to the given tier and element.

    Methods inherited from class java.lang.Object

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

    • getWand

      public static net.minecraft.world.item.Item getWand(@NotNull @NotNull SpellTier tier, @Nullable @Nullable Element element)
      Returns the wand Item corresponding to the given tier and element.
      Parameters:
      tier - The tier of the wand.
      element - The element of the wand. If null, defaults to Elements.MAGIC.
      Returns:
      The wand Item.
    • getCrystal

      public static net.minecraft.world.item.Item getCrystal(Element element)
    • getArmor

      public static net.minecraft.world.item.Item getArmor(WizardArmorType type, Element element, net.minecraft.util.RandomSource randomSource)
      Gets a random wizard armor item of the given type and element.
      Parameters:
      type - The type of wizard armor.
      element - The element of the armor. If null, defaults to magic.
      Returns:
      The corresponding wizard armor item.
    • getArmor

      public static net.minecraft.world.item.Item getArmor(WizardArmorType wizardArmorType, Element element, net.minecraft.world.entity.EquipmentSlot slot)
      Gets a wizard armor item based on the given parameters, searching for its implementation in the item registry by constructing its registry name accordingly.
      Parameters:
      wizardArmorType - The type of wizard armor.
      element - The element of the armor. If null, defaults to magic.
      slot - The equipment slot for the armor piece.
      Returns:
      The corresponding wizard armor item.
      Throws:
      IllegalArgumentException - if the slot is null or not an armor slot. (this should never happen if used correctly)