Class HoeHandler

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

public class HoeHandler extends net.minecraftforge.registries.ForgeRegistryEntry<HoeHandler> 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.

    Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry

    net.minecraftforge.registries.ForgeRegistryEntry.UncheckedRegistryEntry<V extends net.minecraftforge.registries.IForgeRegistryEntry<V>>
  • Field Summary

    Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry

    delegate
  • 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 net.minecraftforge.registries.ForgeRegistryEntry

    getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName

    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)