1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom crafting with modified attributes

Discussion in 'Skript' started by Jake Rees, May 15, 2021.

Thread Status:
Not open for further replies.
  1. Jake Rees

    Jake Rees Member

    Joined:
    May 15, 2021
    Messages:
    2
    Likes Received:
    0
    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 (Text):
    1. aliases:
    2.     excalibur item = minecraft:diamond_sword {AttributeModifiers:[{AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Amount:10,Operation:0,UUID:[I; -1, -1, -1, -1]}]}
    3.  
    4. on load:
    5.     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.
     
  2. JamieGJampot

    JamieGJampot Member

    Joined:
    May 16, 2021
    Messages:
    4
    Likes Received:
    0
    Hey Jake,

    What I would do is this:

    Code (Text):
    1. on load:
    2.     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
    3.    
    4. on damage:
    5.     if attacker's held item is diamond sword named "&6Excalibur" with lore "A Hero's Weapon":
    6.         victim is an entity:
    7.             damage victim by 100 heart
     
  3. Jake Rees

    Jake Rees Member

    Joined:
    May 15, 2021
    Messages:
    2
    Likes Received:
    0
    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.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...