Class ItemBowBehavior
java.lang.Object
org.cloudburstmc.server.item.behavior.CloudItemBehavior
org.cloudburstmc.server.item.behavior.ItemToolBehavior
org.cloudburstmc.server.item.behavior.ItemBowBehavior
- All Implemented Interfaces:
org.cloudburstmc.api.item.behavior.ItemBehavior
author: MagicDroidX
Nukkit Project
-
Field Summary
Fields inherited from class org.cloudburstmc.server.item.behavior.ItemToolBehavior
DURABILITY_BOW, DURABILITY_DIAMOND, DURABILITY_FISHING_ROD, DURABILITY_FLINT_STEEL, DURABILITY_GOLD, DURABILITY_IRON, DURABILITY_NETHERITE, DURABILITY_SHEARS, DURABILITY_STONE, DURABILITY_TRIDENT, DURABILITY_WOODEN, tierType, toolType, TYPE_AXE, TYPE_HANDS_ONLY, TYPE_NONE, TYPE_PICKAXE, TYPE_SHEARS, TYPE_SHOVEL, TYPE_SWORD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetEnchantAbility(org.cloudburstmc.api.item.ItemStack item)intbooleanonClickAir(org.cloudburstmc.api.item.ItemStack item, com.nukkitx.math.vector.Vector3f directionVector, org.cloudburstmc.api.player.Player player)Called when a player uses the item on air, for example throwing a projectile.org.cloudburstmc.api.item.ItemStackonRelease(org.cloudburstmc.api.item.ItemStack item, int ticksUsed, org.cloudburstmc.api.player.Player player)Methods inherited from class org.cloudburstmc.server.item.behavior.ItemToolBehavior
getMaxStackSize, isAxe, isHoe, isPickaxe, isShears, isShovel, isSword, isTool, isUnbreakable, useOn, useOnMethods inherited from class org.cloudburstmc.server.item.behavior.CloudItemBehavior
canBeActivated, canBePlaced, canDestroy, canPlaceOn, getArmorPoints, getAttackDamage, getBlock, getFuelTime, getTier, getToolType, getToughness, isArmor, isBoots, isChestplate, isHelmet, isLeggings, onActivate, onUse
-
Constructor Details
-
ItemBowBehavior
public ItemBowBehavior()
-
-
Method Details
-
getMaxDurability
public int getMaxDurability()- Specified by:
getMaxDurabilityin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
getMaxDurabilityin classCloudItemBehavior
-
getEnchantAbility
public int getEnchantAbility(org.cloudburstmc.api.item.ItemStack item)- Specified by:
getEnchantAbilityin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
getEnchantAbilityin classItemToolBehavior
-
onClickAir
public boolean onClickAir(org.cloudburstmc.api.item.ItemStack item, com.nukkitx.math.vector.Vector3f directionVector, org.cloudburstmc.api.player.Player player)Description copied from class:CloudItemBehaviorCalled when a player uses the item on air, for example throwing a projectile. Returns whether the item was changed, for example count decrease or durability change.- Specified by:
onClickAirin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
onClickAirin classCloudItemBehaviordirectionVector- directionplayer- player- Returns:
- item changed
-
onRelease
public org.cloudburstmc.api.item.ItemStack onRelease(org.cloudburstmc.api.item.ItemStack item, int ticksUsed, org.cloudburstmc.api.player.Player player)- Specified by:
onReleasein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
onReleasein classCloudItemBehavior
-