custom items with potions issue

Discuss any issues with Denizen-Bukkit scripts or functionality you may have while using it.
Post Reply
Goma_Terzu
User
User
Posts: 22
Joined: August 6th, 2016, 4:53 pm
Location: Germany
Contact:

custom items with potions issue

Post by Goma_Terzu » August 20th, 2016, 2:11 pm

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.

Goma_Terzu
User
User
Posts: 22
Joined: August 6th, 2016, 4:53 pm
Location: Germany
Contact:

Re: custom items with potions issue

Post by Goma_Terzu » August 20th, 2016, 2:18 pm

Also the potion 373,12 keeps looking like a normal blue potion instead of a pink potion

User avatar
mcmonkey
Site Admin
Site Admin
Posts: 267
Joined: August 5th, 2016, 7:27 pm
Location: Los Angeles, California, USA
Contact:

Re: custom items with potions issue

Post by mcmonkey » August 20th, 2016, 5:35 pm

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).
Denizen lead developer. On Discord as mcmonkey#6666.

Goma_Terzu
User
User
Posts: 22
Joined: August 6th, 2016, 4:53 pm
Location: Germany
Contact:

Re: custom items with potions issue

Post by Goma_Terzu » August 22nd, 2016, 3:49 pm

Thanks, fixxed it. For anyone who wonders how this works, this is the new item script

Molotowcocktail:
type: item
material: [email protected][[email protected]_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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest