Class BlackHoleTalismanItem.BlockProviderImpl

java.lang.Object
vazkii.botania.common.item.BlackHoleTalismanItem.BlockProviderImpl
All Implemented Interfaces:
BlockProvider
Enclosing class:
BlackHoleTalismanItem

public static class BlackHoleTalismanItem.BlockProviderImpl extends Object implements BlockProvider
  • Field Summary

    Fields inherited from interface vazkii.botania.api.item.BlockProvider

    ID
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockProviderImpl(net.minecraft.world.item.ItemStack stack)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getBlockCount(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.
    boolean
    provideBlock(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.

    Methods inherited from class java.lang.Object

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

    • BlockProviderImpl

      public BlockProviderImpl(net.minecraft.world.item.ItemStack stack)
  • 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: BlockProvider
      Provides 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:
      provideBlock in interface BlockProvider
    • 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: BlockProvider
      Gets 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:
      getBlockCount in interface BlockProvider