Send Valid Tags to Client that correlate with UUIDs found on the Server. No longer needs the Clones Data

This commit is contained in:
KAMKEEL committed 2023-03-22 17:58:02 -04:00
1 parent 0943299384
commit 41c4fc66d0
5 files changed
+80 -24

No files matched your search

@@ -20,21 +20,21 @@ public class GuiCustomScrollCloner extends GuiCustomScroll {
int l = 0;
for(int i = 0; i < list.size(); i++)
{
if (this.parent.tagMap.hasClone(list.get(i))) {
HashSet<UUID> tags = this.parent.tagMap.getUUIDs(list.get(i));
boolean inFilter = false;
for (UUID uuid : tags) {
if (GuiNpcMobSpawner.filter.contains(uuid)) {
inFilter = true;
break;
}
}
if (!inFilter) {
continue;
}
} else if (!GuiNpcMobSpawner.showHidden) {
continue;
}
// if (this.parent.tagMap.hasClone(list.get(i))) {
// HashSet<UUID> tags = this.parent.tagMap.getUUIDs(list.get(i));
// boolean inFilter = false;
// for (UUID uuid : tags) {
// if (GuiNpcMobSpawner.filter.contains(uuid)) {
// inFilter = true;
// break;
// }
// }
// if (!inFilter) {
// continue;
// }
// } else if (!GuiNpcMobSpawner.showHidden) {
// continue;
// }
int j = 4;
int k = (14 * l + 4) - scrollY;
@@ -72,12 +72,23 @@ public class GuiCustomScrollCloner extends GuiCustomScroll {
}
int tagStartX = j + fontRendererObj.getStringWidth(displayString) + 5;
if (this.parent.tagMap.hasClone(list.get(i))) {
for (UUID tag : this.parent.tagMap.getUUIDs(list.get(i))) {
// if (!tag.getIsHidden()) {
// fontRendererObj.drawString("[" + tag.name + "]", tagStartX, k, tag.color);
// tagStartX += fontRendererObj.getStringWidth("[" + tag.name + "]") + 2;
// }
if(this.parent.displayTags == 0 || this.parent.displayTags == 2){
if (this.parent.tagMap.hasClone(list.get(i))) {
for (UUID tagUUID : this.parent.tagMap.getUUIDs(list.get(i))){
Tag tag = this.parent.tags.get(tagUUID);
if(tag != null){
if(this.parent.displayTags == 2){
fontRendererObj.drawString("[" + tag.name + "]", tagStartX, k, tag.color);
tagStartX += fontRendererObj.getStringWidth("[" + tag.name + "]") + 2;
}
else {
if(!tag.getIsHidden()){
fontRendererObj.drawString("[" + tag.name + "]", tagStartX, k, tag.color);
tagStartX += fontRendererObj.getStringWidth("[" + tag.name + "]") + 2;
}
}
}
}
}
}
}