[1.16.5] NoClassDefFoundError vectorwing/farmersdelight/blocks/TomatoesBlock, Ticking Block Entity
See original GitHub issueDescription
FTB OceanBlock’s version got updated from 1.3.0 to 1.4.0 and a NoClassDefFoundError happened for some of our users after the loading and playing the pack.
Your mod’s version went from FarmersDelight-1.16.5-0.4.6.jar
to FarmersDelight-1.16.5-0.5.0.jar
in those modpack versions.
I see that browsing the files of commit vectorwing/FarmersDelight@0402a2f the class is there as intended. I believe this to be the version you pushed to CurseForge on the same day, August 7 2021 (FarmersDelight-1.16.5-0.4.6.jar
).
Then, by browsing the files of commit vectorwing/FarmersDelight@64b5b70 the file is no longer at that location. This was committed the day after, or August 8 2021 and in-dev for the next update. By going to vectorwing/farmersdelight/blocks/crops/TomatoesBlock
we can find that class, so it’s been moved, which is fine. Clicking on description and last modifications of that class reorganisation brings us to commit vectorwing/FarmersDelight@f1fede5, which was done on June 16 2021. So it’s definitely a bit confusing! Maybe that was on another branch?
Steps to reproduce:
- Play OceanBlock 1.3.0, use a HydroponicBedTile to plant a TomatoesBlock.
- Close the game.
- Update to 1.4.0, acquire
FarmersDelight-1.16.5-0.5.0.jar
and load the game. - Crashes because NoClassDefFound.
Expected behavior: Not crash, or that this change be listed in the changelog, unless I’ve missed it then I’m sorry. I see it says “Breaking Changes” although I’ve not seen that class reorganisation in there. Our modpack dev usually checks the changelog but that change seems to have been subtile. You document at https://github.com/vectorwing/FarmersDelight/wiki/0.5-Breaking-Changes states the following:
In version 0.5, the old form of Rice has been removed from the game. This means that, if your world still has the old form planted somewhere, these blocks will be erased permanently on world load! So make sure your Rice has been replanted before updating an old save, or else you’ll lose your Rice crops!
Blocks would normally be erased as told here but they just crash instead with a Ticking Block Entity. The intended behavior would be that the crops disappear, not crash. If that’s not possible after all, read below, Questions section.
Logs Same error for 3 logs, 3 people https://paste.feed-the-beast.com/view/695ec96c https://paste.feed-the-beast.com/view/b21b0667 https://hastebin.com/yebelimuye.rust
Screenshots Ticking Block Entity, game crashes, no screenshots.
Mod list:
FTB OceanBlock 1.3.0 works fine. vectorwing.farmersdelight.blocks.TomatoesBlock
and FarmersDelight-1.16.5-0.4.6.jar
.
FTB OceanBlock 1.4.0 breaks if it contained blocks from 1.3.0. Class def changed to vectorwing.farmersdelight.blocks.crops.TomatoesBlock
and FarmersDelight-1.16.5-0.5.0.jar
.
Questions Do you have a solution for our players, since creating a new world with your new version works as intended. The problem is due to how the class is stored, got moved with the update, and won’t load correctly since it no longer exists at that location. I understand this reorganisation is useful to your mod, but if you have any tips as to prevent/repair this error during transition, please let me know. Forge’s ability to delete Ticking block entities worked for one of our users and your mod’s classes will start fresh on that instance. They do lose every Hydroponic Bed that contains the crop though.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Yes we did roll back asap. Thank you for the quick reply and fix, according to your comments we will test and port 0.4.6 to 0.5.1 directly once it comes out. We’re happy to have your mod in our modpack!
As a side note: I assume you rolled back to 0.4.6, but if you didn’t, this change might cause this error again. I highly advise making and using backups from before it happened.