Page 1 of 1

custom items with potions issue

Posted: August 20th, 2016, 2:11 pm
by Goma_Terzu
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.

Re: custom items with potions issue

Posted: August 20th, 2016, 2:18 pm
by Goma_Terzu
Also the potion 373,12 keeps looking like a normal blue potion instead of a pink potion

Re: custom items with potions issue

Posted: August 20th, 2016, 5:35 pm
by mcmonkey
Goma_Terzu wrote: 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).

Re: custom items with potions issue

Posted: August 22nd, 2016, 3:49 pm
by Goma_Terzu
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