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): 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. Used when knockback_bonus is not specified in the config.

canSweepAttack

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

canBreakBlocksInCreative

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