public class HarvestHandlerCactusLike extends HarvestHandler
HarvestHandler.SimpleHarvestHandler| Constructor and Description |
|---|
HarvestHandlerCactusLike(java.util.function.Predicate<net.minecraft.block.BlockState> blockChecker) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHarvest(net.minecraft.world.World world,
net.minecraft.world.IBlockReader chunkCache,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.BlockState state,
IDrone drone)
Determines if the currently checked block can be harvested.
|
addFilterItems, harvest, harvestAndReplantpublic HarvestHandlerCactusLike(java.util.function.Predicate<net.minecraft.block.BlockState> blockChecker)
public boolean canHarvest(net.minecraft.world.World world,
net.minecraft.world.IBlockReader chunkCache,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.BlockState state,
IDrone drone)
HarvestHandlercanHarvest in class HarvestHandlerworld - the worldchunkCache - 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 checkedstate - the blockstatedrone - the drone