HomeJavaModsBlacksmith
Blacksmith
Blacksmith

The blacksmith plugin adds a blacksmith trait and a scrapper trait to Citizens NPCs. Blacksmith NPCs are able to repair a player's held item for a fee. Costs are highly customizable. Scrapper NPCs can break down items into their crafting recipe.

This was forked from the original and outdated project by aPunch, jrbudda and HurricanKai.

Important changes from the original fork:

Dependencies

Extensions



Basic usage

To create a new blacksmith, simply add the blacksmith trait to an NPC by selecting it with /npc select, and then using /trait add Blacksmith (See Citizens' documentation for more details).

To create a new scrapper, simply add the scrapper trait to an NPC by selecting it with /npc select, and then using /trait add Scrapper (See Citizens' documentation for more details).

Right-clicking the NPC will tell you if the currently held item is repairable by the blacksmith / salvageable by the scrapper. If it is, the blacksmith / scrapper should give a price quote. Right-clicking again starts the repair / salvage. The item should be given back or dropped after a random delay according to the set limits.

While costs are always set globally (no blacksmith or scrapper can do the same job for cheaper), the blacksmith / scrapper's messages, cool-down between each reforge / salvage, whether the item is dropped or given, the chance of failing or adding an enchantment, the maximum number of added enchantments, max and min delays, the length of the cool-down and which items the blacksmith is able to reforge / salvage can be changed individually.

Also note: As a change from the original plugin, unless a value for an NPC has been explicitly set for that NPC, it will mirror the values set in config.yml. This also means that configuration values aren't populated automatically in citizen's NPC save file. While you can manually set the values using the same keys as in config.yml, you should use the /blacksmith or /scrapper command when possible.

Non-standard functionality
There is some non-standard optional functionality for blacksmiths and scrappers that goes beyond repairing things with durability. They can all be enabled or disabled using configuration values.


Special behavior
In addition to just being able to repair items, blacksmiths / scrappers have some random features which can be cool or annoying:


Scrapper basics
A scrapper will produce salvage for a damage-able item by calculating the amount of items returned based on items in the recipe, and the percentage of durability left on the item. To avoid returning relatively worthless items instead of valuable items, trashSalvage can be configured. Trash salvage will only be returned if all non-trash items are returned as well. A scrapper will by default only salvage damage-able items (same as blacksmiths), but enabling extendedSalvageEnabled for a scrapper will allow it to salvage any crafting table recipe. Note that to salvage for example planks into wood, four wood will be taken.

When an item is salvaged, EXP will be returned based on enchantments on the item.

Note that sticks are valid items to be handled by Scrappers if extended salvage is enabled. The item is also the default item for selecting NPCs in Citizens. If you find the NPC selection message annoying, and don't normally use sticks for selection, you can change the item in Citizens' config and replace it with STRUCTURE_VOID or some other unobtainable item.

See the documentation tab for documentation about setup and configuration. Or check out the README!

License

Blacksmith is licensed under the GNU Public License Version 3.0. This includes every source and resource file.

Commands

Plugin details

Read from the plugin's own plugin.yml.

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.

Blacksmith is a free Minecraft Java mod. Compatible with Minecraft 1.21, 26.1. Downloaded 1,386 times (via Spigot). Download it and open it directly in the game.

Explore more