Class HarvestHandlerLeaves

java.lang.Object
me.desht.pneumaticcraft.api.harvesting.HarvestHandler
me.desht.pneumaticcraft.common.harvesting.HarvestHandlerLeaves

public class HarvestHandlerLeaves extends HarvestHandler
  • Nested Class Summary

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

    HarvestHandler.SimpleHarvestHandler
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<net.minecraft.world.item.ItemStack>
    addFilterItems(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)
    Should add the items the connected item filters in the Harvest puzzle piece in the Programmer can use to determine if a block should be harvested.
    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

    harvest, harvestAndReplant

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HarvestHandlerLeaves

      public HarvestHandlerLeaves()
  • 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.
    • addFilterItems

      public List<net.minecraft.world.item.ItemStack> addFilterItems(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
      Should add the items the connected item filters in the Harvest puzzle piece in the Programmer can use to determine if a block should be harvested. Called after HarvestHandler.canHarvest(Level, BlockGetter, BlockPos, BlockState, IDrone), when that method returns true
      Overrides:
      addFilterItems 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
      state - the blockstate
      drone - the drone