There are three issues in the end city generation:
- Bridges are added to
base instead of floor
In finders.c -> genTower():
Piece *bridge = addEndCityPiece(env, base, brot,
binfo[i][1], binfo[i][2], binfo[i][3], BRIDGE_END);
This incorrectly attaches bridges to base. They should be attached to floor.
- End ship assigned to
base incorrectly
In finders.c -> genBridge():
base = addEndCityPiece(env, base, rot, x, y, z, END_SHIP);
This modifies base. The final BRIDGE_END in genBridge should attach to the last BRIDGE_PIECE or stair, not the ship.
- Depth type is too small
In finders.h -> STRUCT(Piece): int8_t depth;
In end city generation, depth is set using int gendepth = next(env->rng, 32); in genPiecesRecusively(). Using int32_t prevents overflow.
Example: Seed 155040604429240, Chunk (122, 80) generates an end city where these issues are observed.
There are three issues in the end city generation:
baseinstead offloorIn
finders.c->genTower():This incorrectly attaches bridges to base. They should be attached to floor.
baseincorrectlyIn
finders.c->genBridge():This modifies base. The final BRIDGE_END in genBridge should attach to the last BRIDGE_PIECE or stair, not the ship.
In
finders.h->STRUCT(Piece):int8_t depth;In end city generation, depth is set using
int gendepth = next(env->rng, 32);ingenPiecesRecusively(). Using int32_t prevents overflow.Example: Seed 155040604429240, Chunk (122, 80) generates an end city where these issues are observed.