Class HoeHandler

java.lang.Object
me.desht.pneumaticcraft.api.harvesting.HoeHandler
All Implemented Interfaces:
Predicate<net.minecraft.world.item.ItemStack>
Direct Known Subclasses:
HoeHandler.DefaultHoeHandler, PaxelHandler

public class HoeHandler extends Object implements Predicate<net.minecraft.world.item.ItemStack>
Defines a hoe handler; use this to register items that are not vanilla-style hoes (i.e. do not extend HoeItem) as a valid tool for Harvesting Drones to use.

Hoe handlers are Forge registry objects and should be registered as such.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Default implementation for vanilla-compatible hoes.
  • Constructor Summary

    Constructors
    Constructor
    Description
    HoeHandler(Predicate<net.minecraft.world.item.ItemStack> matchItem, BiConsumer<net.minecraft.world.item.ItemStack,net.minecraft.world.entity.player.Player> useDurability)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Consumer<net.minecraft.world.entity.player.Player>
    getConsumer(net.minecraft.world.item.ItemStack stack)
     
    boolean
    test(net.minecraft.world.item.ItemStack stack)
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Constructor Details

    • HoeHandler

      public HoeHandler(Predicate<net.minecraft.world.item.ItemStack> matchItem, BiConsumer<net.minecraft.world.item.ItemStack,net.minecraft.world.entity.player.Player> useDurability)
  • Method Details

    • test

      public boolean test(net.minecraft.world.item.ItemStack stack)
      Specified by:
      test in interface Predicate<net.minecraft.world.item.ItemStack>
    • getConsumer

      public Consumer<net.minecraft.world.entity.player.Player> getConsumer(net.minecraft.world.item.ItemStack stack)