Interface ManaDiscountArmor

All Known Implementing Classes:
ElementiumHelmItem, ManasteelHelmItem, ManaweaveHelmItem, TerrasteelHelmItem

public interface ManaDiscountArmor
An armor item that implements this can provide a mana discount for mana tools. Mana tools are the ones on the main toolset (Pick, Shovel, Axe, Sword and Shovel) as well as Rods.
  • Method Summary

    Modifier and Type
    Method
    Description
    default float
    getDiscount(net.minecraft.world.item.ItemStack stack, int slot, net.minecraft.world.entity.player.Player player, @Nullable net.minecraft.world.item.ItemStack tool)
    Gets the mana discount that this piece of armor provides for the specified tool.
  • Method Details

    • getDiscount

      default float getDiscount(net.minecraft.world.item.ItemStack stack, int slot, net.minecraft.world.entity.player.Player player, @Nullable @Nullable net.minecraft.world.item.ItemStack tool)
      Gets the mana discount that this piece of armor provides for the specified tool. This is added together to create the full discount. Value is to be from 0.0 to 1.0. 0.1 is 10% discount, as an example. You can also return negative values to make tools cost more.