Class HarvestHandler.SimpleHarvestHandler

java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<HarvestHandler>
me.desht.pneumaticcraft.api.harvesting.HarvestHandler
me.desht.pneumaticcraft.api.harvesting.HarvestHandler.SimpleHarvestHandler
All Implemented Interfaces:
net.minecraftforge.registries.IForgeRegistryEntry<HarvestHandler>
Enclosing class:
HarvestHandler

public static class HarvestHandler.SimpleHarvestHandler extends HarvestHandler
A simple harvest handler which just compares against a list of blocks, without checking any blockstate properties.
  • Nested Class Summary

    Nested classes/interfaces inherited from class me.desht.pneumaticcraft.api.harvesting.HarvestHandler

    HarvestHandler.SimpleHarvestHandler

    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
    SimpleHarvestHandler(net.minecraft.world.level.block.Block... blocks)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canHarvest(net.minecraft.world.level.Level world, net.minecraft.world.level.BlockGetter chunkCache, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, IDrone drone)
    Determines if the currently checked block can be harvested.

    Methods inherited from class me.desht.pneumaticcraft.api.harvesting.HarvestHandler

    addFilterItems, harvest, harvestAndReplant

    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
  • Constructor Details

    • SimpleHarvestHandler

      public SimpleHarvestHandler(net.minecraft.world.level.block.Block... blocks)
  • Method Details

    • canHarvest

      public boolean canHarvest(net.minecraft.world.level.Level world, net.minecraft.world.level.BlockGetter chunkCache, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, IDrone drone)
      Description copied from class: HarvestHandler
      Determines if the currently checked block can be harvested.
      Specified by:
      canHarvest in class HarvestHandler
      Parameters:
      world - the world
      chunkCache - Use preferably methods from this cache as it's generally quicker than accessing via 'world'. The cache has access to the chunks that are accessed by the Drone current program, so as long as only the y pos is varied of the supplied pos, you are good. If not, use 'world'.
      pos - the blockpos to be checked
      state - the blockstate
      drone - the drone
      Returns:
      true if the block can be harvested, false if not.