Solved Change Entity's UUID?

Discussion in 'Plugin Development' started by Minecraft Frontiers, May 20, 2015.

Thread Status:
Not open for further replies.
  1. Is it possible to change the UUID of an entity (mob)?
  2. Offline


    No cause UUID stays for Universally unique identifier Or User unique identifier, and that is only for a entity that has been binded on a mojang account. IN this case a player
  3. @MrFrozen No, all entities have a UUID, that's why we have Entity#getUnqiueId() :)

    @Minecraft Frontiers Theoretically, it's possible to change an entity's UUID but... why would you want to?
    mine-care and KingFaris11 like this.
  4. Offline


    Yes it is possible, but you should never do it. Why don't you explain why you would even need to and maybe we can give you a better alternative to your current solution.
  5. I needed to assign custom UUIDs to entities. I ended up creating an UUID Array that pairs the Entities' current UUIDs with the custom UUIDs. Works perfectly.
  6. @RingOfStorms Sorry to bump an old thread, but why is this a bad idea? I may need to for CommandMobs, so you can resurrect a dead mob, so that I don't have to change all the settings to a new UUID. Are there risks in doing so?
  7. Offline


    @Minecraft Frontiers

    Instead of changing it, consider adding a metadata value to it. Only problem with that isn't transferrable between reloads.
    entity.setMetadata("extraUUID", new FixedMetadataValue(Plugin plugin, newUUID);
    UUID newUUID = UUID.fromString(entity.getMetadata("extraUUID"));
Thread Status:
Not open for further replies.

Share This Page