Class HarvestHandlerLeaves
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<HarvestHandler>
me.desht.pneumaticcraft.api.harvesting.HarvestHandler
me.desht.pneumaticcraft.common.harvesting.HarvestHandlerLeaves
- All Implemented Interfaces:
net.minecraftforge.registries.IForgeRegistryEntry<HarvestHandler>
-
Nested Class Summary
Nested classes/interfaces inherited from class me.desht.pneumaticcraft.api.harvesting.HarvestHandler
HarvestHandler.SimpleHarvestHandlerNested 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 -
Method Summary
Modifier and TypeMethodDescriptionList<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.booleancanHarvest(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, harvestAndReplantMethods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
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:HarvestHandlerDetermines if the currently checked block can be harvested.- Specified by:
canHarvestin classHarvestHandler- Parameters:
world- 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- 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:HarvestHandlerShould 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 afterHarvestHandler.canHarvest(World, IBlockReader, BlockPos, BlockState, IDrone), when that method returns true- Overrides:
addFilterItemsin classHarvestHandler- Parameters:
world- 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 blockposstate- the blockstatedrone- the drone
-