Serene Seasons

Serene Seasons

53M Downloads

[Suggestion] CraftTweaker integration

nihiltres opened this issue · 5 comments

commented

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.

commented

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.

commented

How could CT be done externally?

commented

Has someone done this? I'm looking for this support and haven't found a mod that's done it yet.

commented

@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
commented

This really doesn't seem like something that should be included in our mod natively. If someone is interested in making a separate mod, they're more than welcome, but it's not something we have any interest in adding to the mod itself.