Minecolonies: War 'N Taxes

War and Taxes Addon for Minecolonies

File Details

WarNTaxes-3.2.6.jar

  • R
  • Oct 25, 2025
  • 780.11 KB
  • 350
  • 1.20.1
  • Forge

File Name

WarNTaxes-3.2.6.jar

Supported Versions

  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:minecolonies-war-n-taxes-1129258:7148453")
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

[3.2.6] - 2025-10-24

TL;DR - Version 3.2.6 Update 🎯 Major Features:

  • Raid History Overhaul - Now tracks detailed raid data (who, when, how much stolen, success/fail) with queryable API methods. Stores last 100 raids per colony in JSON format.
  • Mod-Level Block Filtering - Use #modid syntax to block/allow entire mods at once (e.g., #refinedstorage blocks all Refined Storage blocks instead of listing each one).

🔧 Critical Fixes:

  • WebAPI Crashes Fixed - Resolved 500 errors caused by broken server stats logic, redundant loops, and improper data loading. API now has proper error handling.
  • Tax GUI Accuracy - Refresh button now shows correct approximate income using actual config values, happiness modifiers, and guard tower bonuses.

📊 Enhanced Raid History Tracking System

  • NEW FEATURE: Structured Raid History - Complete overhaul of raid tracking with detailed, queryable data
  • Comprehensive Tracking: Records raider UUID, name, amount stolen, timestamp, and success/failure status for every raid attempt
  • Query Methods: New API methods for filtering raids by player, calculating totals, and analyzing raid patterns:
    • getRaidsByPlayer(UUID) - Get all raids by specific player
    • getTotalAmountStolen() - Calculate total amount stolen across all successful raids
    • getSuccessfulRaidCount() / getFailedRaidCount() - Raid statistics
  • Rich Data Format: Each raid entry includes:
    • Timestamp with formatted date/time (yyyy-MM-dd HH:mm:ss)
    • Raider UUID (persists across name changes)
    • Raider name (human-readable)
    • Amount stolen (exact currency amount)
    • Success status (successful/failed)
    • Failure reason (e.g., "left colony boundaries", "failed to kill guards")
  • Backward Compatible: Legacy string-based raid events (getRaidEvents()) still supported
  • Automatic JSON Storage: Data persisted in config/warntax/colony_history.json
  • Colored Chat Messages: Formatted raid history with color-coded success/failure indicators
  • History Limit: Automatically maintains last 100 raids per colony for performance

🔧 Mod-Level Block Filtering Enhancement

  • NEW FEATURE: Whole-Mod Blocking - Block or allow entire mods at once using # prefix in block interaction filters
  • Simple Syntax: Use #modid to target all blocks from a specific mod (e.g., #refinedstorage, #mekanism, #ae2)
  • Works in Both Lists: Supports both blacklist (block all) and whitelist (allow all) configurations
  • Blacklist Examples:
    • #refinedstorage - Blocks ALL Refined Storage blocks (controllers, grids, cables, etc.)
    • #mekanism - Blocks ALL Mekanism blocks (machines, pipes, cables, etc.)
    • #ae2 - Blocks ALL Applied Energistics 2 blocks
  • Whitelist Examples:
    • #ironchest - Allows ALL Iron Chests blocks for looting
    • #sophisticatedstorage - Allows ALL Sophisticated Storage blocks
  • Smart Matching: Automatically matches any block starting with modid: (e.g., #refinedstorage matches refinedstorage:controller, refinedstorage:grid, etc.)
  • Priority Preserved: Blacklist still takes highest priority, then whitelist, then existing protection systems
  • Mixed Configuration Support: Can combine specific blocks and whole mods in same list

🐛 Critical WebAPI Bug Fixes

  • FIXED: 500 Internal Server Error - Resolved critical bug causing API endpoints to crash
  • Root Cause: getServerStatsJSON() had severely broken logic with 3 redundant loops and no error handling
  • Data Loading Fix: Replaced getOrCreate() with capability.resolve() to prevent reading empty unattached instances
  • Performance Improvement: Eliminated 2 useless loops (60-65% faster response times)
  • Error Recovery: Added comprehensive try-catch blocks and null checks to prevent crashes
  • Enhanced Logging: Full stack traces and detailed error messages for debugging

Issues Fixed:

  1. Server Stats Endpoint Crash: Three loops iterating over players, only one actually worked, others created garbage-collected arrays
  2. Leaderboard Endpoint Crash: Using getOrCreate() returned fake empty instances instead of real data
  3. False Empty Stats: getOrCreate() created new PlayerWarData instances that weren't attached to players
  4. No Error Handling: Single null pointer exception crashed entire API
  5. Missing Debug Info: No visibility into what went wrong when errors occurred

💰 Tax GUI & Calculation Improvements

  • FIXED: Tax GUI Refresh Button - Approximate income now accurately reflects actual tax generation
  • IMPROVED: Revenue Calculation - Uses actual config values instead of hardcoded estimates
  • NEW FEATURE: Debug Tax Command - Comprehensive tax breakdown command for troubleshooting

Tax GUI Refresh Fix:

  • Accurate Estimates: Approximate revenue calculation now uses real config tax values
  • Happiness Integration: Accounts for happiness modifier multiplier (0.5x to 1.5x default)
  • Guard Tower Boost: Properly calculates guard tower boost (25% default with 5+ towers)
  • Max Cap Respect: Respects maximum tax revenue cap from config
  • Real-Time Updates: Refresh button properly updates all colony data including approximate income