Tool

fun Tool(tier: ToolTier? = null, categories: Set<ToolCategory>? = null, breakSpeed: Double? = null, attackDamage: Double? = null, attackSpeed: Double? = null, knockbackBonus: Int = 0, canSweepAttack: Boolean = false, canBreakBlocksInCreative: Boolean = true, disableBlocking: Int = 0): ItemBehaviorFactory<Tool>

Creates a factory for Tool behaviors using the given values, if not specified otherwise in the config.

Parameters

tier

The ToolTier of the tool. Used when tool_tier is not specified in the config, or null to require the presence of a config entry.

categories

The ToolCategory of the tool. Used when tool_category is not specified in the config, or null to require the presence of a config entry.

breakSpeed

The break speed of the tool. Used when break_speed is not specified in the config, or null to require the presence of a config entry.

attackDamage

The attack damage of the tool. Used when attack_damage is not specified in the config, or null to require the presence of a config entry.

attackSpeed

The attack speed of the tool. Used when attack_speed is not specified in the config, or null to require the presence of a config entry.

knockbackBonus

The knockback bonus of the tool when attacking. Defaults to 0. Used when knockback_bonus is not specified in the config.

canSweepAttack

Whether the tool can perform a sweep attack. Defaults to false. Used when can_sweep_attack is not specified in the config.

canBreakBlocksInCreative

Whether the tool can break blocks in creative mode. Defaults to true. Used when can_break_blocks_in_creative is not specified in the config.

disableBlocking

The amount of ticks to disable an attacked shield's blocking status for when attacking with this tool. Defaults to 0. Used when disable_blocking is not specified in the config.