Keep GUI open when replacing block

Started by SHB_YT on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Keep GUI open when replacing block

Is there any way to keep the GUI open when the block linked to that GUI is replaced (e.g. replaced with a  the exact same block (state and NBT data) that has an animated texture like a furnace)?

So essentially just like a regular furnace. I got the whole replacing block to work perfectly it's just that if the GUI is open when the block is replaced the GUI closes which is annoying.

Is there anyway to fix this? I've tried opening the GUI up again right after but it requires dependencies I don't have.

 

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In Minecraft vanilla, the…
Mon, 04/27/2020 - 06:27

In Minecraft vanilla, the Furnace is one block. There isn't "on" furnace and "off" furnace.
If you want to change your block's texture while keeping the GUI open, don't create 2 blocks (one "on" and the other "off") but you must use blockstates and add code inside your java block's file.

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Could've sworn there were…
Mon, 04/27/2020 - 11:17

Could've sworn there were two blocks.

Right so the way I see it, its impossible to do this using procedures currently.

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well to detect there's an…
Mon, 04/27/2020 - 11:36

Well to detect there's an item or when your block need to change its state, you need a procedure, but no, to change its texture you need to code.

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do you know of any good…
Tue, 04/28/2020 - 15:47

Do you know of any good sources where I could find the documentation to do this? I've been messing around with the code a bit but I'm not entirely sure on how to change the block's texture. If you know of somewhere I could get more information on how to do this that would be great. Thank you.