Class BackpackItem

java.lang.Object
net.minecraft.world.item.Item
com.beansgalaxy.backpacks.items.BackpackItem
All Implemented Interfaces:
net.fabricmc.fabric.api.item.v1.FabricItem, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike
Direct Known Subclasses:
DyableBackpack, EnderBackpack

public class BackpackItem extends net.minecraft.world.item.Item
  • Nested Class Summary

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

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

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

    BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE

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

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    BackpackItem(net.minecraft.world.item.Item.Properties properties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    doesPlace(net.minecraft.world.entity.player.Player player, int x, double y, int z, net.minecraft.core.Direction direction, net.minecraft.world.item.ItemStack backpackStack, boolean fromBackSlot)
     
    int
    getBarColor(net.minecraft.world.item.ItemStack $$0)
     
    int
    getBarWidth(net.minecraft.world.item.ItemStack stack)
     
    net.minecraft.network.chat.Component
    getName(net.minecraft.world.item.ItemStack stack)
     
    static void
    handleQuickMove(net.minecraft.world.entity.player.Inventory playerInventory, BackpackInventory backpackInventory)
     
    static void
    handleQuickMove(net.minecraft.world.entity.player.Inventory playerInventory, BackpackInventory backpackInventory, int index)
     
    static net.minecraft.world.InteractionResult
    hotkeyOnBlock(net.minecraft.world.entity.player.Player player, net.minecraft.core.Direction direction, net.minecraft.core.BlockPos clickedPos)
     
    static boolean
    interact(net.minecraft.world.item.ItemStack backStack, net.minecraft.world.inventory.ClickAction clickAction, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.SlotAccess access, boolean shiftIsDown)
     
    boolean
    isBarVisible(net.minecraft.world.item.ItemStack stack)
     
    net.minecraft.world.InteractionResult
    useOn(net.minecraft.world.item.context.UseOnContext ctx)
     
    static net.minecraft.world.InteractionResult
    useOnBackpack(net.minecraft.world.entity.player.Player player, EntityAbstract entityAbstract, net.minecraft.world.item.ItemStack backpackStack, boolean fromBackSlot)
     

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

    appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, useOnRelease, verifyTagAfterLoad

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.fabricmc.fabric.api.item.v1.FabricItem

    allowContinuingBlockBreaking, allowNbtUpdateAnimation, getAttributeModifiers, getRecipeRemainder, isSuitableFor

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

    isEnabled
  • Constructor Details

    • BackpackItem

      public BackpackItem(net.minecraft.world.item.Item.Properties properties)
  • Method Details

    • useOn

      public net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext ctx)
      Overrides:
      useOn in class net.minecraft.world.item.Item
    • interact

      public static boolean interact(net.minecraft.world.item.ItemStack backStack, net.minecraft.world.inventory.ClickAction clickAction, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.SlotAccess access, boolean shiftIsDown)
    • handleQuickMove

      public static void handleQuickMove(net.minecraft.world.entity.player.Inventory playerInventory, BackpackInventory backpackInventory)
    • handleQuickMove

      public static void handleQuickMove(net.minecraft.world.entity.player.Inventory playerInventory, BackpackInventory backpackInventory, int index)
    • hotkeyOnBlock

      public static net.minecraft.world.InteractionResult hotkeyOnBlock(net.minecraft.world.entity.player.Player player, net.minecraft.core.Direction direction, net.minecraft.core.BlockPos clickedPos)
    • useOnBackpack

      public static net.minecraft.world.InteractionResult useOnBackpack(net.minecraft.world.entity.player.Player player, EntityAbstract entityAbstract, net.minecraft.world.item.ItemStack backpackStack, boolean fromBackSlot)
    • doesPlace

      public static boolean doesPlace(net.minecraft.world.entity.player.Player player, int x, double y, int z, net.minecraft.core.Direction direction, net.minecraft.world.item.ItemStack backpackStack, boolean fromBackSlot)
    • getName

      public net.minecraft.network.chat.Component getName(net.minecraft.world.item.ItemStack stack)
      Overrides:
      getName in class net.minecraft.world.item.Item
    • isBarVisible

      public boolean isBarVisible(net.minecraft.world.item.ItemStack stack)
      Overrides:
      isBarVisible in class net.minecraft.world.item.Item
    • getBarWidth

      public int getBarWidth(net.minecraft.world.item.ItemStack stack)
      Overrides:
      getBarWidth in class net.minecraft.world.item.Item
    • getBarColor

      public int getBarColor(net.minecraft.world.item.ItemStack $$0)
      Overrides:
      getBarColor in class net.minecraft.world.item.Item