All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Seasons API

Seasons API

by kochkaev • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

Seasons API

Seasons API was developed for creating your own seasons, weathers and challenges! This mod was developed by analogy with the Spigot plugin "Seasons" specifically for the private Minecraft server "Zixa City" by its administrator (kochkaev, aka kleverdi). The idea of this mod was taken from Harieo.

What is this?

  • Season - a certain period of a conditional year that has a certain weather for the current conditional time.
  • Weather - daytime conditions for the game that have their own Challenges.
  • Challenge - a set of some sort of rules for the player, appropriate to the current season and weather.

Command Syntax:

  • /seasons get season - get current season.
  • /seasons get weather - get the current weather.
  • /seasons get lang - get the currently set language.
  • /seasons get challenges - get the list of active Challenges.
  • /seasons set season <season> - set season.
  • /seasons set weather <weather> - set weather.
  • /seasons set lang <language> - set language.
  • /seasons set challenge [forceAllow|forceDisable] <challenge> - force start or end a challenge.
  • /seasons reload - reload configs.
  • /seasons actionbar [on|off] - set the display of season information in the action bar for the player executing this command.

For developers

You can create your own set of seasons, weathers and challenges in your mod. More information about implementing the Seasons API in your mod can be found in wiki.


Additional info

Links

How to Install Seasons API (Mod)

Seasons API by kochkaev is verified for Fabric across Minecraft versions 1.21, 1.21.1, 1.21.5 (latest release: 1.2-BETA-6, file size: 5.2 MB). Follow the steps below to install it safely from ModCraft.tv:

  1. Click the Download button above and select your Minecraft version (1.21, 1.21.1, 1.21.5) and platform (Fabric).
  2. Make sure you have the compatible loader or environment installed for Fabric.
  3. Move the downloaded Seasons API file into your Minecraft .minecraft/mods folder and launch the game.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
1.21.5
Fabric
last yr. 1
1.21.5
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
Add-on developers are now encouraged to **use Minecraft Text instead of String** for any displayed messages (_season name, weather name, chat message)_. Special getText and addTextValue methods have been added to ConfigFileObject and ConfigContentObject for this purpose.
All **config files now have a version** _(default 1)_. Now you can easily and safely update values in configs to the new format without the user noticing, for this you need to override the update method in your class that extends ConfigFileObject.
Updated to Minecraft version 1.21.5.

Fixed crushes when player returns to the title screen after death.

Players can now customize for themselves whether or not to show the current season and weather information in the action bar.
/seasons actionbar {on/off}

Fixed identifier error when damage player;
Added addSeason(SeasonObject) and removeSeason(SeasonObject) in WeatherObject;

[1.1] Seasons API 1.1 by kochkaev on Oct 25, 2024
Download
  • Fixed known issues**
  • Now you can skip the thunder by sleeping in a bed;

[1.0] Seasons API 1.0 by kochkaev on Oct 19, 2024
Download
Fixed some bugs.


It was tested on Zixa City. If your found a bug, please, report it >> [Issues](https://github.com/kochkaev/seasons-api/issues)
# Seasons now can cycle!
## Seasons changes
All seasons are now stored in a Tree structure consisting of a TreeBranch. Each branch can have many branches but only one parent, can store only one SeasonObject, but one season can be stored in several branches at once and have many parents. Seasons that have no parents (located at the root of the tree) are called highest (first) order seasons. The longer the “path” to a season - the lower its order.
<details><summary><a>Seasons tree example</a></summary>
<img src="https://github.com/user-attachments/assets/27941ae6-50d9-488a-b26f-66c6b382333a" alt="Tree">
</details>
A season can store a list of seasons after which it will occur with a specified chance (if there are other seasons that occur after the same season). If at the end of a season it turns out that no season comes after it, a random season is set (given its chance of being set; a chance of 0 means that the season cannot be set automatically).

## Configs changes
The config system was completely rewritten and optimized. Now all config files are described in ConfigFileObject and their contents are stored in ConfigContentObject. All values in configs are now automatically typed depending on the default value. Added methods to create a selection from some list. All values are now stored in ConfigValueObject (or ConfigSelectionObject if it is a list).
### Methods
  • addHeader - add header.
  • addValue - add parameter.
  • addDynamicSelectionButton - add a selection from a list (as a button in the interface) obtained from the supplier.
  • addStaticSelectionButton - add a selection from the list (as a button in the interface) passed in the method call.
  • addDynamicSelectionDropdown - add a selection from the list (as a dropdown list in the interface) received from the suppler.
  • addStaticSelectionDropdown - add a selection from the list (as a dropdown list in the interface) passed in the method call.
  • addDynamicSelectionSuggestion - add a selection from the list (as a prompt when entering text in the interface), received from the suppler.
  • addStaticSelectionSuggestion - add a selection from the list (in the form of prompts when entering text in the interface), passed when calling the method.
### Parameters
  • _key_ - key, used to get the value.
  • _value_ - default value, further typing of the changed value depends on the type of this value.
  • _header_ - header (mostly decoration), specify “” if you want to inherit it from the previous added value or header.
  • _description_ - description of the parameter.
  • _consumer_ - lambda expression executed when the value is changed, receiving the old and new value as input.
  • _list_ - list containing possible values for the parameter.
  • _supplier_ - lambda expression that returns the list.

## Challenges Ticker
The ChallengesTicker now ticks not every secondsPerTick seconds, but every ticksPerChallengeTick Minecraft ticks (1 second = 20 Minecraft ticks)


  • Full Changelog**: htt
...
Fixed config update using Cloth Config.
Optimized TXTConfigObject and ClothConfigClient
Fixed server crashes.
Added new config features.
### Added client-side supporting!
Added Cloth Config and Mod Menu client integration.
current.json moved to world directory as seasons-current.json
Added auto creating GUI for all config files (except langs).

### Added new features to config generation:
  • addHeader(String header) - add header to file _("# * Header")_ and Cloth Config entries.
  • addTypedValue(String key, Object value) - add auto parsing value _(required to correct entry creating in Cloth Config; in following format: 'key: "value" # | type: "Type"')_
  • addTypedValueAndCommentDefault(String key, Object value) - add auto parsing value and comment with default value _(in Cloth Config works similarly to addTypedValue(String key, Object value); in following format: 'key: "value" # | type: "Type" | default: "value"')_

Fixes execution of new logic in tasks
Adds getTaskKey(ServerPlayerEntity player, String taskName) in ChallengeObject to quick get unique key for task.
Seasons API Icon
Download Seasons API
Select game version
Select platform