easy_trades-1.21.1-2.0.0
Curse Maven Snippet
What's new
Changes since 1.0.0
Version 2.0.0 is a major reliability and feature update for Easy Trades. It fixes the dedicated-server crash reported in 1.0.0 and expands the mod into a server-authoritative, configurable trade rerolling system.
### Critical fixes
- Fixed the dedicated-server startup crash caused by loading the client-only `Screen` class on the server.
- Separated client-only UI and input code from common and server code.
- Added safe client/server networking instead of performing trade changes directly from the client.
- Added server-side validation for the active merchant menu, villager, player, and trading session.
- Added request rate limiting to prevent duplicate or spammed refresh requests.
- Made trade replacement transactional: the original offers and payment inventory are restored if applying the refresh fails.
- Reapplied vanilla special prices and Hero of the Village discounts after generating new offers.
### Automatic rerolling
- Added automatic rerolling that stops when a selected target trade is found.
- Automatic rerolls are sent one request at a time and wait for the server result before continuing.
- Added client-side attempt and total-cost safety limits.
- Added server-side permission and maximum-attempt controls.
- Added optional per-attempt automatic cost increases and a maximum cost cap.
- Added clear feedback for success, cancellation, exhausted limits, insufficient payment, and target detection.
### Trade targets and profiles
- Added a searchable target selection screen.
- Targets can be searched by display name, registry ID, mod namespace, item tag, or enchantment ID.
- Added four matching modes:
- same item;
- exact item components;
- enchantment at or above the selected level;
- exact enchantment level.
- Added multiple named target profiles with profile creation, selection, and deletion.
- Target profiles are saved atomically to `config/easy_trades/target_profiles.nbt` to reduce the risk of corrupted data.
- Existing 1.0.0 target data is migrated automatically.
### Villager trade handling
- Refreshing now regenerates every currently unlocked villager trade tier when leveled-villager support is enabled.
- Added support for both vanilla trades and the experimental trade-rebalance tables.
- Added a server option to allow or reject villagers that have already gained levels or XP.
- Added an optional persistent per-villager daily refresh limit.
- Preserved the villager's level, XP, progress display, and restock state when synchronizing new offers.
### Server economy and configuration
- Split client preferences and authoritative server rules into separate configuration files.
- Added free or paid refreshes.
- Added configurable payment items and item tags, with emeralds as the default.
- Added an optional creative-mode payment bypass.
- Added configurable manual and automatic refresh limits.
- Added server-controlled cooldown and speed multiplier settings.
- Reduced the default effective delay to one server tick, approximately 50 ms, for both manual and automatic rerolling.
- Added a one-time migration from the previous default speed multiplier of `3` to `9`; custom multiplier values are preserved.
### Interface and accessibility
- Added configurable button position and X/Y offsets.
- Added a dedicated settings screen.
- Added an optional sound when a selected target is found.
- Improved button tooltips, status messages, and screen narration.
- Added complete English and Japanese localization for the new features.
### Quality and maintenance
- Added unit tests for refresh policies, rate limiting, economy rules, automatic sessions, daily quotas, protocol values, timing migration, and localization parity.
- Added NeoForge GameTests for real villager trade generation, leveled trades, discounts, target matching, payment tags, daily quotas, and server timing.
- Added automated GitHub Actions builds using Java 21.
- Verified startup on a NeoForge 21.1.218 dedicated server without loading client-only classes.
### Requirements and upgrade notes
- Minecraft 1.21.1
- NeoForge 21.1.218 or newer in the 1.21.1 series
- Java 21
- Install Easy Trades on both the client and server for multiplayer use.
- Existing target data and the old default timing value are migrated automatically on first launch.
This mod has no additional files

