Language

Number Converter

Number Converter

Modrinth

Make long numbers and scores readable.

39 downloads 2 followers updated 14mo ago
latest v1.0 Modrinth
Datapack 1.21.5 – 1.21.5 LibraryUtility

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

In game screenshot

Versions

Release
1.0
datapack · 1.21.5 · 14mo ago
# - First upload.
39

Comments 0

No comments yet. Be the first to share your thoughts.

Download Number Converter

Files are served directly from the original source. Modgrid does not host or modify them.