Plants not machine harvest-able.
Yamza opened this issue ยท 6 comments
Plants-1.12.2-2.9.2
Tested on All The Mods 3 (5.9.8d)
Please make plants harvest-able by machines.
Tested with the following:
Cyclic Harvester: Fail
EnderIO Farming Station: Fail
AA Farmer: Fail
Mechanical User: Works
I assume you're referring to the right click harvest bushes, which are not crops in the tradtional sense. Since forge lacks an interface to determine what is a "crop" that mods can harvest, the cyclic harvester and the enderio farming station will have to add support from their side. I can, however, make it work with ActuallyAdditions, which I'll go do.
Forge absolutely does not have a /good consistent/ way to identify crop blocks. But it does have a decent way that Cyclic (and other harvesting) probably use
- Have a BlockState property called Age with a min and max value, so its fully grown at max. See BlockCrops class
public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 7);
So any other mod can just say "does this blockstate have age? is it fully grown? Ok i know what to do now"
It looks like you already are doing this so ill have to look into my side to see what else I can do
My code in case you are curious (basically lots of hardcoded blocks with special cases followed by standard age property handling)
https://github.com/PrinceOfAmber/Cyclic/blob/6c8a7a51e2204f8879a35a4e3158665f3e5772ba/src/main/java/com/lothrazar/cyclicmagic/core/util/UtilHarvester.java#L210
The crops in question here are not traditional crops, that class works fine with your harvester, the classes needing support are BlockEnumHarvestBush, BlockEnumNethetHarvest and BlockEnumDoubleHarvestBush
The three classes I just named do not have age, nor seeds. They strictly have a fruit bool (and in the case of the double bush, an upper bool)
The other ticket names "night shade" as an example. Is that one of the bushes?
Yeah that makes sense. Berry bushes (when full leaf block) should work with Auto - User type blocks since they dont really grow (i dont get the item in my Auto User but its a bug on my end i guess, luckily your code is solid so i can dig into it).
Nightshade is just like a leaf or flower i think, so you would need some auto user with shears or a block breaker i believe
Okra and pineapple already work as they are because of the age property, and since you use the 'getDrops' version that takes the blockstate in