custom items with potions issue

Goma_Terzu

Member
Aug 6, 2016
22
0
0
Germany
www.toxicwars.com
Create this item

Molotowcocktail:
type: item
material: 373,12
display name: '<green>Molotowcocktail'
lore:
- <blue>Sehr einfacher, improvisierter
- <blue>Brandsatz gegen Zombies und mehr...
- <gold>
- <red>Setzt ein kleines Gebiet in Brand.
- <gold>
- <yellow>Linksklick <&auml>ndert die Wurfkraft
- <yellow>Rechtsklick wirft den Brandsatz

Then give the item to yourself and narrate <player.inventory.contains[Molotowcocktail].quantity[1]>
It does not work, the Molotow item is not recognized by its name.
 

mcmonkey

Administrator
Staff member
Helper
Goma_Terzu said:
material: 373,12
This is not a valid way to identify items in the recent versions of minecraft - they don't actually use datavalues at all anymore.
You need to use the potion_effects mechanism on the potion item now for that to work (Which will then modify NBT keys on the item, as opposed to just the datavalue).
 

Goma_Terzu

Member
Aug 6, 2016
22
0
0
Germany
www.toxicwars.com
Thanks, fixxed it. For anyone who wonders how this works, this is the new item script

Molotowcocktail:
type: item
material: i@potion[potion_effects=li@INSTANT_DAMAGE,false,false]
display name: '<green>Molotowcocktail'
lore:
- <blue>Sehr einfacher, improvisierter
- <blue>Brandsatz gegen Zombies und mehr...
- <gold>
- <red>Setzt ein kleines Gebiet in Brand.
- <gold>
- <yellow>Linksklick <&auml>ndert die Wurfkraft
- <yellow>Rechtsklick wirft den Brandsatz