Class ItemTridentBehavior
java.lang.Object
org.cloudburstmc.server.item.behavior.CloudItemBehavior
org.cloudburstmc.server.item.behavior.ItemToolBehavior
org.cloudburstmc.server.item.behavior.ItemTridentBehavior
- All Implemented Interfaces:
org.cloudburstmc.api.item.behavior.ItemBehavior
Created by PetteriM1
-
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 TypeMethodDescriptionintgetAttackDamage(org.cloudburstmc.api.item.ItemStack item)intbooleanisSword()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.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
getEnchantAbility, getMaxStackSize, isAxe, isHoe, isPickaxe, isShears, isShovel, isTool, isUnbreakable, useOn, useOnMethods inherited from class org.cloudburstmc.server.item.behavior.CloudItemBehavior
canBeActivated, canBePlaced, canDestroy, canPlaceOn, getArmorPoints, getBlock, getFuelTime, getTier, getToolType, getToughness, isArmor, isBoots, isChestplate, isHelmet, isLeggings, onActivate, onUse
-
Constructor Details
-
ItemTridentBehavior
public ItemTridentBehavior()
-
-
Method Details
-
getMaxDurability
public int getMaxDurability()- Specified by:
getMaxDurabilityin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
getMaxDurabilityin classCloudItemBehavior
-
isSword
public boolean isSword()- Specified by:
isSwordin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isSwordin classItemToolBehavior
-
getAttackDamage
public int getAttackDamage(org.cloudburstmc.api.item.ItemStack item)- Specified by:
getAttackDamagein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
getAttackDamagein classCloudItemBehavior
-
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
-