npm.io
1.0.3 • Published 6 years ago

mcseed

Licence
MIT
Version
1.0.3
Deps
4
Size
4 kB
Vulns
0
Weekly
0
Stars
2

MC Seed Travis CI Build Status

Emulate Minecraft's seed selection system.

NPM Badge

Install

npm install mcseed

Usage

const mcseed = require("mcseed");

mcseed(); // Random seed (blank seed box)
//=> -47201340728604373n

mcseed(12345); // Numerical seed
//=> 12345n

mcseed("abc"); // Text seed
//=> 96354n

Why BigInt?

For random seeds, the generated number could be higher than what javascript supports with the native Number object. Therefore, BigInt is essential to store the full seed.

API

mcseed(seed?)
seed

Type: string | number

The seed to input in the "seed box".

Keywords