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

"1x1_b5.nbt" piece does not generate in woodland mansions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17.1, 1.18, 1.18.1 Release Candidate 2, 1.18.2, 22w11a, 22w18a, 1.19 Pre-release 1, 1.19.1 Release Candidate 2, 1.19.2, 1.20.1
    • Confirmed
    • Structures
    • Low
    • Gameplay

      This one room (minecraft:woodland_mansion/1x1_b5.nbt) in woodland mansions is impossible to spawn from what I can tell. I am a modder and I was going through the vanilla woodland mansion code to see what rooms spawn where in mansion. Then I noticed that the second/third floor runs this method to grab regular 1x1 rooms for those floors. In WoodlandMansionPieces$SecondFloorRoomCollection class, this method came up:

      public String get1x1(Random random) {  
         return "1x1_b" + (random.nextInt(4) + 1); 
      }
      

      The random here only returns a value between 0 and 3 and the +1 makes the range 1 to 4. This means "1x1_b5" is impossible to be chosen. The room looks like this: 

      After talking with other modders, we went through the code some more and it turns out, this issue persisted since 1.11.0 when Woodland mansions were added. I also went through the other rooms and no other room has this issue. All other rooms can spawn except for "1x1_b5". (There has been two reports before by the same guy about missing rooms but they listed a bunch of rooms that do spawn so it seems better to make this a separate report about the rooms that are truly not spawning with code samples as proof)

            Unassigned Unassigned
            TelepathicGrunt TelepathicGrunt
            Votes:
            17 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              CHK: