Vswe's Summer Courses | You're not logged in. Sign up or log in | Server time: | Donate
One can now see other persons' badge hunts. Simply head over to their profiles to access them.

Go back to sub forum page

General forum

Non-course related subjects

3. Programming help

GUI Text

  • 2013-12-31 21:26:50
    I have some text in a tile entity that I would like to display in a gui, but the gui is not printing the string

    Gui Class: http://pastebin.com/703RGTRf
    Tile Entity Class: http://pastebin.com/p7bVrmCe

    Screenshot: http://imageshack.us/a/img35/2567/pdqs.png
  • 2013-12-31 22:44:18
    The variable has a value only on the server so when you want to display it in a gui you need to send that to the client
  • 2014-01-01 01:07:22
    How do I do that though? The send progress bar update only sends an integer
  • 2014-01-01 13:56:20
    You could make your own packets and send them from/to the container as the normal shorts. Or you could convert the string to a sequence of shorts and send them normally.
  • 2014-01-01 20:53:50
    Okay, I'm trying the second way, but I'm running into a problem. The addCraftingToCrafters seems to read the tile entity just fine, but the updateProgressBar doesn't see the byte array

    Container: http://pastebin.com/6MQfSTJi
    Tile Entity: http://pastebin.com/TAaRucBZ
    Gui: http://pastebin.com/Vhrpvfha

    Console Output: http://pastebin.com/6WqaLBfY
  • 2014-01-02 15:52:22
    Have you created the byte array on the client side? Id 9 should probably contain the amounts of bytes the server sends. Then when the client receives id 9 it creates a new byte array with that length.
  • 2014-01-04 21:54:51
    Thanks for all the help. It is working now
  • Log in or sign up to reply to this thread