Package com.beansgalaxy.backpacks.items
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_SIZEFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandoesPlace(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) intgetBarColor(net.minecraft.world.item.ItemStack $$0) intgetBarWidth(net.minecraft.world.item.ItemStack stack) net.minecraft.network.chat.ComponentgetName(net.minecraft.world.item.ItemStack stack) static voidhandleQuickMove(net.minecraft.world.entity.player.Inventory playerInventory, BackpackInventory backpackInventory) static voidhandleQuickMove(net.minecraft.world.entity.player.Inventory playerInventory, BackpackInventory backpackInventory, int index) static net.minecraft.world.InteractionResulthotkeyOnBlock(net.minecraft.world.entity.player.Player player, net.minecraft.core.Direction direction, net.minecraft.core.BlockPos clickedPos) static booleaninteract(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) booleanisBarVisible(net.minecraft.world.item.ItemStack stack) net.minecraft.world.InteractionResultuseOn(net.minecraft.world.item.context.UseOnContext ctx) static net.minecraft.world.InteractionResultuseOnBackpack(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, verifyTagAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.fabricmc.fabric.api.item.v1.FabricItem
allowContinuingBlockBreaking, allowNbtUpdateAnimation, getAttributeModifiers, getRecipeRemainder, isSuitableForMethods 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:
useOnin classnet.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:
getNamein classnet.minecraft.world.item.Item
-
isBarVisible
public boolean isBarVisible(net.minecraft.world.item.ItemStack stack) - Overrides:
isBarVisiblein classnet.minecraft.world.item.Item
-
getBarWidth
public int getBarWidth(net.minecraft.world.item.ItemStack stack) - Overrides:
getBarWidthin classnet.minecraft.world.item.Item
-
getBarColor
public int getBarColor(net.minecraft.world.item.ItemStack $$0) - Overrides:
getBarColorin classnet.minecraft.world.item.Item
-