I apologize for this code probably being difficult to read, it's my first time to use this section of the forum.
I have a clientside mod that adds NBT items to creative tabs.
When I open the book on singleplayer it looks right (like the picture I uploaded)
When I spawn it through creative on a creative server it just shows as a string (check 2nd screenshot)
Is this perhaps caused by Spigot or something? I haven't had the chance to test it on a vanilla server, as I haven't been able to find any creative vanilla servers.
private static ItemStack generateThiefGuide(){
ItemStack stack = new ItemStack(Items.WRITTEN_BOOK);
stack.setTagCompound(new NBTTagCompound());
stack.getTagCompound().setString("title", "Thieving Guide");
stack.getTagCompound().setString("author", QualityOrder.noteWorthyUsernames[0]);
stack.getTagCompound().setTag("display", new NBTTagCompound());
NBTTagList loreTagList = new NBTTagList();
loreTagList.appendTag(new NBTTagString("A beginner's guide to thieving using Quality Order!"));
loreTagList.appendTag(new NBTTagString("The book doesn't display right on some servers,"));
loreTagList.appendTag(new NBTTagString("if that is the case, read it in Singleplayer!"));
stack.getTagCompound().getCompoundTag("display").setTag("Lore", loreTagList);
NBTTagList pages = new NBTTagList();
pages.appendTag(new NBTTagString(
"{text:\"Follow the steps of this guide, and you will be a master thief in no time!\n\", extra:["
+ addOpeningLine(addBasicString("Before starting, make sure you have installed "))
+ ",{text:'Quality Order', color:dark_purple, clickEvent:{action:open_url, value:'http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2687920'}, hoverEvent:{action:show_text, value:[{text:'Click to go to the mod page!', color:green}]}}"
+ addBasicString("!")
+ "]}"));
stack.getTagCompound().setTag("pages", pages);
return stack;
}
public static String addOpeningLine(String str){
if(str.startsWith(","))
return str.substring(1);
return str;
}
public static String addString(String str){
return ",{text:\"" + str + "\"}";
}
public static String addBasicString(String str){
return ",{text:\"" + str + "\", color:reset}";
}
Is this perhaps caused by Spigot or something? I haven't had the chance to test it on a vanilla server, as I haven't been able to find any creative vanilla servers.
Why don't you run a small server on your computer to see if the problem persists?
I apologize for this code probably being difficult to read, it's my first time to use this section of the forum.
I have a clientside mod that adds NBT items to creative tabs.
When I open the book on singleplayer it looks right (like the picture I uploaded)
When I spawn it through creative on a creative server it just shows as a string (check 2nd screenshot)
Is this perhaps caused by Spigot or something? I haven't had the chance to test it on a vanilla server, as I haven't been able to find any creative vanilla servers.
Check out my mods Infinity Item Editor and Quality Order!
Please indicate what version are you on in the prefix in Edit Thread, so that we can help you accordingly
Alright, I did that. Thank you.
Check out my mods Infinity Item Editor and Quality Order!
Why don't you run a small server on your computer to see if the problem persists?
I opened a server to lan from vanilla and joined it, myself, through my workspace.
I was able to spawn the book and it displayed everything correctly.
Check out my mods Infinity Item Editor and Quality Order!
Then it's a problem related to spigot, you won't be able to fix this.
So my guess was correct
It's pretty weird since, it can get all of the nbt right, but not format it correctly.
Check out my mods Infinity Item Editor and Quality Order!