[Suggestion]: Re-implement method to replace old nbt data format
SylisMC opened this issue ยท 1 comments
What is your suggestion?
Id like to see you re implement calling for specific data strings via the new scale nbt command
Back in 1.18 you stored your scale data under the regular player nbt data, so you could execute a store command to store scale in a scoreboard,
execute as @a store result score @s Scale run
1.18
data get entity @s "pehkui:scale_data_types"."pehkui:base".scale 32
In 1.19 you've moved that data to scale nbt get [target]
But you cant specify what data specifically you want.
This causes reduced functionality for datapacks, as you can no longer call upon and store that data
In 1.18 I used the following as a scale to edit player functionality based on size, but I don't think there is a way I can do that anymore with the 1.19 changes
This would translate BaseScale into a number to represent how many pixels tall the player was
#convert scale to scoreboard <1
execute as @a store result score @s Scale unless entity @s[pehkui.scale=..1] run data get entity @s "pehkui:scale_data_types"."pehkui:base".scale 32
##convert scale to scoreboard =1
execute as @a store result score @s Scale if entity @s[pehkui.scale=1] run data get entity @s "pehkui:scale_data_types"."pehkui:base".scale
##convert scale to scoreboard >1
execute as @a store result score @s Scale unless entity @s[pehkui.scale=1..] run data get entity @s "pehkui:scale_data_types"."pehkui:base".scale -32
Once 3.5.0 gets approved, /scale nbt get
will now support paths and scaling like /data get
.
/scale get
has also supported scoreboards and scaling for a few versions already, so an alternate approach to one of your code snippets could be something like execute as @a store result score @s Scale unless entity @s[pehkui.scale=..1] run scale get pehkui:base @s 32