Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

minecraft-seed-input

87f-47MIT1.0.0

Process seeds like Minecraft does and hash them if they are not number.

minecraft, seed

readme

minecraft-seed-input

This function does what minecraft will do if you input a string in the seed input when creating a world: convert it to a number using an algorithm.

Usage

const seed = require('minecraft-seed-input')

console.log(seed()) // "[random]"
console.log(seed(1)) // 1
console.log(seed("somecoolseed")) // 1706390062
console.log(seed("creashaks organzine")) // 0