I've searched all posts but no resolution was found. Is there any way a custom nbt value can be added to a entity? And I'm also wondering the diffrenece between mergeNbt and nbt.merge and when each method should be used.
This is my current tests.
ItemEvents.entityInteracted(event => {
const { target } = event
target.nbt.merge({"test": "test"}) // custom tag, can't merge
target.nbt.merge({noGravity:true}) // vanilla tag, can't merge
target.mergeNbt({"test": "test"}) // custom tag, can't merge
target.mergeNbt({noGravity:true}) // vanilla tag, able to merge
})
I found it's also not available to edit a cutsom nbt through vanilla commands. Does it mean there's no way for adding a custom nbt using kjs?