Posted August 10, 201411 yr I'm working on the GUI functionality of my block for 4 days now, and I still cant pull it off about time to ask for some help... I'm trying to display a simple progress bar, and i pulled it off for singleplayer, not using messages, just using the getClient().getServer() function to get the serverside TileEntity, but this doesn't work for multiplayer unfortunately... So now, I'm sending a message containing a string (because sending too many things at once had me get an IndexOutOfBounds) in which i carry all the data required... the string gets created by the getEncodedMessageAsString() method in the PrinterTileEntity class, and gets passed into the constructor in the sendToAllAround() method which gets called in updateEntity(). Here comes the problem: The message that is received only contains the string i set as field, so if i did "String string;", i got a NullPointer, and if i did "String string = "";" i got an empty string variable through if you want to look at the code, and the issue i have up for three days, here is the links: GitHub: https://github.com/Kant0sh/threedeeprinter Issue: https://github.com/Kant0sh/threedeeprinter/issues/1 PrinterTileEntity.java: https://github.com/Kant0sh/threedeeprinter/blob/master/main/threedeeprinter/mod3DPrinter/tileEntity/PrinterTileEntity.java Message and MessageHandler in this package: https://github.com/Kant0sh/threedeeprinter/tree/master/main/threedeeprinter/mod3DPrinter/network/message Help would be much appreciated Edit: also, if you have GitHub, feel free to comment on the issue Thanks for helping me <3
August 11, 201411 yr Author Bump.... if you want to you can also leave me a suggestion on a different approach, I totally would ditch what I have Thanks for helping me <3
August 11, 201411 yr Well I saw this fellow post this in Paintings and Packets Packets are easy. https://gist.github.com/CatDany/4a3df7fcb3c8270cf70b Please, hit "applaud" under my avatar, thanks I haven't tried it get, but I bookmarked it and will give it a shot when I can, maybe it can help you? Currently updating my Mod to 1.10.2 https://bitbucket.org/hugo_the_dwarf/riseoftristram2016/src?at=master
August 12, 201411 yr Author Thank you so much! I love you now I finally have it! been working on it for like 5 days now... many thanks Thanks for helping me <3
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.