Make crops growable by bees modifiable
SokyranTheDragon opened this issue ยท 3 comments
I'm assuming CraftTweaker integration, but being able to modify it from other mods would be a neat additions too.
That might require changing the code a little bit, trying to make it as most compatible as possible. One way I've resolved it myself is using this code (will require changing to Kotlin):
Optional<IProperty<?>> ageProperty = block.getDefaultState().getPropertyKeys().stream().filter(property -> property.getName().equals("age")).findAny();
ageProperty.ifPresent(property -> this.ageProperty = property);
which would find you the property named age
. One note about that though, I've noticed that ExtraUtilities mod is using property named growth
instead.
I'll see if it makes sense to add more compatibility. I don't think Extra Utilities would be an issue because most of their plants don't seem growable by bees.