Acrogenous Posted March 2, 2018 Posted March 2, 2018 so I created a "makeBook" method that adds a written book with information in it to a players inventory; public static void makeBook(EntityPlayer player, String title, String author,String... pages) { NBTTagList pagesTag = new NBTTagList(); NBTTagCompound compound = new NBTTagCompound(); compound.setString("author",author); compound.setString("title",title); for(int i = 0; i < pages.length; ) { pagesTag.appendTag(new NBTTagString(pages[i])); i++; } compound.setTag("pages",pagesTag); ItemStack book = new ItemStack(Items.WRITTEN_BOOK); book.setTagCompound(compound); player.addItemStackToInventory(book); } and then I pass this line of code in another class: makeBook(player,"title","author","CHAPTER 1 In this world, all around us there is a force"); and no matter if I add \n or any other thing like that the book always looks like this (the title and author work however) any ideas how I make it A; display all the text and B; format it thanks in advance ~Acro Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.