mcseed
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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".

Package Sidebar

Install

npm i mcseed

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

3.98 kB

Total Files

6

Last publish

Collaborators

  • richienb