Is adding a custom nbt string tag to an ignited tnt entity possible? I need the tnt block to do something special when it explodes, adding an nbt tag, and then checking for that nbt tag when it explodes seems like the best solution... I want to be able to add that nbt tag in an EntitySpawn event handler... If it is possible, link me the methods required to do so. (be as technical as you'd like.) Thanks in advance!
What will that accomplish exactly? get the default NBT of a tnt entity? Issue is: i need to do this in the EntitySpawn event, how can i get the entity from that event?
Ok that will give me the NBT... but how do i add a new tag to it? I've never worked with NBT and don't exactly know how it works.... Thanks for the help though!
Ok, i think i got it.. I looked trough pockemine's NBT classes, and i think PHP: $event->getEntity()->namedtag->setTag(new StringTag("helloworldtag", "Hello World Value")); should give it that tag, i cannot figure out how to get its value though... //EDIT: I figured it out... its getTag() Thanks for the help!