cweckerl / simplefarming

https://www.curseforge.com/minecraft/mc-mods/simple-farming
38 stars 37 forks source link

Extra check for double-height crops #89

Closed porl closed 4 years ago

porl commented 4 years ago

Extra check to avoid glitches with other mods doing their own version of auto-harvest on double-height crops.

Some other mods that do an auto-harvest/replant don't expect a crop to be double height. If you use these and harvest the top part of the double-height crops (corn etc.) they remove just the top part and "replant" at an offset of one block too high. This then tries to grow two high from there which causes triple height plants which then immediately break off throwing corn on the ground everywhere.

This patch looks redundant, but it just does an extra check when trying to perform the stage 7 growth - Am I actually on the ground? If so grow above as usual. If not just change my own stage 6 to stage 7.

There are other ways to solve this problem but I found this the simplest without any overhead checking for block changes all the time etc.