Guest User

"Invalid book tag" given because of this

a guest
Nov 25th, 2015
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. public class Guide
  2. {
  3.     public static ItemStack guideBook()
  4.     {
  5.         ItemStack guideBook = new ItemStack(Items.written_book, 1);
  6.         guideBook.setTagCompound(new NBTTagCompound());
  7.         guideBook.getTagCompound().setString("title", StatCollector.translateToLocal("book.title"));
  8.         guideBook.getTagCompound().setString("author", "Version: " + VTweaks.version);
  9.         NBTTagList pages = new NBTTagList();
  10.  
  11.         ArrayList<String> indiPages = new ArrayList<String>();
  12.  
  13.         indiPages.add("Hi :)");
  14.  
  15.         for (String s : indiPages)
  16.             pages.appendTag(new NBTTagString(s));
  17.  
  18.         guideBook.getTagCompound().setTag("pages", pages);
  19.        
  20.         return guideBook;
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment