Unofficial site, not affiliated with modrinth.com.What is this?
Плагины/VillageAI
VillageAI

VillageAI

Intelligent village defense system. Villages centered on bells automatically detect nearby villagers. Friendly players gain reputation by trading. Hostile players lose reputation by attacking villagers. When hostile players are nearby reputation drops belo

176
3
Все версииVillageAI 3.1.0

VillageAI 3.1.0

Release1 нед. назад

Список изменений

[3.1.0] - 2026-04-24 — Stability & Architecture Improvements

🐛 Bug Fixes

Critical

  • Dangerous save command removed/villageai save previously called onDisable() followed by onEnable(), which could corrupt game state. Now uses safe synchronous save without reloading the entire system.
  • Economy config ignoredeconomy_config.yml existed but was never loaded. Fixed: VillageEconomy.analyzeVillageNeeds() now reads village needs from village_needs.daily_needs and village_needs.daily_production sections in economy config.

High

  • Code duplication in trade logic — Trade execution was duplicated between TradeGui and EconomyCommand. Created new TradeService class that centralizes all trade validation and execution logic. Both GUI and command handlers now use the shared service.
  • Hardcoded raid wave definitions — RaidWave.forWave() contained hardcoded mob types and counts. Config now supports raid wave customization.

Medium

  • Missing validation in trade execution — Improved trade validation to check material availability more robustly before executing any trades.

🚀 Improvements

Architecture

  • TradeService: Centralized trade validation and execution (replaces scattered logic in TradeGui and EconomyCommand)
    • executeTrade() — Validates items, emeralds, and executes trade atomically
    • hasItems() — Unified item checking logic
    • getReputationMultiplier() — Centralized reputation tier calculation

Configuration

  • Economy config loading: Village needs now fully loaded from economy_config.yml
    • Daily needs section with material demands
    • Daily production section with supply generation
    • Emergency needs configuration for raids
    • All hardcoded Material definitions removed from code

Code Quality

  • Reduced God Class burden: Separated concerns with TradeService
  • Eliminated code duplication: Single source of truth for trade logic
  • Better separation of concerns: Services now handle specific domains

📊 Performance Notes

  • No performance regression from 3.0.0
  • Config loading happens once per economy update (not per trade)
  • Trade validation still O(n) but with reduced overhead from centralization

📝 Migration Notes

For existing servers:

  1. The new economy_config.yml is auto-generated on server start
  2. Existing village data is fully compatible
  3. No manual migration required

Файлы

VillageAI-3.1.0.jar(112.77 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

3.1.0

Загрузчики

Paper
Purpur

Версии игры

1.21–1.21.11

Загрузок

10

Дата публикации

1 нед. назад

Загрузил

ID версии

Главная