Home›Java›Mods›Nyr Anvil Fix
Nyr Anvil Fix
ModsJava

Nyr Anvil Fix

by nyrquellts · on Modrinth

Permanently removes the "Too Expensive!" lock by capping anvil repair costs at 39 levels. Paper & Folia native.

⬇ Download on Modrinth
Nyr Anvil Fix — screenshot 1Nyr Anvil Fix — screenshot 2Nyr Anvil Fix — screenshot 3

🔨 NYR Anvil Fix — No More "Too Expensive!"

Vanilla Minecraft refuses every anvil job that costs 40 levels or more, displaying the hated "Too Expensive!" message. Because every anvil use permanently raises an item's prior-work penalty (1, 3, 7, 15, 31, 63...), your best gear eventually becomes impossible to repair or enchant.

NYR Anvil Fix rescues those items, allowing every job through and capping the price at 39 levels—the highest level cost an anvil can display.


⚡ Built to "The Three Zeroes"


🛠️ How It Works (Technical Architecture)

Most naive anvil plugins attempt to listen only for PrepareAnvilEvent and lower the cost. That does not work in vanilla Minecraft. The game engine discards the result of any job costing 40+ levels before asking plugins about it, resulting in an empty output slot.

NYR Anvil Fix solves this architecturally:

  1. Lifts the Menu Ceiling: When a survival player opens an anvil (InventoryOpenEvent), it raises the menu's internal threshold from 40 to Integer.MAX_VALUE so the engine never discards the result.
  2. Clamps the Output Cost: When the result is priced (PrepareAnvilEvent on HIGH), any price above 39 levels is safely clamped to 39 before reaching the client.
  3. Cross-Version Method Handles: Uses pre-resolved method handles to dynamically bridge AnvilView (1.21+) and AnvilInventory (1.20.6), ensuring zero deprecated runtime failures.

🛡️ Battle-Tested Verification (187 Checks • 0 Failures)

Every build is verified across automated headless server environments driven by bot players:


📦 Installation

  1. Download NYR-AnvilFix-1.0.0.jar.
  2. Drop it into your server's /plugins directory.
  3. Restart your server. That is the entire setup.

(Note: If you already own NYR Anvil Cap, you do not need this. This plugin automatically detects Anvil Cap and stands aside cleanly).


👑 Looking for VIP Perks & Exploit Protection?

Need per-rank anvil cost caps (e.g. VIPs repair for 20 levels), prior-work penalty resets, 2PC transactional escrow, or anti-dupe security?

Check out our complete enterprise systems suite on our official desk:
👉 Nyr's Workshop Discord: https://discord.gg/9ezz8XnJF

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more