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

Possible spawning of entities with same UUID causes entity to not spawn

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Works As Intended
    • Affects Version/s: Minecraft 15w35b
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Unconfirmed

      Description

      Relates to:

      Introduction

      This report is about the fact that (very likely) entities spawning with the same UUID is not well handled by the game. Chances that this happens are very low, but when you search on the internet for "lottery twice" you get enough results that show that rare events can happen.

      The problem

      I am mostly concerned about boss fights, as for example when you try to summon a WitherBoss and it just won't spawn because by accident it got the same UUID as an already existing entity. The same goes for the /summon command, what is when suddenly an entity does not spawn and the player just can not figure out why.

      Evidence (maybe)

      When placing for example an ArmorStand with a specific UUID twice, it will only place it once and ignore any other tries:

      /give @p armor_stand 1 0 {EntityTag:{CustomName:UUID,CustomNameVisible:1,UUIDLeast:0,UUIDMost:0}}
      

      From [Mod] Skylinerw:

      For example, in the in-game test I ran, I created an Enderman with a custom UUID in the End and then respawned the dragon. I exited the world and set the dragon's UUID (both its entity and within DimensionData) equal to the Enderman's using NBTExplorer. When I re-entered the world, the dragon was gone.
      Even reloading the world did not cause it to come back, although its health bar remained. However, after I killed the Enderman and reloaded the world, the dragon reappeared with the same UUID it was meant to have.
      So there is a failsafe for the dragon specifically.

      Possible solutions for the problem

      A possible solution would be to have a force parameter for the spawning method that says:
      "If there is already an entity with that UUID, the UUID is not preset and forced is true, then continue trying to generate a UUID".

      Command feedback

      As of MC-82945 the feedback for duplicate UUIDs was removed completely. This makes debugging a lot more complicated. I would suggest at least having a feedback when an entity with a preset UUID can not be spawned.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                searge [Mojang] Searge (Michael Stoyke)
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: