I'm writing a mod to create configurable white/blacklists for crops to only grow in specific biomes. I've got it working great for vanilla crops so I know the event is firing for those. However in trying to support Pam's Harvestcraft, I've found that her crops don't trigger either CropGrowEvent, nor pre or post.
My questions are:
1. Is my analysis below of why my mod doesn't work on this other mod's items correct? 2. If so, How can I override the offending function in their mod using my mod to fire the CropGrowEvent.Pre event correctly without creating a permanent dependency? I don't know how to do this in only my mod to create compatibility.
First my Pre event handler which uses another class to determine whether to allow crop growth based on my config files.
Again, this works great for vanilla crops as well as saplings.
Pam's Harvestcraft crops are in a custom class that extends CropBlocks. Link to the full class definition. (note: this is her 1.11 code. I'm testing against a 1.10.2 jar, but haven't been able to find source for it, but there doesn't seem to have been a rewrite in between. the 1.10.2 code doesn't seem to be available anywhere including in Git branches/tags in the same repository.)
Partial BlockPamCrop class definition that seems relevant:
So the best I can figure is that Pam's overriding of updateTick() is the problem as it randomly grows the crop, but doesn't post any events to the forge EVENT_BUS.