Swords

How to create custom swords

swords.yml

This is the file where all custom swords behaviour and config are stored

This is an example sword, you'll notice some interesting sections, like play_particle, reduce_durability which helps you to customize your items to have the best roleplay experience. (these attributes are described in the events page)

pageEvents

Here is an example sword

This sword has a custom lore, has the same durability as diamond sword, 6 attack damage, 2.1 speed. When you left click or right click it plays enchant table particle, on attack it plays lightsaber sound (custom sound in resourcepack). It's crafted using rubys and stick.

mysword:
    enabled: true # use this to enable or disable the item
    permission: mysword #crafting permission name (ia.craft.mysword)
    model_id: 6 #this is a special property to assign the custom texture 
    vanilla_type: DIAMOND_SWORD #this is a special property,
                # item will have the same durability of this vanilla item and custom texture
                # will be applied to this vanilla item ( in this case you must create
                # the texture under resourcepack folder "new_diamond_sword")
    name: '&fMySword' #display name of the item
    lore:
      - '&fWow this is my first'
      - '&fcustom sword!'
    enchants: #enchants to be applied on craft
      - FIRE_ASPECT:1 #<enchant name>:<level>
    specific_properties:
      attack_damage: 6
      attack_speed: 2.1
      hide_attributes: false
      hide_enchants: false
      damage_value: 249
    events: #events related to this item
      left_click: #when user left click
        play_particle: ENCHANTMENT_TABLE #plays a specific particle
      right_click:
        play_particle: ENCHANTMENT_TABLE #plays a specific particle
      attack: #when user attacks a mob or player
        play_particle: ENCHANTMENT_TABLE #plays a specific particle
  	    play_sound: lightsaber #plays a specific sound (custom or vanilla Minecraft)
    recipe: #recipe settings
      enabled: true #use this to enable or disable the crafting
      pattern: #pattern of the recipe, X is used to indicate empty slot
        - XRX
        - XRX
        - XSX
      ingredients: #ingredients match with recipe letters, 
                   #you can use custom items names and vanilla names
      R: ruby
      S: STICK

Specific properties for swords

specific_properties:
    attack_damage: 1 # attack damage
    attack_speed: 4 # attack speed
    hide_attributes: true # hide attack and speed attributes from lore
    hide_enchants: false # hide enchant from lore
    damage_value: 249 # sets an initial damage value for the item. so when you craft
                # this sword your'll get an already consumed item (useful if)
                # you want to give players a special item that needs to
                # be recharged (like the philosopher_stone)

Last updated