Skip to content

A utility datapack that allows you to do base conversion with a configurable base value

Notifications You must be signed in to change notification settings

gibbsly/base-conversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Base Convert Pack

A utility datapack that allows you to do base conversions with a configurable base value

before you get started run the setup functions:

  • /function base_conv:setup
  • /function rev_conv:setup

Decimal to base(x)

to set the base value use:

/scoreboard players set base= base_conv.num

to set the input value use:

/scoreboard players set in= base_conv.num

to run the conversion run:

/function base_conv:call

you will get your output as an array in storage base_conv:main out

example: in= 42, base= 2; will output as [1, 0, 1, 0, 1, 0]

base(x) to Decimal

to set the base value use:

/scoreboard players set base= rev_conv.num

to set your input value use:

/data modify storage rev_conv:main in set value []

to run the conversion run:

/function rev_conv:call

you will get your output in the scorboard value out= rev_conv.num

example: {in:[8, 0]}, base= 16; will output as 128

About

A utility datapack that allows you to do base conversion with a configurable base value

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published