Unique Crops

Unique Crops

7M Downloads

[v0.2.1]Fossura seeds causing crash

teagan75 opened this issue · 3 comments

commented

Are these seeds chunkloaded? I have one in the nether and it is crashing my game while I am in the overworld. I do not have the crop chunkloaded.

https://pastebin.com/ZjuavE7x

commented

the crashlog says it's feroxia seeds causing the crash, not the mining crop? (fossura)

anyways, taken a look and it didn't really have a null check for players that don't exist when the crop checks(??)

commented

Strange because I am not growing feroxia seeds. Is it because I am trying to grow something other than feroxia in the nether?

Oh I think I understand, if I am not there it doesn’t have a check. So it is chunk loaded but maybe by the portal itself. I tried planting them a good distance away from the portal but it still crashed. Perhaps I wasn’t far enough. Or it still tries to grow even if the area is unloaded?

commented

Yes, it is something I had to add a null check for. The HarvestDropsEvent in the stacktrace triggers when a block is about to be harvested. Since the "harvester" involved in this event can be null (probably from explosions or water displacement), it then tries to generate randomized growth steps for the feroxia crop, which is part of the stacktrace, and finding no players involved (null) because of a improper null check, it crashes.

Other than that though I am not quite sure there is a cause and effect here, but the crashes here has helpfully pointed out part of a problem