Race API-1.21.1-0.2.0.jar
Curse Maven Snippet
What's new
RaceAPI 0.2.0
- **API Platform Independence** (#3): The massive `switch` statement in `PowerFactory` based on ability types has been replaced with the `PowerTypes` registry—each type is registered with its own parser (`PowerParser`, a lambda interface). All 47 built-in types have been moved to `PowerTypes` without changing their behavior (including dynamic mapping for `attribute`, `status_effect`, and `conditional`). Third-party mods can now register their own ability types via `PowerTypes.register(...)`.
- **Condition Registry**: `Conditions` has been rewritten using the same pattern—17 built-in conditions are registered statically; `getTypeNames()` and `contains()` have been added, along with the ability to register custom conditions.
- **`/raceapi validate` command**: Checks all loaded races/abilities for parsing errors and duplicate active bind slots, and outputs a list of issues (or “everything is fine”). Locales: en/ru/uk.
- **`Power.getWrapped()`**: Replaces `NamedPower.unwrap()`—a method in the `Power` interface (recursively removes the `NamedPower` decorator); `unwrap()` is marked as deprecated. `RaceAPI` and `OriginsXClient` have been updated.
- **`Race.difficultyKey(int)`**: a static method of the interface for the difficulty level (extracted from `getDifficultyText()`).
- **Unit tests**: JUnit 5 has been integrated; `PowerFactoryTest`, `PowerTypesTest`, `ConditionsTest`, and `RaceDifficultyTest` have been added (24 tests). Datapack errors are now collected in `ParseErrors` instead of logs.
- Versions: RaceAPI 0.1.10 -> 0.2.0.
**Ukrainian Translation of Races and Abilities**: The complete `uk_ua.json` file has been added—all abilities (`power.raceapi.*`), 9 starting races (`race.raceapi.*`), difficulty levels (`race.difficulty.*`), active ability messages, and commands. The `name_key`/`description_key` entries for races and ability descriptions have now been translated into Ukrainian.
RaceAPI 0.2.0
- **Платформенность API** (#3): гигантский switch в `PowerFactory` по типам способностей заменён на реестр `PowerTypes` — каждый тип регистрируется своим парсером (`PowerParser`, лямбда-интерфейс). Все 47 встроенных типов перенесены в `PowerTypes` без изменения поведения (включая динамическое отображение для `attribute`, `status_effect`, `conditional`). Сторонние моды теперь могут регистрировать свои типы способностей через `PowerTypes.register(...)`.
- **Реестр условий**: `Conditions` переписан на тот же паттерн — 17 встроенных условий регистрируются статически, добавлены `getTypeNames()`, `contains()`, возможность регистрации кастомных условий.
- **Команда `/raceapi validate`**: проверяет все загруженные расы/способности на ошибки парсинга и дублирующиеся активные bind-слоты, выводит список проблем (или «всё в порядке»). Локаль: en/ru/uk.
- **`Power.getWrapped()`**: вместо `NamedPower.unwrap()` — метод в интерфейсе `Power` (рекурсивно снимает декоратор `NamedPower`); `unwrap()` помечен устаревшим. Обновлены `RaceAPI` и `OriginsXClient`.
- **`Race.difficultyKey(int)`**: статический метод интерфейса для уровня сложности (извлечён из `getDifficultyText()`).
- **Юнит-тесты**: подключён JUnit 5, добавлены `PowerFactoryTest`, `PowerTypesTest`, `ConditionsTest`, `RaceDifficultyTest` (24 теста). Ошибки датапаков теперь собираются в `ParseErrors` вместо логов.
- Версии: RaceAPI 0.1.10 -> 0.2.0.
**Украинский перевод рас и способностей**: добавлен полный файл `uk_ua.json` — все способности (`power.raceapi.*`), 9 стартовых рас (`race.raceapi.*`), уровни сложности (`race.difficulty.*`), сообщения активных способностей и команды. Ключи `name_key`/`description_key` рас и описания способностей теперь переведены на украинский.
This mod has no additional files

