#can we modify the nbt of a living entity with skbee ?
1 messages · Page 1 of 1 (latest)
I think I'm doing my code wrong because I can't get the nbt customn I'm sending you my code
cancel event
if block 1 above event-location is air:
spawn baby zombified piglin at block 1 above event-location
set tool of last spawned zombified piglin to diamond sword of smite 50
add nbt compound of "{custom{owner:%player%}}" to nbt compound of last spawned zombified piglin
on right click on zombified piglin:
cancel event
set {_nbt} to nbt compound of target entity
set {_custom} to tag "owner" of {_nbt}
broadcast "%{_custom}%"
the {_custom} variable is in "none"
no
i also tried with meta tag
because I recorded the player who placed the zombie
I make a kind of mob that kills other mobs, but the player can modify this mob to improve it
Because I am unable to do that
Why
Because I don't know how to do it
i try but it didn't succeed
On rightclick holding zombified piglin spawn egg:
cancel event
if block 1 above event-location is air:
spawn baby zombified piglin at block 1 above event-location
set tool of last spawned zombified piglin to diamond sword of smite 50
set tag "tag;owner" of nbt compound of last spawned zombified piglin to "%player%"
on right click on zombified piglin:
cancel event
set {_nbt} to nbt compound of target entity
set {_custom} to tag "owner" of {_nbt}
broadcast "%{_custom}%"
it's the same way I use for items and it works for them but there the nbt is none
can you give me an example because i don't understand
set {_p} to tag "owner" of event-entity```
Np