Simple Farming

Simple Farming

12M Downloads

Implementation question

MongoTheElder opened this issue ยท 1 comments

commented

I was wondering what is driving the choice to return the crop item in the SimpleCropBlock::getItem() instead of the seed item the way vanilla does? Was this necessary for compatibility with other mods?

I'm working on a harvester mod and this makes it hard to locate the seed drop (if any) that is associated with the original crop. I use this information to deduct one seed from the drops to simulate replanting and I don't want to deduct the wrong seed if the crop happens to drop multiple seed types.

I have looked at a number of other mods that provide additional crops and they follow the vanilla pattern of returning the seed item in the getItem() method of their CropBlock derivative.

I only ask because I'm trying to maximize compatibility with all crops without necessitating having to maintain a list of crops and their seeds.

Thanks,
Mongo

commented

Sorry for not responding sooner!

I believe the getItem method is used for mods like WAILA/HWYLA where an item needs to be displayed to the screen. I have been out of the loop for a while, so this is my best guess as to why it is still used.