Class WizardArmorItem

java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ArmorItem
com.binaris.wizardry.content.item.WizardArmorItem
All Implemented Interfaces:
IElementValue, IManaStoringItem, IWorkbenchItem, net.minecraft.world.flag.FeatureElement, net.minecraft.world.item.Equipable, net.minecraft.world.item.Vanishable, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem

public class WizardArmorItem extends net.minecraft.world.item.ArmorItem implements IManaStoringItem, IWorkbenchItem, IElementValue
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.item.ArmorItem

    net.minecraft.world.item.ArmorItem.Type

    Nested classes/interfaces inherited from class net.minecraft.world.item.Item

    net.minecraft.world.item.Item.Properties
  • Field Summary

    Fields inherited from class net.minecraft.world.item.ArmorItem

    DISPENSE_ITEM_BEHAVIOR, knockbackResistance, material, type

    Fields inherited from class net.minecraft.world.item.Item

    BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    WizardArmorItem(WizardArmorType material, net.minecraft.world.item.ArmorItem.Type type, Element element)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendHoverText(@NotNull net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, @NotNull List<net.minecraft.network.chat.Component> tooltip, @NotNull net.minecraft.world.item.TooltipFlag advanced)
     
    protected void
    applySpellModifiers(net.minecraft.world.entity.LivingEntity caster, Spell spell, SpellModifiers modifiers)
     
    net.minecraft.world.item.ItemStack
    applyUpgrade(@Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.ItemStack upgrade)
     
    int
    getBarColor(@NotNull net.minecraft.world.item.ItemStack stack)
     
    Gets the element associated with this item.
    int
    getMana(net.minecraft.world.item.ItemStack stack)
     
    int
    getManaCapacity(net.minecraft.world.item.ItemStack stack)
     
    @NotNull net.minecraft.network.chat.Component
    getName(@NotNull net.minecraft.world.item.ItemStack stack)
     
    int
    getSpellSlotCount(net.minecraft.world.item.ItemStack stack)
     
     
    void
    inventoryTick(@NotNull net.minecraft.world.item.ItemStack stack, @NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.entity.Entity entity, int slotId, boolean isSelected)
     
    boolean
    isValidRepairItem(@NotNull net.minecraft.world.item.ItemStack toRepair, @NotNull net.minecraft.world.item.ItemStack repair)
     
    boolean
    onApplyButtonPressed(net.minecraft.world.entity.player.Player player, net.minecraft.world.inventory.Slot centre, net.minecraft.world.inventory.Slot crystals, net.minecraft.world.inventory.Slot upgrade, net.minecraft.world.inventory.Slot[] spellBooks)
     
    static void
     
    void
    setMana(net.minecraft.world.item.ItemStack stack, int mana)
     
    boolean
    showTooltip(net.minecraft.world.item.ItemStack stack)
     
    boolean
    Determines if this item is valid for use in a receptacle.

    Methods inherited from class net.minecraft.world.item.ArmorItem

    dispenseArmor, getDefaultAttributeModifiers, getDefense, getEnchantmentValue, getEquipmentSlot, getEquipSound, getMaterial, getToughness, getType, use

    Methods inherited from class net.minecraft.world.item.Item

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarWidth, getCraftingRemainingItem, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoad

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.world.item.Equipable

    swapWithEquipmentSlot

    Methods inherited from interface net.minecraft.world.flag.FeatureElement

    isEnabled

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem

    canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation

    Methods inherited from interface com.binaris.wizardry.api.content.item.IManaStoringItem

    consumeMana, getFullness, isManaEmpty, isManaFull, rechargeMana, showManaInWorkbench

    Methods inherited from interface com.binaris.wizardry.api.content.item.IWorkbenchItem

    canPlace, isClearable, onClearButtonPressed
  • Constructor Details

    • WizardArmorItem

      public WizardArmorItem(WizardArmorType material, net.minecraft.world.item.ArmorItem.Type type, Element element)
  • Method Details

    • onSpellPreCast

      public static void onSpellPreCast(SpellCastEvent.Pre event)
    • applyUpgrade

      public net.minecraft.world.item.ItemStack applyUpgrade(@Nullable @Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.ItemStack upgrade)
      Specified by:
      applyUpgrade in interface IWorkbenchItem
    • onApplyButtonPressed

      public boolean onApplyButtonPressed(net.minecraft.world.entity.player.Player player, net.minecraft.world.inventory.Slot centre, net.minecraft.world.inventory.Slot crystals, net.minecraft.world.inventory.Slot upgrade, net.minecraft.world.inventory.Slot[] spellBooks)
      Specified by:
      onApplyButtonPressed in interface IWorkbenchItem
    • appendHoverText

      public void appendHoverText(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, @NotNull @NotNull List<net.minecraft.network.chat.Component> tooltip, @NotNull @NotNull net.minecraft.world.item.TooltipFlag advanced)
      Overrides:
      appendHoverText in class net.minecraft.world.item.Item
    • inventoryTick

      public void inventoryTick(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, @NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.entity.Entity entity, int slotId, boolean isSelected)
      Overrides:
      inventoryTick in class net.minecraft.world.item.Item
    • applySpellModifiers

      protected void applySpellModifiers(net.minecraft.world.entity.LivingEntity caster, Spell spell, SpellModifiers modifiers)
    • getName

      @NotNull public @NotNull net.minecraft.network.chat.Component getName(@NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      Overrides:
      getName in class net.minecraft.world.item.Item
    • getWizardArmorType

      public WizardArmorType getWizardArmorType()
    • getElement

      public Element getElement()
      Description copied from interface: IElementValue
      Gets the element associated with this item.
      Specified by:
      getElement in interface IElementValue
      Returns:
      The element of the item.
    • validForReceptacle

      public boolean validForReceptacle()
      Description copied from interface: IElementValue
      Determines if this item is valid for use in a receptacle.
      Specified by:
      validForReceptacle in interface IElementValue
      Returns:
      true if the item can be used in a receptacle, false otherwise.
    • getBarColor

      public int getBarColor(@NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      Overrides:
      getBarColor in class net.minecraft.world.item.Item
    • getMana

      public int getMana(net.minecraft.world.item.ItemStack stack)
      Specified by:
      getMana in interface IManaStoringItem
    • setMana

      public void setMana(net.minecraft.world.item.ItemStack stack, int mana)
      Specified by:
      setMana in interface IManaStoringItem
    • getManaCapacity

      public int getManaCapacity(net.minecraft.world.item.ItemStack stack)
      Specified by:
      getManaCapacity in interface IManaStoringItem
    • getSpellSlotCount

      public int getSpellSlotCount(net.minecraft.world.item.ItemStack stack)
      Specified by:
      getSpellSlotCount in interface IWorkbenchItem
    • showTooltip

      public boolean showTooltip(net.minecraft.world.item.ItemStack stack)
      Specified by:
      showTooltip in interface IWorkbenchItem
    • isValidRepairItem

      public boolean isValidRepairItem(@NotNull @NotNull net.minecraft.world.item.ItemStack toRepair, @NotNull @NotNull net.minecraft.world.item.ItemStack repair)
      Overrides:
      isValidRepairItem in class net.minecraft.world.item.ArmorItem