public class HarvestHandlerTree extends HarvestHandler
HarvestHandler.SimpleHarvestHandler| Constructor and Description |
|---|
HarvestHandlerTree() |
| 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.
|
boolean |
harvestAndReplant(net.minecraft.world.World world,
net.minecraft.world.IBlockReader chunkCache,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.BlockState state,
IDrone drone)
Should harvest the block (drop items), and replant the plant if applicable.
|
addFilterItems, harvestpublic 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 dronepublic boolean harvestAndReplant(net.minecraft.world.World world,
net.minecraft.world.IBlockReader chunkCache,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.BlockState state,
IDrone drone)
HarvestHandlerharvestAndReplant 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 block's positionstate - the blockstate at the positiondrone - the drone doing the harvesting