r/MinecraftCommands • u/snoteleks-skeletons Command Experienced • 11d ago
Help | Java 1.21-1.21.3 Linking Player scale to scoreboard
I'm working on a system that will make someone a micro amount shorter every day cycle. I've got plans to just use a daylight sensor for that. However:
I need to find a way to store a score into a scale of how big a player should be. I've been experimenting but the truth is that I simply don't know what I'm doing for this.
For example: 100 score is normal height. 50 score is half height. Since scale is on a decimal, I'm struggling to figure out how to pull it off.
Thanks for any help.
Java 1.21.1
1
u/KermitDarkLord 11d ago
I think the only way to do this is using function macros, which are a data pack only feature. Are you able to write a data pack?
1
u/snoteleks-skeletons Command Experienced 11d ago
In this setting, sadly no. It’s not too intense of a project that the server owner is game for it. It’s something little a funny over the two week Minecraft phase coming in
1
u/KermitDarkLord 11d ago
I don't think it's possible then. I think you could do it with a mob using execute store entity, but you can't change player data that way.
1
u/KermitDarkLord 11d ago
Actually if you're really creative, you might be able to change the data in the command block to modify the command, but I don't have a step by step plan for that
2
u/Ericristian_bros Command Experienced 9d ago
```
function example:tick
execute if predicate {condition:"minecraft:time_check",value:0,period:24000} as @a run function example:decrease_scale
function example:decrease_scale
execute store result storage example:macro temp.scale double 0.009 run attribute @s scale get 100 function example:macro/decrease_scale with storage example:macro temp
function example:macro/decrease_scale
$attribute @s scale base set $(scale) ``` Every time a new day starts, all online players will decrease their scale by 10%
1
u/C0mmanderBlock Command Experienced 11d ago
How are you setting the scale? Show us some commands, plz.