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

POIs are not created properly when upgrading worlds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 22w43a
    • 1.19, 1.19.1, 1.19.2
    • None
    • Community Consensus
    • Datafixer
    • Important

      When upgrading a chunk section Minecraft does not detect whether it contains POI block states properly.
      In PoiManager.mayHavePoi(LevelChunkSection) it uses PoiTypes.ALL_STATES. The problem is that PoiTypes.ALL_STATES is empty.
      This is because when the PoiTypes class is initialized it starts out with an empty TYPE_BY_STATE map, then creates a copy of its keySet for ALL_STATES:

      ALL_STATES = new ObjectOpenHashSet<>(TYPE_BY_STATE.keySet());
      

      Then when bootstrap() is called and fills in TYPE_BY_STATE, but because ALL_STATES is a copy of the keySet it will not receive these updates and stays empty.

      The result of this issue is that in upgraded worlds nether portals will not link to existing portals and always create a new one. There are probably also other issues relating to villagers.

            boq [Mojang] Bartosz Bok
            skyrising skyrising (Simon Wanner)
            Votes:
            16 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: