• Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Jake Rees

Member
May 15, 2021
2
0
1
21
Skript Version: 2.5.3
Skript Addons: SkQuery
Minecraft Version: 1.16.5

I am attempting - if possible - to create a custom crafting recipe in which the outputted item has a modified attribute (E.g. higher base attack damage).

The code I currently have is:

Code:
aliases:
    excalibur item = minecraft:diamond_sword {AttributeModifiers:[{AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Amount:10,Operation:0,UUID:[I; -1, -1, -1, -1]}]}

on load:
    register new shaped recipe for excalibur item named "&6Excalibur" with lore "A Hero's Weapon" using air, diamond block, air, air, diamond block, air, gold block, nether star, gold block

No errors are given, the recipe works fine, however the item that it gives me is just a regular diamond sword with no modified attribute.
 
Hey Jake,

What I would do is this:

Code:
on load:
    register new shaped recipe for diamond sword item named "&6Excalibur" with lore "A Hero's Weapon" using air, diamond block, air, air, diamond block, air, gold block, nether star, gold block
    
on damage:
    if attacker's held item is diamond sword named "&6Excalibur" with lore "A Hero's Weapon":
        victim is an entity:
            damage victim by 100 heart
 
Hey Jake,

What I would do is this:

Code:
on load:
    register new shaped recipe for diamond sword item named "&6Excalibur" with lore "A Hero's Weapon" using air, diamond block, air, air, diamond block, air, gold block, nether star, gold block
   
on damage:
    if attacker's held item is diamond sword named "&6Excalibur" with lore "A Hero's Weapon":
        victim is an entity:
            damage victim by 100 heart

I was thinking about doing something like this, but I was wanting to have an attribute because it: Displays the amount of damage the weapon does, doesn't ignore entity armour, and I also want the item to be enchantable - as doing it this way breaks when enchants are applied.
 
Status
Not open for further replies.