Topic category: Troubleshooting, bugs, and solutions
I spontaneously started getting build errors with a sword in my mod. I couldn't fix it, so I loaded an autosave backup from the previous day. When I ran the client for a test the sword seemed to be entirely missing from the game, even though the element was visible in MCreator. I wanted to edit the code of the sword to see if anything looked weird, but found that the edit button wasn't doing anything. I went to modid/src/main/java/net/modid/item and looked for the sword there to manually open the .java file in a text editor when I found that it was completely missing! I ended up using a hacktool to decompile the current version of my mod and from the source of it retrieved another sword .java file. I copied this file to my mod's .../modid/item directory and regenerated the code (I read the pinned thread here). When I regenerated the code, it literally deleted my sword's .java file. I don't know why it's doing this, and I don't know why it is happening seemingly on a whim. Keep in mind that the backup I loaded was from the previous day, so none of my recent edits could have affected this, I don't believe.
If anyone could help me fix this, I would really appreciate it! :)
I may have found the issue. Yesterday or the day before I had added a right-clicked-in-air trigger to the sword to play around. Once I was finished, I deleted it. It seems that deleting it had some adverse effect on the sword that wasn't apparent until now. I went into the sword's trigger page and, while it showed that no procedures were selected for any of the triggers, I made sure by manually selecting the "(no procedure)" option.
I'm having something of a similar problem, but more on the extreme side; regenerating my mod's code deletes files from the same location; the missing elements still appear in Mcreator, but cannot be opened, and yield compilation errors. I've tried restoring the files from backups manually, but it just reverts whenever the code regenerates.
Any ideas? I'm having trouble finding people with a similar issue.
Would you mind uploading the workspace? We can try to check it if it is not too broken / complex / big
Did you guys figgure this issue out; because I'm having same/or simuliar issue where I did the same thing, but then i tried loading a backup where it gives error to everything due to being unable to load them, they still have the elements files though, any idea how i could get it to load them so am not creating the entire mod again, because i was on the last item made, and then it was gonna be done
I let the MCreator regenerate code build and it delete most of the elements in Mod how can i get them again?