[Suggestion] CraftTweaker integration
nihiltres opened this issue · 5 comments
It'd be really nice to be able to get season data through CraftTweaker, and possibly set some values, too.
Most significantly, I'd suggest a ZenExpansion of IWorld that let one retrieve the season, plus utilities for useful things like e.g. retrieving whether a crop can currently grow through an IItemStack containing its "seed form" item.
CraftTweaker integration could be done externally, but it's nice to have a canonical, built-in solution.
CraftTweaker support is done by adding at least one class annotated as a ZenClass with ZenMethod methods. Then that method is exposed to ZenScript under the class path provided in the ZenClass annotation.
A third-party mod can add support by adding such methods and calling methods otherwise internal to this mod in the methods exposed to CraftTweaker. For example, my mod ManaTweaks provides some specialized CraftTweaker support, and a number of its methods are mostly wrappers on methods from Botania's ManaItemHandler.java to expose those to CraftTweaker scripts.
Has someone done this? I'm looking for this support and haven't found a mod that's done it yet.
@znaxcy I'm tempted to do it externally myself, but I'm working on a different CT add-on at the moment. My initial checklist for a Serene Seasons CT add-on would be:
- One or more "getters" for season
- One or more "setters" for season
- Some sort of support for testing if a block/item is a crop/seed that can('t) be grown in the current season—to be determined after looking at Serene Seasons code to decide on approach