Package vazkii.botania.common.item.rod
Class TerraFirmaRodItem.BlockProviderImpl
java.lang.Object
vazkii.botania.common.item.rod.TerraFirmaRodItem.BlockProviderImpl
- All Implemented Interfaces:
BlockProvider
- Enclosing class:
TerraFirmaRodItem
-
Field Summary
Fields inherited from interface vazkii.botania.api.item.BlockProvider
ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetBlockCount(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack requestor, net.minecraft.world.level.block.Block block) Gets the amount of blocks of the type passed stored in this item.booleanprovideBlock(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack requestor, net.minecraft.world.level.block.Block block, boolean doit) Provides the requested item.
-
Constructor Details
-
BlockProviderImpl
public BlockProviderImpl()
-
-
Method Details
-
provideBlock
public boolean provideBlock(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack requestor, net.minecraft.world.level.block.Block block, boolean doit) Description copied from interface:BlockProviderProvides the requested item. The doit paremeter specifies whether this is just a test (false) or if the item should actually be removed (true). If you need to use calls to ManaItemHandler.requestMana[Exact], use the requestor as the ItemStack passed in.- Specified by:
provideBlockin interfaceBlockProvider
-
getBlockCount
public int getBlockCount(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack requestor, net.minecraft.world.level.block.Block block) Description copied from interface:BlockProviderGets the amount of blocks of the type passed stored in this item. You must check for the block passed in to not give the counter for a wrong block. Returning -1 states that the item can provide infinite of the item passed in (for example, the Rod of the Lands would return -1 if the block is dirt).- Specified by:
getBlockCountin interfaceBlockProvider
-