The Meaning of Life, the Universe, and Everything.
Location:
Tucson, Arizona
Join Date:
10/31/2011
Posts:
219
Location:
Tucson, AZ, USA
Minecraft:
ThatBenderGuy
Nintendo:
1435-8432-4174
Member Details
So I have a tile entity with 2 slots and when both slots have specific items in them a counter goes up. The counter is correctly tracked by the tile entity and is saved when you leave the game but the problem is the Gui I am working on for it does not pick up the updated value of the counter. Here are my 2 classes (pastebin)
Within the GUI I am keeping track of the variables in the method: getCombineProgess and in my tile entity class I have the method getField to retrieve the current variable of the counter. It gets the total time correctly but does not retrieve the updated currentTime variable.
I have been working off the Furnace code and I don't know what I am missing that's making it not correctly send the updated currentTime variable to the GUI. I need the variable for the custom progress bar I have to work.
EDIT:
The variable actually seems to update whenever I leave and reenter the game but doesn't update until I leave and reenter again. I have no clue what I need to do to fix this issue
EDIT:EDIT:
After a lot of research I figured out how to do it through packets and the IMessage interface. Too long winded to explain. Check out CJMinecraft's 1.11.2 tutorials. They fully work in 1.12
So I have a tile entity with 2 slots and when both slots have specific items in them a counter goes up. The counter is correctly tracked by the tile entity and is saved when you leave the game but the problem is the Gui I am working on for it does not pick up the updated value of the counter. Here are my 2 classes (pastebin)
TileEntity Source
Gui Source
Within the GUI I am keeping track of the variables in the method: getCombineProgess and in my tile entity class I have the method getField to retrieve the current variable of the counter. It gets the total time correctly but does not retrieve the updated currentTime variable.
I have been working off the Furnace code and I don't know what I am missing that's making it not correctly send the updated currentTime variable to the GUI. I need the variable for the custom progress bar I have to work.
EDIT:
The variable actually seems to update whenever I leave and reenter the game but doesn't update until I leave and reenter again. I have no clue what I need to do to fix this issue
EDIT:EDIT:
After a lot of research I figured out how to do it through packets and the IMessage interface. Too long winded to explain. Check out CJMinecraft's 1.11.2 tutorials. They fully work in 1.12
Someday I'll return to the Blueheart Glacier and sleep for a thousand years.