Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-227443

Buried treasures always generate at the center of a chunk

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 1.16.5, 1.17 Release Candidate 1, 1.17 Release Candidate 2, 1.17, 1.17.1 Pre-release 1, 1.17.1 Pre-release 2, 1.17.1 Pre-release 3, 1.17.1 Release Candidate 1, 1.17.1 Release Candidate 2, 1.17.1, 21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a, 1.18 Pre-release 1, 1.18 Pre-release 2, 1.18 Pre-release 3, 1.18 Pre-release 5, 1.18 Pre-release 6, 1.18 Pre-release 8, 1.18 Release Candidate 3, 1.18, 1.18.1 Release Candidate 1, 1.18.1, 22w03a, 22w05a, 22w06a, 1.18.2 Pre-release 1, 1.18.2, 22w12a, 22w17a, 22w18a, 1.19 Pre-release 1
    • None
    • Confirmed
    • World generation
    • Normal

    Description

      The bug

      Buried treasures seem to be always generated at the (9, Y, 9) chunk coordinates. This removes a big part of the challenge of uncovering the treasure if you have the map, since you'll already know where it is when using the F3 debug screen.

      Analysis (tentative)

      It seems that buried treasures are hardcoded to generate in this position.

      net.minecraft.world.level.ChunkPos.BuriedTreasureFeature.java (Mojang mappings, 1.18-pre6, variable renamings)
      ...
       private static void generatePieces(...) {
              BlockPos blockPos2 = new BlockPos(pieceGeneratorContext.chunkPos().getBlockX(9), 90, pieceGeneratorContext.chunkPos().getBlockZ(9));
              structurePiecesBuilder.addPiece(new BuriedTreasurePieces.BuriedTreasurePiece(blockPos2));
          }
      ...
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ampolive [Helper] ampolive
              Votes:
              17 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                CHK: