Easy Anvils

From the Fear Nightfall wiki · Easy Anvils
Easy Anvils

Easy Anvils is a mod that overhauls the anvil. It replaces every anvil in the game with a version that holds two input slots, makes renaming free by default, lowers the anvil break chance and changes how repair and prior-work costs are calculated. It adds no new items, mobs, structures or biomes. Vanilla anvils cannot be used in the world until they are broken and replaced with the mod's version.

Overview

Easy Anvils changes one block and its menu rather than adding content. It is a separate mod from Easy Magic. Its main effect is on the anvil: a player who wants to rename, repair or combine items gets a cheaper, more forgiving version of the vanilla anvil and an interface with storage for the items being worked on. The mod requires NeoForge, Minecraft 1.21.1 and the puzzleslib library.

For the horror theme of Fear Nightfall (see Horror and Spooky Content), the mod has no direct role. It does not add horror content, and its effects do not depend on the time of day or on the horror biomes.

Content

Easy Anvils adds no items, mobs, enchantments, effects, loot, trades, advancements or worldgen features. Its content is limited to the following:

  • Replacement anvils. For each anvil block registered in the game, the mod adds a replacement block. For vanilla this is the anvil, the chipped anvil and the damaged anvil. Anvils from other mods, such as the Better End and Better Nether anvils, get replacements too. A replacement keeps the name and tags of the original block, and it drops its contents when broken.
  • Anvil block entity. All replacement anvils share one block entity type that stores the two input slots.
  • Optional name tag recipe. A shaped crafting recipe for the vanilla name tag (string and paper) is available. It is off by default.
  • Optional name tag drops. Non-player mobs with a custom name can drop a name tag with that name when they die. This is off by default.

The mod changes the behaviour of existing vanilla items. The name tag is the only vanilla item that the mod acts on directly, through the sneak-use editor described under Mechanics below.

Mechanics

Anvil conversion and gating

At block registration, the mod pairs each anvil with its replacement. Vanilla anvil items are then changed so that they place the replacement block. Right-clicking an original anvil in the world is blocked by the default setting (disableVanillaAnvil), and the message "Unable to open. Break and replace to use." is shown. The player must break the original anvil and place the replacement item. Anvils from other mods are treated in the same way, unless their block is listed in the block tag easyanvils:unaltered_anvils, which lists the Better End and Better Nether anvils as optional entries.

Replacement anvil interface

Right-clicking a replacement anvil opens a menu with two input slots. The result slot is calculated from the inputs and is not stored. The rename box accepts up to 50 characters. Hoppers and pipes can insert items into the anvil through its side faces, but cannot take them out. The block sends a comparator signal based on its contents, and the contents drop when the block is broken.

Repairing with iron blocks

Right-clicking a damaged or chipped anvil with an iron block repairs one damage stage: a damaged anvil becomes chipped, and a chipped anvil becomes a normal anvil. A dispenser facing an anvil that is loaded with iron blocks does the same. This repair does not apply to anvils from other mods, which are not part of the vanilla damage chain. The default setting is anvilRepairing = true.

Anvil breakage

The mod lowers the chance that an anvil breaks when it is used. The default break chance is 5%, compared with 12% in vanilla. Renaming an item with no other item in the anvil has a break chance of 0% while riskFreeAnvilRenaming is on, which is the default.

Costs and renaming

  • Renaming is free by default (freeRenames = ALL_ITEMS). Removing a name is also free.
  • Prior work uses the LIMITED setting by default. Each further operation adds at most 4 levels (maximumPriorWorkPenaltyIncrease), where vanilla doubles the penalty each time.
  • Renames and repairs do not add prior-work penalties by default, and rename and repair costs are fixed (renameAndRepairCosts = FIXED).
  • Repair materials restore 25% of the item's maximum durability per material and cost 1 level per material. Repairing with another item of the same kind costs 2 levels and gives a 12% durability bonus.
  • Enchanted books have halved enchantment costs by default (halvedBookCosts = true), and combining books does not add a prior-work penalty.
  • The "Too Expensive!" limit is disabled by default (tooExpensiveLimit = -1). The 40-level cap of vanilla does not apply to the mod's anvil.

Name tag editing without an anvil

Sneaking and right-clicking with a name tag opens a name tag editor on the client, without an anvil. The name is applied to the held name tag, up to 50 characters after formatting codes are removed. The name tag tooltip explains the shortcut, and it can be turned off in the client config (nameTagTooltip). This behaviour is on by default (editNameTagsNoAnvil = true).

Formatting

With renamingSupportsFormatting on (the default), the rename field and the name tag editor accept formatting codes. The result is stored as a formatted custom name.

Changes to vanilla

The following behaviour changes are the ones a player will notice in ordinary play:

  • Vanilla anvils cannot be used in the world until they are replaced. Right-clicking one shows a message instead of opening the menu.
  • Right-clicking a replacement anvil opens the mod's menu. The anvil use statistic is still counted.
  • Renames are free, and the 40-level "Too Expensive!" cap is removed.
  • Anvils break less often, at 5% instead of 12%.
  • Iron blocks repair damaged and chipped anvils in the world, and dispensers do the same. The dispenser behaviour for iron blocks is replaced for the whole game, so the last mod to register it takes effect.
  • Anvils placed during world generation are replaced by the mod's version, so anvils in generated structures use the replacement block (see In Fear Nightfall below).
  • Name tags can be edited with sneak-use, without an anvil, and name tags are limited to 50 characters.

In Fear Nightfall

Fear Nightfall does not change Easy Anvils' configuration, so the mod runs with its defaults. The defaults that matter most for the pack are these:

  • disableVanillaAnvil = true: vanilla anvils must be broken and replaced before they can be used.
  • convertVanillaAnvilDuringWorldGen = true: vanilla anvils placed by world generation are generated as replacement blocks. Anvils that already exist in a world are not changed.
  • freeRenames = ALL_ITEMS, tooExpensiveLimit = -1 and penaltyFreeRenamesAndRepairs = true: the pack's anvil costs are the mod's defaults, which are cheaper than vanilla.

Server operators who want anvil costs closer to vanilla can change freeRenames and tooExpensiveLimit in the common and server configs.