1.0.3 • Published 4 years ago

mcseed v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

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