clientcommands
clientcommands copied to clipboard
Trackers
Having trackers to complement /cgetdata would be useful. Trackers would log to chat when block or entity data is updated.
The command structure would be as follows:
/ctracker [block | entity] add [id] [paths...]- Adds a tracker for certain NBT paths./ctracker [block | entity] remove [id]- Removes a tracker by its ID./ctracker [block | entity] list- Lists all block or entity trackers.
Hmm, I'll think about it. As I'm sure you're aware this data is client-side, and may not be a true representation of things changing in an entity or block entity. Instead of doing this, what I'm more tempted to do is implement events which run scripts (rather than only triggering via the cscript command).
Perhaps both trackers and event scripts could be implemented. Personally, I think creating scripts for specific events is overkill and this would be a simpler solution.
I don't think data syncing is a problem. Tracking is mostly more useful for entities in my opinion, but should still be applied to block entities (and possibly block states) because /cgetdata already allows viewing both.
What would the interval be between getting the datas?
I still think this is best implemented as a custom jsmacros event. It's not that easy to implement efficiently in practice though. As for the name, I think "watchers" is better than "trackers", as trackers confuses with the vanilla concept of entity data trackers, and watchers relates to debug watchpoints.