mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 09:39:48 +00:00
Send Valid Tags to Client that correlate with UUIDs found on the Server. No longer needs the Clones Data
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user