Global Cancel Trigger only works sometimes..?

Started by SuperBully on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Global Cancel Trigger only works sometimes..?

I've come across a very weird problem. I am doing a revamp of the smithing table system and so I had it cancel the opening of the original UI and open mine instead.

Here's the procedure.

It works great, for a while at least. After a bit of being in a world it simply just stops working and opens up the original UI. Sometimes its 1 minute, and sometimes its 30. It's wildly inconsistent, but it works again if I close the game or simply rejoin the world.

It doesn't seem like anyone else has had this problem nor do I feel like there's anything wrong with this procedure. Any ideas?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try something like this,
Wed, 04/02/2025 - 21:30

try something like this,

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This might make the actual…
Wed, 04/02/2025 - 21:31

This might make the actual ui open for one tick though. I'm not sure if you could avoid that without mixins

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It probably wouldn't be a…
Wed, 04/02/2025 - 21:31

It probably wouldn't be a terribly difficult to make mixin though

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for the help but…
Thu, 04/03/2025 - 12:22

Thanks for the help but unfortunately this didn't work. It functions the exact same, I've tried this and a dozen other variations. I have genuinely no idea why it functions so inconsistently. It just acts as if the procedure doesn't exist after a time.

My only work around that has shown any improvement is to create a duplicate Smithing Table block and have this procedure replace that block when right clicked; and then tie my gui to this block. It's clunky but I guess it works, but still not consistently. Sometimes it still won't replace the block.

I am wondering if it has less to do with the GUI and more to do with the canceling global trigger?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay I think a mixin would…
Thu, 04/03/2025 - 12:27

Okay I think a mixin would be best in this case, if you want to keep the original block. I can guide you through it.

You could also just completely replace it, as in like make the recipe return your smithing table block. But then ig you'd have the problem of villages...