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

Hello, I'm trying to make a furnace style block with a progress bar and only thing I'm missing is updating the progress bar in the GUI. And for that I need to access a variable stored in the blocks TileEntity but the problem is that since I can't pass my blocks tilyEntity through the parameters from the getClientGuiElement when I use world.getTileEntity to pass over the tileEntity to the GUI, the world that I use right there (the one that comes in the getClientGuiElement parameters) is the client sided version of the world and when called getTileEntity it doesn't return the actual tileEntity but some other possible fake client side instance of the block which doesn't have the same variable values as the actual server side tileEntity.

 

So basically I need to access the tileEntity from the server side from the GUI or somehow send over the value of an int into the clients GUI. How can I do this? Am I doing something wrong here?

.... You should sync your client TileEntity with server version..

The aim of the existence of client side tileentity is tileentity-specific rendering and Gui/Container.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

  • Author

Thank you, after some research I found out that same thing, that tile entities aren't automatically synced but wasn't quite sure if this was the case. Guess I'll have to write a packet handler..

Hi

 

This tutorial project has a working example of that

https://github.com/TheGreyGhost/MinecraftByExample

(see MBE31)

https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe31_inventory_furnace/Notes.txt

 

icrafting.sendProgressBarUpdate() and icrafting.updateProgressBar() is probably what you need.

 

also this background info

http://greyminecraftcoder.blogspot.com.au/2015/01/gui-containers.html

 

-TGG

  • Author

Hi

 

This tutorial project has a working example of that

https://github.com/TheGreyGhost/MinecraftByExample

(see MBE31)

https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe31_inventory_furnace/Notes.txt

 

icrafting.sendProgressBarUpdate() and icrafting.updateProgressBar() is probably what you need.

 

also this background info

http://greyminecraftcoder.blogspot.com.au/2015/01/gui-containers.html

 

-TGG

 

Thank you! I had seen your tutorials before but never actually used them, now with the help of it I got this done :P

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.