Class RegistryUtils
java.lang.Object
com.binaris.wizardry.api.content.util.RegistryUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.item.ItemgetArmor(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.ItemgetArmor(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.ItemgetCrystal(Element element) static net.minecraft.world.item.ItemReturns the wand Item corresponding to the given tier and element.
-
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 toElements.MAGIC.- Returns:
- The wand Item.
-
getCrystal
-
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)
-