Class PickaxeItem

All Implemented Interfaces:
ItemConvertible, Vanishable

public class PickaxeItem
extends MiningToolItem
  • Field Details

    • EFFECTIVE_BLOCKS

      private static final Set<Block> EFFECTIVE_BLOCKS
    • BLOCK_MINING_LEVELS

      private static final Object2IntMap<Block> BLOCK_MINING_LEVELS
  • Constructor Details

    • PickaxeItem

      protected PickaxeItem​(ToolMaterial material, int attackDamage, float attackSpeed, Item.Settings settings)
  • Method Details

    • isSuitableFor

      public boolean isSuitableFor​(BlockState state)
      Determines whether this item can be used as a suitable tool for mining the specified block. Depending on block implementation, when combined together, the correct item and block may achieve a better mining speed and yield drops that would not be obtained when mining otherwise.

      Note that this is not the only way to achieve "effectiveness" when mining. Other items, such as shears on string, may use their own logic and calls to this method might not return a value consistent to this rule for those items.

      Overrides:
      isSuitableFor in class Item
    • getMiningSpeedMultiplier

      public float getMiningSpeedMultiplier​(ItemStack stack, BlockState state)
      Overrides:
      getMiningSpeedMultiplier in class MiningToolItem