Since modifying player data can't be done with /data due to server-client desync, but it can be done with individual commands like /experience, a command for specifically modifying player data would be so incredibly useful. Not just for map makers, but also for testing purposes; instead of relying on potion effects to apply changes to players, we would have access to specific values.
I see a potential implementation looking like this;
/modifyplayer <target> [<path>] (<operation>: set | add | multiply ) <float>
- <target> would have to be a single player entity.
- <path> would have options for a specific list of data paths. Whenever running this command, it will sync up client-side information with server-side information.
- Candidates to be modifiable: health, food, saturation, rotationX, rotationY, rotationZ, velocityX, velocityY, velocityZ
- <operation> would allow the option to perform basic arithmetic operations unto the value to modify.
- <float> would be the value to affect the value by. Of course, setting a value out of bounds would be catched by either a modulo or a ceiling and floor as to not break the game, either (a player can't have negative hunger, nor a large rotation value). Ideally, it'd be very useful to be able to derive this value from a score somehow.
Please sign in to leave a comment.
3 Comments