Class HoeItem

All Implemented Interfaces:
ItemConvertible, Vanishable

public class HoeItem
extends MiningToolItem
  • Field Details

    • EFFECTIVE_BLOCKS

      private static final Set<Block> EFFECTIVE_BLOCKS
    • TILLED_BLOCKS

      protected static final Map<Block,​BlockState> TILLED_BLOCKS
  • Constructor Details

  • Method Details

    • useOnBlock

      public ActionResult useOnBlock​(ItemUsageContext context)
      Called when an item is used on a block.

      This method is called on both the logical client and logical server, so take caution when using this method. The logical side can be checked using context.getWorld().isClient().

      Overrides:
      useOnBlock in class Item
      Parameters:
      context - the usage context
      Returns:
      an action result that specifies if using the item on a block was successful.