Class ItemFireworkBehavior
java.lang.Object
org.cloudburstmc.server.item.behavior.CloudItemBehavior
org.cloudburstmc.server.item.behavior.ItemFireworkBehavior
- All Implemented Interfaces:
org.cloudburstmc.api.item.behavior.ItemBehavior
- Author:
- CreeperFace
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.cloudburstmc.api.item.ItemStackonActivate(org.cloudburstmc.api.item.ItemStack itemStack, org.cloudburstmc.api.player.Player player, org.cloudburstmc.api.block.Block block, org.cloudburstmc.api.block.Block target, org.cloudburstmc.api.util.Direction face, com.nukkitx.math.vector.Vector3f clickPos, org.cloudburstmc.api.level.Level level)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.Methods inherited from class org.cloudburstmc.server.item.behavior.CloudItemBehavior
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, onRelease, onUse, useOn, useOn
-
Constructor Details
-
ItemFireworkBehavior
public ItemFireworkBehavior()
-
-
Method Details
-
canBeActivated
public boolean canBeActivated()- Specified by:
canBeActivatedin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
canBeActivatedin classCloudItemBehavior
-
onActivate
public org.cloudburstmc.api.item.ItemStack onActivate(org.cloudburstmc.api.item.ItemStack itemStack, org.cloudburstmc.api.player.Player player, org.cloudburstmc.api.block.Block block, org.cloudburstmc.api.block.Block target, org.cloudburstmc.api.util.Direction face, com.nukkitx.math.vector.Vector3f clickPos, org.cloudburstmc.api.level.Level level)- Specified by:
onActivatein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
onActivatein 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
-