mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 09:55:11 +00:00
Fix ReadNBT Tag Error
This commit is contained in:
1 parent
c4b9a5ca21
commit
53070b47c4
4 files changed
+3
-10
No files matched your search
@@ -1094,7 +1094,6 @@ 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");
|
||||
|
||||
@@ -22,12 +22,12 @@ import java.lang.reflect.Modifier;
|
||||
import java.util.*;
|
||||
|
||||
public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData {
|
||||
public static HashMap<UUID, Tag> tags = new HashMap<>();
|
||||
public static HashMap<String, UUID> tagNames = new HashMap<>();
|
||||
public static HashSet<String> tagFilters = new HashSet<>();
|
||||
public static byte displayTags = 0;
|
||||
|
||||
public TagMap tagMap;
|
||||
public HashMap<UUID, Tag> tags = new HashMap<>();
|
||||
|
||||
private final GuiCustomScrollCloner scroll = new GuiCustomScrollCloner(this,0);
|
||||
private final GuiCustomScroll filterScroll = new GuiCustomScroll(this,1);
|
||||
@@ -159,8 +159,6 @@ public class GuiNpcMobSpawner extends GuiNPCInterface implements IGuiData {
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
this.list = ClientCloneController.Instance.getClones(activeTab);
|
||||
this.tagMap = ClientTagMapController.Instance.getTagMap(activeTab);
|
||||
System.out.println("Client Tag Map");
|
||||
System.out.println(this.tagMap);
|
||||
scroll.setList(getSearchList());
|
||||
}
|
||||
public void keyTyped(char c, int i)
|
||||
|
||||
@@ -59,13 +59,9 @@ public class GuiCustomScrollCloner extends GuiCustomScroll {
|
||||
int tagStartX = j + fontRendererObj.getStringWidth(displayString) + 5;
|
||||
if(GuiNpcMobSpawner.displayTags == 0 || GuiNpcMobSpawner.displayTags == 2){
|
||||
if (this.parent.tagMap.hasClone(list.get(i))) {
|
||||
System.out.println("BRUH 2");
|
||||
for (UUID tagUUID : this.parent.tagMap.getUUIDs(list.get(i))){
|
||||
Tag tag = this.parent.tags.get(tagUUID);
|
||||
System.out.println("BRUH 2.5");
|
||||
if(tag != null){
|
||||
System.out.println("-- BRUH 3 --");
|
||||
System.out.println(GuiNpcMobSpawner.displayTags);
|
||||
if(GuiNpcMobSpawner.displayTags == 2){
|
||||
fontRendererObj.drawString("[" + tag.name + "]", tagStartX, k, tag.color);
|
||||
tagStartX += fontRendererObj.getStringWidth("[" + tag.name + "]") + 2;
|
||||
|
||||
@@ -25,9 +25,9 @@ public class TagMap {
|
||||
String cloneName = nbttagcompound.getString("Clone");
|
||||
|
||||
HashSet<UUID> uuids = new HashSet<UUID>();
|
||||
NBTTagList nbtTagList = compound.getTagList("TagUUIDs",8);
|
||||
NBTTagList nbtTagList = nbttagcompound.getTagList("TagUUIDs",8);
|
||||
for (int j = 0; j < nbtTagList.tagCount(); j++) {
|
||||
String uuid = nbtTagList.getStringTagAt(i);
|
||||
String uuid = nbtTagList.getStringTagAt(j);
|
||||
if(!uuid.isEmpty()){
|
||||
uuids.add(UUID.fromString(uuid));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user