I have seen similar issues to this on other threads, but I could not find a workaround to this error I would come across. Any help would be highly appreciated!
I'll explain the issue as best I can.
So I have a custom GUI that is similar to that of the crafting table interface, though I should explain what it is first before I mention the bug.
I made a block called the 'Shield Mend Table' which would increase the durability of the shield by infusing it with a material of some kind (For example, a Serpentine Gem) with the cost of a lapis lazuli. The reason being because there are powerful enemies that break shields like twigs in my mod.
I still have to figure out how to use procedures to increase the maximum durability of items, even if it means trying to code (which I am not afraid to do, but also not very fluent on yet;) but I think I can worry about that after I resolve the problem I have been having.
So the problem:
When I run the test environment and try to use the Shield Mend Table, it would seem to work at first as when I place the items in the input slots, the result shows up in the output slot. However, when I try to take the shield that appears in the output slot... *POOF!* the item is gone. Can't place it back in the player inventory because it vanishes like the volunteer in a magicians show during the disappearing act. This renders the Shield Mend Table useless because of this.
Now, here are some things I have already tried but did not work:
- Changing the GUI procedures into Block procedures
Changing the GUI procedures into Block procedures just does not work as when the test environment is run, the console prints "[Server thread/INFO] [STDERR]: [net.mcreator.the_shademantel.MCreatorShieldMendCheck:executeProcedure:21 Failed to load dependency x for procedure MCreatorShieldMendCheck!", therefor not detecting the items in the input slots, nor does it set the item in the output slot
- Trying other versions(?)
I have tried other versions such as the latest versions but alas, it still had happened when I ran the test environment. Considering how many different versions there are that could have worked, I am not sure if this would be the solution or not since I do want to keep working with the current version I am using.
- Other methods
There were other methods I have thought of, like having a crafting recipe that does the same thing. Unfortunately, making a crafting recipe did not work as shields are not modifiable this way. I even considered a potion effect that rapidly repairs the shield, but it fails to work as the itemstack dependency would be missing. I even tried possibly getting a procedure done that enchants the shield with unbreaking, but have not found a solution that I think would be viable
Anyone who can help out with this anyway they can will get a HUGE thanks.