Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.8] [solved] Books Invalid Book Tag
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
delpi

[1.8] [solved] Books Invalid Book Tag

By delpi, July 10, 2015 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

delpi    71

delpi

delpi    71

  • Dragon Slayer
  • delpi
  • Forge Modder
  • 71
  • 840 posts
Posted July 10, 2015

I've looked around and can't find anything on how to fix this.  It worked find in 1.7.2, but something must have changed for books.

 

The book is fine except for there is nothing on the pages but "*  Invalid book tag *"

 

Here is my code

 

 

    // Create the book

    ItemStack book = new ItemStack(Items.written_book);

   

    // Create NBT data and add to the book

    NBTTagList bookPages = new NBTTagList();

    bookPages.appendTag(new NBTTagString("This mod impliments wold control functionality and some player commands"));

    bookPages.appendTag(new NBTTagString("Commands are as follows Dimension_Manager(DM), ADVENTURE/SURVIVAL/CREATIVE, LAG, SKELETONHORSE(SH), SPAWN, SUMMONPLAYER, TELEPORTTO(TPTO)"));

    bookPages.appendTag(new NBTTagString("Custom Menu Items are as follows: none"));

    bookPages.appendTag(new NBTTagString("Permissions are as follows Dimension_Manager.All - Access to all, Dimension_Manager.lag - Lists Server Performance, Dimension_Manager.SkeletalHorse - Grants player a cool horse, Dimension_Manager.spawn - Brings player to server spawn, Dimension_Manager.summon - Summon another Player, Dimension_Manager.TPTO - Teleport to another Player"));

    book.setTagInfo("pages", bookPages);

    book.setTagInfo("author", new NBTTagString("delpi"));

    book.setTagInfo("title", new NBTTagString("ClanDoolittle DimensionManager Mod Instructions"));

 

    // Give the player the book

    player.inventory.addItemStackToInventory(book);

 

 

 

Interestingly enough, if I generate a writable book, the text shows up, but then it has a quill and all that.

  • Quote

Long time Bukkit & Forge Programmer

Happy to try and help

Share this post


Link to post
Share on other sites

diesieben07    7590

diesieben07

diesieben07    7590

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7590
  • 54991 posts
Posted July 10, 2015

Try using a debugger and step through the book rendering code, somewhere it will bail out and say "invalid". Find that and find out why.

  • Quote

Share this post


Link to post
Share on other sites

delpi    71

delpi

delpi    71

  • Dragon Slayer
  • delpi
  • Forge Modder
  • 71
  • 840 posts
Posted July 10, 2015

Question on the debugger.

 

Since the code is in the minecraft library, I just go in and find the render part and toggle a breakpoint?

 

A second question for folks more experienced with debugging minecraft in eclipse, when i use the breakpoint, either the client or server crashes after about 5 seconds of one or the other being frozen.  Is there a better way to do that activity?

  • Quote

Long time Bukkit & Forge Programmer

Happy to try and help

Share this post


Link to post
Share on other sites

larsgerrits    514

larsgerrits

larsgerrits    514

  • Reality Controller
  • larsgerrits
  • Members
  • 514
  • 3462 posts
Posted July 10, 2015

The debugger shouldn't make Minecraft crash. Can you post the crash log?

 

And yes, you can toggle a breakpoint in the vanilla jar

  • Quote

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Share this post


Link to post
Share on other sites

diesieben07    7590

diesieben07

diesieben07    7590

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7590
  • 54991 posts
Posted July 10, 2015

A second question for folks more experienced with debugging minecraft in eclipse, when i use the breakpoint, either the client or server crashes after about 5 seconds of one or the other being frozen.  Is there a better way to do that activity?

Yes, you have to be a bit careful since when you do a breakpoint the other thread is not being suspended (not sure if there is a way to do that automatically), so it thinks the other one is just not responding and eventually bails with a timeout.
  • Quote

Share this post


Link to post
Share on other sites

delpi    71

delpi

delpi    71

  • Dragon Slayer
  • delpi
  • Forge Modder
  • 71
  • 840 posts
Posted July 10, 2015

Yeh, that exactly describes what happens. 

 

I wonder if I grab the other side and pause it, if that would fix things?  Would have to be quick.  An automated way would be easier.

 

larsgerrits - I'll grab a snapshot of the log the next time it happens.

 

 

 

 

  • Quote

Long time Bukkit & Forge Programmer

Happy to try and help

Share this post


Link to post
Share on other sites

diesieben07    7590

diesieben07

diesieben07    7590

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7590
  • 54991 posts
Posted July 10, 2015

Hmm, at least in IntelliJ if I make a breakpoint the default is "Suspend All" instead of "Suspend Thread", so that should work just fine.

  • Quote

Share this post


Link to post
Share on other sites

delpi    71

delpi

delpi    71

  • Dragon Slayer
  • delpi
  • Forge Modder
  • 71
  • 840 posts
Posted July 10, 2015

That give me an idea.  I'll look up if there is a way to change the behavior of breakpoint when I get home tonight to "Suspend All".

  • Quote

Long time Bukkit & Forge Programmer

Happy to try and help

Share this post


Link to post
Share on other sites

delpi    71

delpi

delpi    71

  • Dragon Slayer
  • delpi
  • Forge Modder
  • 71
  • 840 posts
Posted July 10, 2015

For anyone else having trouble with the suspend in eclipse, here is a link that should help.

 

http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fbreakpoints%2Fref-suspendpolicy_option.htm

  • Quote

Long time Bukkit & Forge Programmer

Happy to try and help

Share this post


Link to post
Share on other sites

delpi    71

delpi

delpi    71

  • Dragon Slayer
  • delpi
  • Forge Modder
  • 71
  • 840 posts
Posted July 10, 2015

Found it.  They added a limitation on title length.  It has to be under 32 characters now.

  • Quote

Long time Bukkit & Forge Programmer

Happy to try and help

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • poopoodice
      Adding jar files to existing environment

      By poopoodice · Posted 4 minutes ago

      It's been discussed for a long time, but none of the solutions worked for me (maybe I did not did them right). So I have created another mod (basically a tool) and I want to use it in another environment, this is what I've tried:   1. run normal build ./gradlew.bat build, and then put built jar from lib into the mods folder. 2. run jar build ./gradlew.bat jar, and then put built jar from reobfJar into the mods folder. 3. build jar using existing ide options, and then put built jar from lib into the mods folder.   1 & 2 causes crashes, and 3 does not work at all (not detected).   What is the correct way of doing it in 1.16.4? Thanks.
    • Draco18s
      GUI Documentation

      By Draco18s · Posted 30 minutes ago

      GUIs aren't that difficult. There's dozens of tutorials for them and they haven't really changed all that much in ten years.
    • Xenfo
      Mod Blocker

      By Xenfo · Posted 46 minutes ago

      Any mod blockers that actually work? Please link them if yes.
    • diesieben07
      Tessellator ignores lighting?

      By diesieben07 · Posted 1 hour ago

      Neither 1.10 now 1.14 are supported here. Please refer to the supported versions page: https://forums.minecraftforge.net/topic/91712-supported-version-directory/
    • CookieLukas
      Tessellator ignores lighting?

      By CookieLukas · Posted 1 hour ago

      Oh,  sorry, the code was 1.10.2, but as its not allowed here, I updated it to 1.14.4.
  • Topics

    • poopoodice
      0
      Adding jar files to existing environment

      By poopoodice
      Started 4 minutes ago

    • T1ps
      3
      GUI Documentation

      By T1ps
      Started Tuesday at 10:14 PM

    • Xenfo
      0
      Mod Blocker

      By Xenfo
      Started 46 minutes ago

    • CookieLukas
      3
      Tessellator ignores lighting?

      By CookieLukas
      Started 2 hours ago

    • Extrodonary
      1
      Forge isn't working on Minecraft Realms

      By Extrodonary
      Started 1 hour ago

  • Who's Online (See full list)

    • Pinary
    • StealthyNoodle
    • bananapizzuh
    • Xenfo
    • Warsade
    • monkeysHK
    • Microcellule
    • Draco18s
    • ChampionAsh5357
    • philip-elsner@gmx.net
    • Beethoven92
    • Mango106
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.8] [solved] Books Invalid Book Tag
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community