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)
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 itempermission: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 itemlore: - '&fWow this is my first' - '&fcustom sword!'enchants:#enchants to be applied on craft - FIRE_ASPECT:1#<enchant name>:<level>specific_properties:attack_damage:6attack_speed:2.1hide_attributes:falsehide_enchants:falsedamage_value:249events:#events related to this itemleft_click:#when user left clickplay_particle:ENCHANTMENT_TABLE#plays a specific particleright_click:play_particle:ENCHANTMENT_TABLE#plays a specific particleattack:#when user attacks a mob or playerplay_particle:ENCHANTMENT_TABLE#plays a specific particleplay_sound:lightsaber#plays a specific sound (custom or vanilla Minecraft)recipe:#recipe settingsenabled:true#use this to enable or disable the craftingpattern:#pattern of the recipe, X is used to indicate empty slot - XRX - XRX - XSXingredients:#ingredients match with recipe letters, #you can use custom items names and vanilla namesR:rubyS:STICK
Specific properties for swords
specific_properties:attack_damage:1# attack damageattack_speed:4# attack speedhide_attributes:true# hide attack and speed attributes from lorehide_enchants:false# hide enchant from loredamage_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)