Skip to content

Issues in End City Piece Generation #155

Description

@maplelumi

There are three issues in the end city generation:

  1. 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.

  1. 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.

  1. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions