I've started working on a mod and it's been a bit of a bumpy ride. Mostly due to lack of recent and decent information, examples or simple know-how about internal workings. Finding outdated tutorials doesn't help either, and from what I've already read and seen in code (looking at 1.16 mods at github was mostly helpful) I got a bit confused. So please help me understand few things.
Here's my questions:
I want to attach some simple data to some ItemStack and TileEntity, is using getOrCreateTag() for ItemStack and getTileData() for TileEntity the way to go? or should I use capabilities for it?
If I'm setting tag for ItemStack or TileEntity, should I do this on server side only or both?
I wanted to play a sound during onItemUse and I've used context.getPlayer().playSound() which is ran on render and server thread, but only player using item is hearing the sound, according to Forge documentation this method on render thread should play for current player (and it does) and on server side it should send play message to all other players (this doesn't work)
If I want to store some custom "world" data that isn't specific to any block/item/chunk I should use capabilities and attach it to the world?