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 course page

Climbing the interface ladder

From basic graphical interfaces to very advanced ones

Gui and TileEntity not communicating

  • 2013-12-24 07:02:49
    In the gui class, I am trying to reference some values; a few integers, a long, and a boolean; yet for some reason it is only reading the one boolean value and returning 0 for the numbers even when they are not 0.

    Here is the code to a few of my classes and a video because I am pretty bad at explaining things
    Code: http://pastebin.com/u/Mrolas
    Video: https://www.dropbox.com/s/cykl38yznf6wjlx/modIssue.mov

    PS: sorry there's one on the lecture two thread, I meant to post it here
  • 2013-12-24 11:05:52
    It's easy: when you right click the block you get the server side value of the coins variable and when you put items in the container you set the server side variable. The gui is client side, so you read the client side variable that is still 0 because it is never changed. To fix this you need to send the client what you need. In lecture 3 you'll see one way to do this.
  • 2013-12-24 17:47:32
    Thank you, watched through lecture 3, added those three methods and it works now :)
  • Log in or sign up to reply to this thread