Class ItemToolBehavior
java.lang.Object
org.cloudburstmc.server.item.behavior.CloudItemBehavior
org.cloudburstmc.server.item.behavior.ItemToolBehavior
- All Implemented Interfaces:
org.cloudburstmc.api.item.behavior.ItemBehavior
- Direct Known Subclasses:
ItemBowBehavior,ItemFishingRodBehavior,ItemFlintSteelBehavior,ItemTridentBehavior
author: MagicDroidX
Nukkit Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic intstatic intstatic intstatic intstatic intstatic intstatic intstatic intstatic intstatic intprotected org.cloudburstmc.api.item.TierTypeprotected org.cloudburstmc.api.item.ToolTypestatic intstatic intSame breaking speed independent of the tool.static intstatic intstatic intstatic intstatic int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetEnchantAbility(org.cloudburstmc.api.item.ItemStack item)intgetMaxStackSize(org.cloudburstmc.api.item.ItemStack item)booleanisAxe()booleanisHoe()booleanbooleanisShears()booleanisShovel()booleanisSword()booleanisTool(org.cloudburstmc.api.item.ItemStack item)booleanisUnbreakable(org.cloudburstmc.api.item.ItemStack item)org.cloudburstmc.api.item.ItemStackuseOn(org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.block.BlockState state)org.cloudburstmc.api.item.ItemStackuseOn(org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.entity.Entity entity)Methods inherited from class org.cloudburstmc.server.item.behavior.CloudItemBehavior
canBeActivated, canBePlaced, canDestroy, canPlaceOn, getArmorPoints, getAttackDamage, getBlock, getFuelTime, getMaxDurability, getTier, getToolType, getToughness, isArmor, isBoots, isChestplate, isHelmet, isLeggings, onActivate, onClickAir, onRelease, onUse
-
Field Details
-
TYPE_NONE
public static final int TYPE_NONE- See Also:
- Constant Field Values
-
TYPE_SWORD
public static final int TYPE_SWORD- See Also:
- Constant Field Values
-
TYPE_SHOVEL
public static final int TYPE_SHOVEL- See Also:
- Constant Field Values
-
TYPE_PICKAXE
public static final int TYPE_PICKAXE- See Also:
- Constant Field Values
-
TYPE_AXE
public static final int TYPE_AXE- See Also:
- Constant Field Values
-
TYPE_SHEARS
public static final int TYPE_SHEARS- See Also:
- Constant Field Values
-
TYPE_HANDS_ONLY
public static final int TYPE_HANDS_ONLYSame breaking speed independent of the tool.- See Also:
- Constant Field Values
-
DURABILITY_WOODEN
public static final int DURABILITY_WOODEN- See Also:
- Constant Field Values
-
DURABILITY_GOLD
public static final int DURABILITY_GOLD- See Also:
- Constant Field Values
-
DURABILITY_STONE
public static final int DURABILITY_STONE- See Also:
- Constant Field Values
-
DURABILITY_IRON
public static final int DURABILITY_IRON- See Also:
- Constant Field Values
-
DURABILITY_DIAMOND
public static final int DURABILITY_DIAMOND- See Also:
- Constant Field Values
-
DURABILITY_NETHERITE
public static final int DURABILITY_NETHERITE- See Also:
- Constant Field Values
-
DURABILITY_FLINT_STEEL
public static final int DURABILITY_FLINT_STEEL- See Also:
- Constant Field Values
-
DURABILITY_SHEARS
public static final int DURABILITY_SHEARS- See Also:
- Constant Field Values
-
DURABILITY_BOW
public static final int DURABILITY_BOW- See Also:
- Constant Field Values
-
DURABILITY_TRIDENT
public static final int DURABILITY_TRIDENT- See Also:
- Constant Field Values
-
DURABILITY_FISHING_ROD
public static final int DURABILITY_FISHING_ROD- See Also:
- Constant Field Values
-
toolType
protected final org.cloudburstmc.api.item.ToolType toolType -
tierType
protected final org.cloudburstmc.api.item.TierType tierType
-
-
Constructor Details
-
ItemToolBehavior
public ItemToolBehavior()
-
-
Method Details
-
getMaxStackSize
public int getMaxStackSize(org.cloudburstmc.api.item.ItemStack item)- Specified by:
getMaxStackSizein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
getMaxStackSizein classCloudItemBehavior
-
useOn
public org.cloudburstmc.api.item.ItemStack useOn(org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.block.BlockState state)- Specified by:
useOnin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
useOnin classCloudItemBehavior
-
useOn
public org.cloudburstmc.api.item.ItemStack useOn(org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.entity.Entity entity)- Specified by:
useOnin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
useOnin classCloudItemBehavior
-
isUnbreakable
public boolean isUnbreakable(org.cloudburstmc.api.item.ItemStack item)- Specified by:
isUnbreakablein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isUnbreakablein classCloudItemBehavior
-
isPickaxe
public boolean isPickaxe()- Specified by:
isPickaxein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isPickaxein classCloudItemBehavior
-
isAxe
public boolean isAxe()- Specified by:
isAxein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isAxein classCloudItemBehavior
-
isSword
public boolean isSword()- Specified by:
isSwordin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isSwordin classCloudItemBehavior
-
isShovel
public boolean isShovel()- Specified by:
isShovelin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isShovelin classCloudItemBehavior
-
isHoe
public boolean isHoe()- Specified by:
isHoein interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isHoein classCloudItemBehavior
-
isShears
public boolean isShears()- Specified by:
isShearsin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isShearsin classCloudItemBehavior
-
isTool
public boolean isTool(org.cloudburstmc.api.item.ItemStack item)- Specified by:
isToolin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
isToolin classCloudItemBehavior
-
getEnchantAbility
public int getEnchantAbility(org.cloudburstmc.api.item.ItemStack item)- Specified by:
getEnchantAbilityin interfaceorg.cloudburstmc.api.item.behavior.ItemBehavior- Overrides:
getEnchantAbilityin classCloudItemBehavior
-