Posted October 29, 201312 yr Hello! I need to change an entity's UUID: I am able to retrieve the entity's UUID, but am unable to set it. I am currently in 1.6.2, and am hoping that 1.7.2 will hold the changes to UUIDs necessary to be able to do this, or is this already implemented without reflection?
October 29, 201312 yr Why would you want to change that ? This is going to destroy Forge compatibility with vanilla, you know.
October 29, 201312 yr Wtf is the point of an uuid if one could change it at a whim? If you guys dont get it.. then well ya.. try harder...
October 29, 201312 yr UUID = Universally Unique Identifier You're not supposed to be able to change it. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 30, 201312 yr Author I need to change it because I need to identify a mob based off of it. I need to do this so I can only let certain mobs spawn, IE despawn all mobs and then spawn certain ones with certain UUIDs and EntityName so I can track each individual one.
October 30, 201312 yr You do know that EntityID and UUID's are different things? Also do you want to despawn a specific mob (i.e That 1 zombie to the left there) or all of a given type (i.e. all zombies)? Even if you where to despawn something based on it's UUID why would you want to change the value of it? use the value it already has, it's what it's for ' If you guys dont get it.. then well ya.. try harder...
October 30, 201312 yr Author I'm using the UUID to identify each mob individually, otherwise you have eight Zombies but no idea which is which. I do realize that EntityIDs and UUIDs are different things. I want to despawn all entities and prevent any from existing unless it has the specific UUID (which is why i need to set the UUID; The EntityHandler uses the UUID and MobType to determine whether or not to despawn the entity) that is contained in my data storage.
October 30, 201312 yr We need to clarify things, i think. The main difference between entityId and UUID is that the UUID is kept with the world data, while the entityId will change with each loading of the world. In either case, they are not meant to be changed at will. You can easily set whatever new flag you need in the entity NBT data. You don't need to change any of the vanilla ones. If you want your own UUIDs, go for it. But you can only set them inside your own mobs classes, and only once, or it wouldn't make sense. By the way, the LivingSpawnEvent may help you do what you want.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.