Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 ;D

Thanks for helping me <3

  • 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

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?

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.