Paste #132914: HardAxe

Date: 2025/04/23 18:19:48 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


hard_diamond_axe:
    type: item
    material: diamond_axe
    display name: <&b>Hardened Diamond Axe
    lore:
    - <&f><&8><&m><&sp.repeat[20]>
    - <&c>🪓<&c> Axe
    - <&4>âš¡<&r><&4>  Level 15
    - <&f><&8><&m><&sp.repeat[20]>
    - <&2>9 Damage
    flags:
        durabilityMod: 0
    mechanisms:
        attribute_modifiers:
            attack_damage:
                1:
                    key: test_id_1a
                    slot: mainhand
                    operation: add_number
                    amount: 9
            attack_speed:
                1:
                    key: test_id_1b
                    slot: mainhand
                    operation: add_number
                    amount: -3.1
        hides: attributes
    recipes:
        1:
            type: shaped
            group: axe
            input:
            - diamond|diamond|air
            - diamond|basic_diamond_axe|air
            - air|air|air

# weapon world scripts
durabilityMod:
    type: world
    events:
        on player item takes damage:
            - if <context.item.has_flag[durabilityMod]>:
                - flag <context.item> durabilityMod:++
                - narrate <context.item.flag[durabilityMod]>