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)

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.
1
mysword:
2
enabled: true # use this to enable or disable the item
3
permission: mysword #crafting permission name (ia.craft.mysword)
4
model_id: 6 #this is a special property to assign the custom texture
5
vanilla_type: DIAMOND_SWORD #this is a special property,
6
# item will have the same durability of this vanilla item and custom texture
7
# will be applied to this vanilla item ( in this case you must create
8
# the texture under resourcepack folder "new_diamond_sword")
9
name: '&fMySword' #display name of the item
10
lore:
11
- '&fWow this is my first'
12
- '&fcustom sword!'
13
enchants: #enchants to be applied on craft
14
- FIRE_ASPECT:1 #<enchant name>:<level>
15
specific_properties:
16
attack_damage: 6
17
attack_speed: 2.1
18
hide_attributes: false
19
hide_enchants: false
20
damage_value: 249
21
events: #events related to this item
22
left_click: #when user left click
23
play_particle: ENCHANTMENT_TABLE #plays a specific particle
24
right_click:
25
play_particle: ENCHANTMENT_TABLE #plays a specific particle
26
attack: #when user attacks a mob or player
27
play_particle: ENCHANTMENT_TABLE #plays a specific particle
28
play_sound: lightsaber #plays a specific sound (custom or vanilla Minecraft)
29
recipe: #recipe settings
30
enabled: true #use this to enable or disable the crafting
31
pattern: #pattern of the recipe, X is used to indicate empty slot
32
- XRX
33
- XRX
34
- XSX
35
ingredients: #ingredients match with recipe letters,
36
#you can use custom items names and vanilla names
37
R: ruby
38
S: STICK
39
Copied!

Specific properties for swords

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