cadaverous-eris / Rustic

A medieval themed Minecraft mod based around decoration, exploration, and agriculture
68 stars 35 forks source link

Block Berry bush automation #291

Open tyler489 opened 4 years ago

tyler489 commented 4 years ago

Enderio adds a farming station which has intergration with any crop with IGrowable and IPlantable. It does not however work with the farmer because your canGrow check at https://github.com/the-realest-stu/Rustic/blob/master/src/main/java/rustic/common/blocks/crops/BlockBerryBush.java#L262 never returns false when its ready to harvest.

After speaking with the enderio devs they suggested

my recommendation would be to change their canGrow() to !hasBerries() and their grow() to also check hasBerries() to see if it should grow outward
PS: their grow() already does so
262: return !state.getValue(BERRIES);
that would be all they'd need to change

if this could be changed that would be great.

HenryLoenwind commented 4 years ago

PS: IGrowable has not canBeHarvested(), so automation traditionally uses canGrow() to mean canGrowMoreProduce() or isStillInTheGrowingPhaseAndHasntReachedHarvestingPhaseYet()...