-
-
Notifications
You must be signed in to change notification settings - Fork 5
More efficient seed handling #5
Copy link
Copy link
Open
Labels
Crafting-Recipe RandomizerThis is for the Crafting-Recipe RandomizerThis is for the Crafting-Recipe RandomizerLoot-Table RandomizerThis is for the Loot-Table RandomizerThis is for the Loot-Table RandomizerenhancementNew feature or requestNew feature or requestlow priorityThis can be done wheneverThis can be done whenever
Milestone
Metadata
Metadata
Assignees
Labels
Crafting-Recipe RandomizerThis is for the Crafting-Recipe RandomizerThis is for the Crafting-Recipe RandomizerLoot-Table RandomizerThis is for the Loot-Table RandomizerThis is for the Loot-Table RandomizerenhancementNew feature or requestNew feature or requestlow priorityThis can be done wheneverThis can be done whenever
Projects
Status
Todo
JavaScript provides 53 integer-safe bits for numbers, which can be fully utilized with a custom number input. A string input however only provides a 32 bit hash with the current hashing implementation. Utilizing all 53 bits reduces the chance of collisions. It may be worth looking into cyrb53 (https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js) for this.
This will be a big breaking change and will cause old string-based seeds to no longer produce the same output
Original title:
Find solution for the seed input to support the full number rangeOriginal Description:
JavaScript provides 53 bits of integer-safety, this is not enough, if i want to emulate how Minecraft handles seed inputs.A point of interest might be BigInt, but i don't think that this is suitable for inputting seeds.