Class AbstractStorageContainerBlockItem

java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.BlockItem
com.refinedmods.refinedstorage.common.api.storage.AbstractStorageContainerBlockItem
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike
Direct Known Subclasses:
FluidStorageBlockBlockItem, ItemStorageBlockBlockItem

@API(status=STABLE, since="2.0.0-milestone.1.4") public abstract class AbstractStorageContainerBlockItem extends net.minecraft.world.item.BlockItem
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.item.Item

    net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContext
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from class net.minecraft.world.item.Item

    ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTH

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractStorageContainerBlockItem(net.minecraft.world.level.block.Block block, net.minecraft.world.item.Item.Properties properties, StorageContainerItemHelper helper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext context, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flag)
     
    protected abstract net.minecraft.world.item.ItemStack
     
    protected abstract net.minecraft.world.item.ItemStack
     
    protected abstract SerializableStorage
    createStorage(StorageRepository storageRepository)
     
    protected abstract String
    formatAmount(long amount)
     
    protected abstract Long
     
    void
    inventoryTick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity, int slotId, boolean isSelected)
     
    protected boolean
    updateCustomBlockEntityTag(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state)
     
    net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack>
    use(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
     

    Methods inherited from class net.minecraft.world.item.BlockItem

    canFitInsideContainerItems, canPlace, getBlock, getDescriptionId, getPlacementState, getPlaceSound, mustSurvive, onDestroyed, place, placeBlock, registerBlocks, requiredFeatures, setBlockEntityData, updateCustomBlockEntityTag, updatePlacementContext, useOn

    Methods inherited from class net.minecraft.world.item.Item

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isValidRepairItem, mineBlock, onCraftedBy, onCraftedPostProcess, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, releaseUsing, toString, useOnRelease, verifyComponentsAfterLoad

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.world.flag.FeatureElement

    isEnabled
  • Field Details

  • Constructor Details

    • AbstractStorageContainerBlockItem

      protected AbstractStorageContainerBlockItem(net.minecraft.world.level.block.Block block, net.minecraft.world.item.Item.Properties properties, StorageContainerItemHelper helper)
  • Method Details

    • inventoryTick

      public void inventoryTick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity, int slotId, boolean isSelected)
      Overrides:
      inventoryTick in class net.minecraft.world.item.Item
    • use

      public net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> use(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
      Overrides:
      use in class net.minecraft.world.item.Item
    • updateCustomBlockEntityTag

      protected boolean updateCustomBlockEntityTag(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level level, @Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state)
      Overrides:
      updateCustomBlockEntityTag in class net.minecraft.world.item.BlockItem
    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext context, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flag)
      Overrides:
      appendHoverText in class net.minecraft.world.item.BlockItem
    • getCapacity

      @Nullable protected abstract Long getCapacity()
    • formatAmount

      protected abstract String formatAmount(long amount)
    • createStorage

      protected abstract SerializableStorage createStorage(StorageRepository storageRepository)
    • createPrimaryDisassemblyByproduct

      protected abstract net.minecraft.world.item.ItemStack createPrimaryDisassemblyByproduct(int count)
    • createSecondaryDisassemblyByproduct

      @Nullable protected abstract net.minecraft.world.item.ItemStack createSecondaryDisassemblyByproduct(int count)