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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 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, 1.19, 1.19.2, 1.19.3, 23w04a, 1.19.4, 1.20 Release Candidate 1, 1.20, 23w33a, 1.20.4, 1.21.3
    • Confirmed
    • World generation
    • Normal
    • Platform

      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));
          }
      ...
      

            Unassigned Unassigned
            ampolive [Mod] ampolive
            Votes:
            23 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              CHK: