pylonToolWeapon

fun pylonToolWeapon(stack: ItemStack, key: NamespacedKey, mineable: RegistryKeySet<BlockType>, hasDurability: Boolean, hasKnockback: Boolean, disablesShield: Boolean): ItemStackBuilder(source)

Creates a new ItemStack for a PylonItem that can be used as a weapon and tool for the mineable blocks. (See pickaxeMineable and related for basic tools) You must provide a value for attack-damage, attack-speed, attack-durability-damage, mining-speed and mining-durability-damage in the Settings for the item.

If hasDurability is true, gives the item a max durability defined by durability in the Settings. Otherwise, removes any existing durability.

If hasDurability is true, gives the item knockback defined by attack-knockback in the Settings. Otherwise, removes any existing attack knockback.

If hasKnockback is true, gives the item a shield disable time defined by disable-shield-seconds in the Settings. If false, the item will not disable shields when used in attacking.

settings/example-tool-weapon.yml

attack-damage: 6.0 # double
attack-speed: 1.6 # double
attack-durability-damage: 2 # integer
attack-knockback: 0.4 # double
disable-shield-seconds: 1.0 # float

mining-speed: 8.0 # double
mining-durability-damage: 1 # integer

durability: 500 # integer

fun pylonToolWeapon(material: Material, key: NamespacedKey, mineable: RegistryKeySet<BlockType>, hasDurability: Boolean, hasKnockback: Boolean, disablesShield: Boolean): ItemStackBuilder(source)

Creates a new ItemStack for a PylonItem that can be used as a weapon and tool for the mineable blocks. (See pickaxeMineable and related for basic tools) You must provide a value for attack-damage, attack-speed, attack-durability-damage, mining-speed and mining-durability-damage in the Settings for the item.

If hasDurability is true, gives the item a max durability defined by durability in the Settings. Otherwise, removes any existing durability.

If hasKnockback is true, gives the item knockback defined by attack-knockback in the Settings. Otherwise, removes any existing attack knockback.

If disablesShield is true, gives the item a shield disable time defined by disable-shield-seconds in the Settings. If false, the item will not disable shields when used in attacking.

settings/example-tool-weapon.yml

attack-damage: 6.0 # double
attack-speed: 1.6 # double
attack-durability-damage: 2 # integer
attack-knockback: 0.4 # double
disable-shield-seconds: 1.0 # float

mining-speed: 8.0 # double
mining-durability-damage: 1 # integer

durability: 500 # integer