▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/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

137
3
Все версииVillageAI 3.0.0

VillageAI 3.0.0

Release5 дн. назад

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

[3.0.0] - 2026-04-12 — Major Update: Full Fix + New Features

🐛 Bug Fixes

Critical

  • Real item exchange in tradesexecuteTrade() previously only logged the trade without moving any items. Both the GUI and text command now properly remove emeralds from the player and give items (or vice versa).
  • Quests never completed — After accepting a quest there was no mechanism to check for completion. A check is now triggered automatically when the player interacts with a villager. Added QuestStatus.IN_PROGRESS to prevent two players accepting the same quest.
  • VillageValidator was dead codevalidateVillageData() searched for a "villages" section that was never written. It now correctly iterates root-level keys (village-0, village-1, …).
  • No periodic savesaveVillages() was defined but never called. An autosave timer is now scheduled in onEnable() (default every 5 minutes), preventing data loss on server crash.

High

  • NPE in applyMoraleBuffscenter.getWorld() can return null when a world is unloaded. A null-check is now applied consistently (matching the pattern already used in hasHostilePlayerNearby).
  • Memory leak in interactCooldowns — The HashMap accumulated entries indefinitely. A PlayerQuitEvent listener now removes entries when players disconnect.
  • Two unsynchronized reputation systems — Defense and economy reputation were completely separate. Completing a quest now increments both, keeping them reasonably in sync.
  • Multiple players could accept the same quest — No status guard existed. Quests now move to IN_PROGRESS on accept; only the assigned player can complete or fail them.
  • QuestGenerator used world UUID instead of village UUID — Every village in the same world shared the same quest villageId. Fixed: UUID is now derived from the village's coordinate-based ID string via UUID.nameUUIDFromBytes.

Medium

  • Morale buffs never applied with default config — Default speed_amp: 0 combined with a > 0 guard made the feature permanently inactive. Default changed to speed_amp: 1 and the guard removed.
  • TradeHistory.toString() printed quantity instead of datetime — The format argument was Integer.valueOf(quantity) instead of getDateTime().
  • Morale buff radius hardcoded to 32 blocks — Now reads village.check_radius from config for consistency.
  • Economy state lost on restartVillageSnapshot now persists the UpgradeManager state in addition to members, golems and reputation.

🚀 New Features

⚔️ Wave-Based Raid System (RaidManager)

  • Raids consist of up to 5 escalating waves: Pillager → Vindicator → Evoker → Ravager + Witch
  • Mobs spawn in a ring around the village bell at random angles
  • Waves advance automatically when all spawned mobs are dead
  • Players nearby receive emerald rewards and +20 reputation on full clear
  • Server announces raid start, each wave, and victory/defeat to nearby players
  • Admin commands: /villageraid start | stop | status

🏰 Village Upgrade System (UpgradeManager)

  • Four infrastructure upgrades: Wall, Watchtower, Granary, Forge
  • Players contribute materials directly from their inventory via /vtrade upgrade <name>
  • Contribution progress is tracked per-player and shared across all contributors
  • Upgrade state persists across server restarts via VillageSnapshot
  • Watchtower increases detection radius; Forge reduces all trade prices by 10%; Granary generates extra quests; Wall reduces golem damage taken

🛒 Inventory Trade GUI (TradeGui)

  • 54-slot chest GUI opened via /vtrade gui
  • Each active trade offer is displayed as a clickable item with price and reputation discount info
  • Clicking an offer executes the full trade (item check → remove payment → give items) immediately
  • Upgrade status and player reputation displayed as reference icons
  • GUI refreshes after each trade

🌙 Night Cycle Mode

  • At night (world time 12300–23850) the village transitions to NIGHT state and closes all doors automatically
  • Returns to SAFE at dawn without spawning golems

📡 PlaceholderAPI Integration

  • Registers a villageai expansion when PlaceholderAPI is detected at startup (soft-depend, no hard requirement)
  • Provides four placeholders: %villageai_rep%, %villageai_state%, %villageai_nearest%, %villageai_upgrades%

🔧 Improved Commands

  • /villageai info — detailed stats for the nearest village (state, members, golems, upgrades, reputation)
  • /villageai list — lists all loaded villages with state and member count
  • /villageai save — forces an immediate synchronous save
  • /vtrade upgrade [name] — shows progress toward each upgrade or contributes materials
  • /vtrade accept now uses and displays full UUIDs (no more truncation bug)
  • VillageState extended with NIGHT and RAID states

Файлы

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

Метаданные

Канал релиза

Release

Номер версии

3.0.0

Загрузчики

Bukkit
Paper
Purpur
Spigot

Версии игры

1.21–1.21.11

Загрузок

8

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

5 дн. назад

Загрузил

ID версии

Главная