Started by
SuperBully
on
Topic category: Help with Minecraft modding (Java Edition)
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.
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?
try something like this,
This might make the actual ui open for one tick though. I'm not sure if you could avoid that without mixins
It probably wouldn't be a terribly difficult to make mixin though
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?
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...