Class ItemFishingRodBehavior
java.lang.Object
org.cloudburstmc.server.item.behavior.CloudItemBehavior
org.cloudburstmc.server.item.behavior.ItemToolBehavior
org.cloudburstmc.server.item.behavior.ItemFishingRodBehavior
- All Implemented Interfaces:
org.cloudburstmc.api.item.behavior.ItemBehavior
Created by Snake1999 on 2016/1/14.
Package cn.nukkit.item in project nukkit.
-
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)intintgetMaxStackSize(org.cloudburstmc.api.item.ItemStack item)booleanonClickAir(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.ItemStackonUse(org.cloudburstmc.api.item.ItemStack item, int ticksUsed, org.cloudburstmc.api.player.Player p)Methods inherited from class org.cloudburstmc.server.item.behavior.ItemToolBehavior
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, onRelease
-
Constructor Details
-
ItemFishingRodBehavior
public ItemFishingRodBehavior()
-
-
Method Details
-
getEnchantAbility
public int getEnchantAbility(org.cloudburstmc.api.item.ItemStack item)- Specified by:
getEnchantAbilityin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
getEnchantAbilityin classItemToolBehavior
-
getMaxStackSize
public int getMaxStackSize(org.cloudburstmc.api.item.ItemStack item)- Specified by:
getMaxStackSizein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
getMaxStackSizein 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
-
onUse
public org.cloudburstmc.api.item.ItemStack onUse(org.cloudburstmc.api.item.ItemStack item, int ticksUsed, org.cloudburstmc.api.player.Player p)- Specified by:
onUsein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
onUsein classCloudItemBehavior
-
getMaxDurability
public int getMaxDurability()- Specified by:
getMaxDurabilityin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
getMaxDurabilityin classCloudItemBehavior
-