mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Fix UUIDs not saving to NPCs - Revert TagMapUUID List
This commit is contained in:
1 parent
aa02580c28
commit
9d68a5e079
4 files changed
+19
-29
No files matched your search
@@ -103,7 +103,7 @@ public class PacketHandlerServer{
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
for (UUID uuid : npc.advanced.tagUUIDs) {
|
||||
Tag tag = TagController.getInstance().get(uuid);
|
||||
Tag tag = TagController.getInstance().getTagFromUUID(uuid);
|
||||
if (tag != null) {
|
||||
tagList.appendTag(new NBTTagString(tag.name));
|
||||
}
|
||||
@@ -763,7 +763,7 @@ public class PacketHandlerServer{
|
||||
Server.sendData(player, EnumPacketClient.GUI_DATA, compound);
|
||||
}
|
||||
else if(type == EnumPacketServer.TagSet){
|
||||
npc.advanced.tagUUIDs.removeIf(uuid -> TagController.getInstance().get(uuid) != null);
|
||||
npc.advanced.tagUUIDs.removeIf(uuid -> TagController.getInstance().getTagFromUUID(uuid) != null);
|
||||
NBTTagCompound compound = Server.readNBT(buffer);
|
||||
NBTTagList list = compound.getTagList("TagNames",8);
|
||||
for (int i = 0; i < list.tagCount(); i++) {
|
||||
@@ -1081,7 +1081,10 @@ public class PacketHandlerServer{
|
||||
TagMap tagMap = ServerTagMapController.Instance.getTagMap(tab);
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setTag("CloneTags", tagMap.writeNBT());
|
||||
|
||||
Server.sendData(player, EnumPacketClient.GUI_DATA, compound);
|
||||
}
|
||||
else if (type == EnumPacketServer.CloneAllTags) {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
HashSet<Tag> validTags = TagController.getInstance().getAllTags();
|
||||
NBTTagList validTagList = new NBTTagList();
|
||||
for(Tag tag : validTags){
|
||||
@@ -1091,6 +1094,7 @@ public class PacketHandlerServer{
|
||||
}
|
||||
compound.setTag("AllTags", validTagList);
|
||||
Server.sendData(player, EnumPacketClient.GUI_DATA, compound);
|
||||
System.out.println("-------------- We sent the tags");
|
||||
}
|
||||
else
|
||||
warn(player,"WE 2 tried todo something with the wrong tool, probably a hacker");
|
||||
|
||||
Reference in new issue
Block a user