SeedUtils

Index

API

Cubiomes.SeedUtils.u64_seedFunction
u64_seed(x)

Converts x to UInt64 for use as a seed, exactly as the Minecraft Java Edition does. It can be any integer or a string.

Example

julia> u64_seed(1234)
0x00000000000004d2

julia> u64_seed("hello world")
0x000000006aefe2c4
source

Private API

Click to see
Cubiomes.SeedUtils.bytes2uint64Method
bytes2uint64(itr)

Converts an iterator of bytes to an iterator of UInt64.

Example

julia> bytes2uint64([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10]) |> collect
2-element Vector{UInt64}:
0x0102030405060708
0x090a0b0c0d0e0f10
source
Cubiomes.SeedUtils.mc_step_seedMethod
mc_step_seed(seed::UInt64, salt::UInt64)

Used to generate the next seed in the Minecraft seed generation algorithm, given the current seed and a salt.

source