Compatibility
Minecraft: Java Edition
1.21.5
Platforms
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Links
Details
Licensed ARR
Published 4 days ago
Updated last week
NUMBER CONVERTER
A library datapack to make long numbers or scores readable.
Convert a value
Example command
function nc:convert/value {value:"1874"}
output
command: data get storage minecraft:number_converter
output: {output:{decimal_number:8,main_number:1,negative:0b,number:"1.8k",
number_without_suffix:"1.8",old_number:1874,positive:1b,prefix:"+",suffix:"k"}}
Directly convert the score
Example command
scoreboard players set tpcoffline your_objective 6452326
function nc:convert/score {name:"tpcoffline",objective:"your_objective"}
output
command: data get storage minecraft:number_converter
output: {output:{decimal_number:4,main_number:6,negative:0b,number:"6.4m",number_without_suffix:"6.4",
old_number:6452326,positive:1b,prefix:"+",suffix:"m"}}
Example usage
- Write the player's “money” score in chat.
command
scoreboard players set tpcoffline money 567428
function nc:convert/score {name:"tpcoffline",objective:"money"}
tellraw @a {"nbt":"output.number","storage":"number_converter","color":"gold","bold":true}
output