Class ItemChorusFruitBehavior
java.lang.Object
org.cloudburstmc.server.item.behavior.CloudItemBehavior
org.cloudburstmc.server.item.behavior.ItemEdibleBehavior
org.cloudburstmc.server.item.behavior.ItemChorusFruitBehavior
- All Implemented Interfaces:
org.cloudburstmc.api.item.behavior.ItemBehavior
Created by Leonidius20 on 20.08.18.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanonClickAir(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 player)Methods inherited from class org.cloudburstmc.server.item.behavior.CloudItemBehavior
canBeActivated, canBePlaced, canDestroy, canPlaceOn, getArmorPoints, getAttackDamage, getBlock, getEnchantAbility, getFuelTime, getMaxDurability, getMaxStackSize, getTier, getToolType, getToughness, isArmor, isAxe, isBoots, isChestplate, isHelmet, isHoe, isLeggings, isPickaxe, isShears, isShovel, isSword, isTool, isUnbreakable, onActivate, onRelease, useOn, useOn
-
Constructor Details
-
ItemChorusFruitBehavior
public ItemChorusFruitBehavior()
-
-
Method Details
-
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 classItemEdibleBehaviordirectionVector- 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 player)- Specified by:
onUsein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
onUsein classItemEdibleBehavior
-