← Back to board

Chunk order standardization is broken

Opensamsam12 messagesstarted Jul 14, 2026, 6:34 PM
gameplay
samsamOP2 months ago(edited)
Right now, chunk standardization is passed block coordinates instead of chunk coordinates, causing most spawn locations to not have standardized chunk generation.

This is probably the cause of the shipwreck loot/wood type bug, and can cause lava pools to not generate as well.
2
sam
samOP2 months ago
relevant mod code:

ChunkPos spawnChunk = new ChunkPos(spawnBlock.getX(), spawnBlock.getZ());

That expects chunk coordinates, but receives block coordinates. It should be:
ChunkPos spawnChunk = ChunkPos.containing(spawnBlock);
sam
samOP2 months ago
Also, I believe there's a way to standardize shipwreck loot without chunk generation order (so that ships can have consistent loot outside of the 24 chunk radius):

Beached shipwrecks currently have a deterministic x/z, but the final y placement can depend on chunk order, and the y position affects both the palette of the shipwreck (wood type), as well as the loot.

If both palette and loot were made independent of y, ships would (probably) be fully standardized, e.g.:

long baseSeed = level.getSeed() ^ Mth.getSeed(shipX, 0, shipZ);

heightRandom  = RandomSource.create(baseSeed ^ HEIGHT_SALT);
paletteRandom = RandomSource.create(baseSeed ^ PALETTE_SALT);
Uniquepotatoes
Uniquepotatoes2 months ago
That makes sense, but wouldn’t using a global “shipwrecks chests looted” counter and incrementing each time you check one work better @sam (or similar?). So it’s the same regardless of the order you find them
Uniquepotatoes
Uniquepotatoes2 months ago
I guess it’s up to the draftout people if they want that
kqrrot222
kqrrot2222 months ago
well different shipwrecks placement could affect the number of blocks you need to break to get to a chest, and different wood types could have an affect on x craft goals, so this feels like a solution needed either way. But yeah the other form of standardising is something that feels like a separate suggestion, as its not very vanilla.
Uniquepotatoes
Uniquepotatoes2 months ago
I mean I don’t really see a downside
Uniquepotatoes
Uniquepotatoes2 months ago
Would standardize stuff like amount of ships to find xp bottle/smithing template
marin
marin2 months ago
fixing, ty
sam
samOP2 months ago
np my goat marin
sam
samOPlast month
this would fix ship loot bug for ships not near spawn
marin
marinlast month
i'm considering adding that, i've noticed desert temples being offset rarely too