GUI Slots not updating while GUI is open

Started by Kuraion on

Topic category: Help with Minecraft modding (Java Edition)

Active 3 years ago
Joined Feb 2021
Points:
649

User statistics:

  • Modifications: 0
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
GUI Slots not updating while GUI is open
Sat, 10/30/2021 - 14:21 (edited)

I'm working on a mod that adds a furnace-like block, and everything works great on the technical side now, but for some reason the displayed slots don't update until I close and reopen the GUI. Mind, the items still get processed correctly, it just doesn't update the slots while the GUI is open, though text and textures in the GUI tick correctly. What am I missing?

Edit: I'm working on a 1.16.5 Forge mod.

Edited by Kuraion on Sat, 10/30/2021 - 14:21
Active 1 year ago
Joined Oct 2020
Points:
1618

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
gonna guess that you out the…
Sat, 10/30/2021 - 16:44

gonna guess that you out the procedure on GUI Open Tick.

Active 3 years ago
Joined Feb 2021
Points:
649

User statistics:

  • Modifications: 0
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
No the procedure is on the…
Sat, 10/30/2021 - 17:48

No the procedure is on the block's update tick, else processing the items obviously wouldn't work while the GUI is closed, which it does
It's really just the slots not showing changes in real time although the contents change 

Active 1 year ago
Joined Oct 2020
Points:
1618

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
I don't understand the…
Sat, 10/30/2021 - 18:21

I don't understand the problem, can you take a video or smt?

Active 1 year ago
Joined Aug 2021
Points:
628

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
This would be a little…
Sun, 10/31/2021 - 05:49

This would be a little sloppy but could you make it so that as soon as it smelts it closes and reopens the gui in like a couple ticks?

Active 3 years ago
Joined Feb 2021
Points:
649

User statistics:

  • Modifications: 0
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
I thought about doing that…
Sun, 10/31/2021 - 13:26

I thought about doing that as a workaround, but I'm not sure how to do that 

Active 3 years ago
Joined Feb 2021
Points:
649

User statistics:

  • Modifications: 0
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
Update: I found out what's…
Mon, 11/01/2021 - 12:44

Update: I found out what's causing that behavior, it's because I had my block be replaced with a different block when fuel decreased below a certain point, and apparently the GUI doesn't update the slots to the new block, meaning it desyncs and doesn't show changes anymore. So if anyone stumbles upon this with the same problem, you will have to use actual block states instead of the block being replaced.