Alloy Forgery

Alloy Forgery is a Fabric mod about a multi-block alloy smelter useful for ore smelting.

Basic Explanation by this wiki's author :)
The mod involves a multi-block made from a Forge Controller, a bunch of stone type blocks or Bricks and once built the player can put ores in to triple their ingot output (Using Ore or Raw Ore).

It is best to keep in mind the Required Level and Fuel Per Tick when smelting (this can be seen with Roughly Enough Items installed showing the recipes of once the multi-block is built).

On the Smithy's Menu there will be some slots to place Ores or Raw Ores in the center, the output slot on the right and a slot for fuel with a thermometer above it to the left.



Curseforge/Modrinth Description
Alloy Forgery adds a multiblock alloy smelter, the Alloy Forge. In it's base configuration it serves as an easy way to increase ore yield, but everything is data-driven allowing you to add new forges and recipes as you please. These data-driven features are mostly intended for mod authors, especially because new forge types can only be added through other mod-datapacks.

By default there are three forge tiers, each with different fuel capacity and speed. They're all made from different stone-like materials, you can look them up on the wiki.

All controllers are crafted according to this pattern, with the outer ring of blocks corresponding to that controller's material. To construct a forge, simply follow the convenient guide above this piece of text using any combination of blocks that forge type supports.

​Development Discord:

Join this is if you have any issues or need help adding new content, simply ping glisco in #alloy-forgery

Discord Link







Information about building the Forge, Adding Recipes and Fuels, using Datapacks provided from GitHub Wiki by Mod Developer,
Alloy Forgery is a mod all about forging metals. This wiki is under construction, but when finished it will contain:

A basic explanation on the mod ❌

A tutorial on how to build a Forge in-game ✔

How to use the Forge feat. Hoppers ✔

Should add a thing explaining how the Forge outputs a redstone signal w/ comparator.

Data tutorial - Defining a new Forge ✔

Data tutorial - Adding recipes and fuels ✔

[Legacy up to 1.3.2] Defining Forges, Materials and Recipes
This tutorial explains how to define an Alloy Forge using the old config system. A tutorial on how to do this through data for 2.0.0+ is available on this wiki. Please check it out from the [home page.] (https://github.com/LordDeatHunter/Alloy-Forgery/wiki)

For this tutorial we assume you know how to define objects using JSON, which is what vanilla Minecraft uses for recipes. Using a JSON checker such as JSONLint is very helpful in checking where you have made any errors. IMPORTANT! You must set the "replace_configs_with_default" option in the main config.json file to FALSE, or the configs will be deleted upon loading Fabric. Material System

Alloy Forgery provides a material system. You can define a material in the material_worth.json file. These let you use regular strings for defining recipes. You can put define both items and tags under a material.

An example of an object:

"starrite": { "#mythicmetals:starrite_nuggets": { "worth": 1, "can_return": true },   "#mythicmetals:starrite_dusts": { "worth": 9, "can_return": false },   "#mythicmetals:starrite_ores": { "worth": 9, "can_return": false },   "#mythicmetals:starrite_blocks": { "worth": 81, "can_return": true },   "#mythicmetals:starrite_ingots": { "worth": 9, "can_return": true }

Recipes
Recipes are shaped using either materials or items, and even support tag outputs. To add a recipe simply add it as a new object under the recipes.jsonfile. The following fields are available:

"input" - Input item for the recipe. If using a material as input the value has to be specified in nuggets. If you are using an item, the value represents the amount of items needed.

"output" - The output items, needs an "amount".

"heat_per_tick" - How much heat is consumed per tick when the recipe is processed. For a reference a lava bucket is worth 20 000 heat.

"required_tier" - The tier the Alloy Forge needs to be in order to smelt the recipe. Supports floats.

Some examples of recipes is provided below:

"recipes": [ {     "input": { "copper": 18, "zinc": 9 },     "output": { "item": "#c:brass_ingots", "amount": 2 },     "heat_per_tick": 10, "required_tier": 1.0 },   {      "input": { "mythicmetals:orichalcum_ore": 2 },     "output": { "item": "#c:orichalcum_ingots", "amount": 3 },     "heat_per_tick": 16, "required_tier": 2.0 }

Fuels
As most other configs, the fuels are defined similarily to materials, but they have a few options which allow for returnable items:

{ "minecraft:lava_bucket": { "burn_time": 10000, "returnable_item": "minecraft:bucket", "rightclickable": true }, "minecraft:coal": { "burn_time": 800 }, "minecraft:charcoal": { "burn_time": 800 }, "minecraft:blaze_rod": { "burn_time": 1200 } }

Defining Forges
Adding a new Alloy Forge requires a few steps. This is a bit cursed, but you are able to provide the textures either through data or in the config folder. Placing the textures in config/alloy_forgery/textures will automatically add them to the Forges. You need a texture for the front, side, and top of the forge. See the files in the Resources folder for examples on how they look.

After all of this you can now define a forge. This is done in the smeltries.json file, and here you can create a new controller object by using the first line of the JSON object as the controller definition. This name is what is used for the texture. The following fields must be applied:

"materials" - Defines the materials you can use for constructing the multiblock itself.

"recipe_materials" - Defines the materials that you can use in the crafting recipe for the Forge Controller.

"tier" - Defines the tier of Forge, which is used for the recipes in the mod.

"max_heat" - Defines how much heat a Forge can store.

"material_translation_key" - This key is used for referencing the material the forge is made out of. It will grab the provided language key from the default language file, and will use it for naming the forge. See the examples below:

"stone_brick_forge_controller": { "materials": [ "minecraft:stone_bricks", "minecraft:cracked_stone_bricks", "minecraft:mossy_stone_bricks", "minecraft:chiseled_stone_bricks" ],   "recipe_materials": [ "minecraft:stone_bricks", "minecraft:cracked_stone_bricks", "minecraft:mossy_stone_bricks", "minecraft:chiseled_stone_bricks" ],   "tier": 1, "max_heat": 150000, "material_translation_key": "block.minecraft.stone_bricks", "_COMMENT": "This becomes Stone Brick Forge Controller, the default format is something like this: [KEY] Forge Controller" }

Creating a recipe
When creating an Alloy Forge recipe you want to use the alloy_forgery:forging type.

The recipe can be placed anywhere under data/namespace/recipes in your data.

Here is an example of a recipe:

{ "type": "alloy_forgery:forging", "inputs": [ {     "tag": "minecraft:copper_ores" } ],  "output": { "id": "minecraft:copper_ingot", "count": 3 }, "overrides": { "2": {     "id": "minecraft:copper_ingot", "count": 4 },   "3+": {      "id": "minecraft:copper_ingot", "count": 5 } },  "min_forge_tier": 1, "fuel_per_tick": 5 }

Here is what each of the objects do:

inputs - Array of the ingredients, shapeless (order does not matter)

Accepts item ID or tag.

Can hold up to 10 items.

output - Output item

id - The ID of the item.

count - The amount of the item.

overrides - Overrides allow changing the output item depending on the tier of the Forge. Accepted formatting:

"2" - The override applies only to tier 2.

"3+" - The override applies to tier 3, and anything above it.

"2 to 5" - The override only applies to the specified range of tiers, in this case from tier 2 to tier 5.

min_forge_tier - The minimum Forge tier required to use this recipe.

fuel_per_tick - The fuel consumed by the Forge per tick. One bucket of lava is 24000 fuel.

Adding new fuels
Alloy Forgery loads fuel from a specific folder in data.

The path is data/namespace/alloy_forge_fuels, and in here you put your fuel definition.

A fuel file does not require a specific name, and can hold multiple different fuels.

Currently we only support items for fuels, tags are not accepted.

An example is provided below:

{ "fuels": [ {     "item": "minecraft:lava_bucket", "return_item": "minecraft:bucket", "fuel": 24000 },   {      "item": "minecraft:coal", "fuel": 1000 },   {      "item": "minecraft:charcoal", "fuel": 1000 },   {      "item": "minecraft:blaze_rod", "fuel": 2000 },   {      "item": "minecraft:coal_block", "fuel": 9000 } ] }

The special field return_item is optional, and is intended for when you want to do something similar to returning an empty bucket after using a lava bucket with the forge.

Building a Forge
You can currently make an Alloy Forge out of 5 materials: Bricks, Stone Bricks, Blackstone, Deepslate, and End Stone. Alloy Forges are dynamically generated. You can add more of these through data, which is explained on this page.

The basic shape of a forge looks like this:



It has a 3x3 bottom, and is shaped like a chimney. You can put more blocks around it, even covering the top. The glass is there to show the basic shape, it is not part of any default forges. Forge Controller

The Forge controller is crafted from the respective material of the forge tier with a blast furnace in the middle:



Tiers and Materials
Tiers are important for making recipes harder to make, or to make them more efficient. Currently as of 1.3.0 of Alloy Forgery there are 5 different materials for forges:

Bricks and Stone Bricks, which are used for Tier 1 Alloy Forge.

Deepslate and Blackstone, which are used for Tier 2 Alloy Forge.

Endstone, which is used for a Tier 3 Alloy Forge.

Fuels
A forge can by default be fueled by vanilla materials. Currently they accept the following list:

Coal and Blocks of Coal

Charcoal

Blaze Rods

Lava Bucket

For more information on how to add recipes and fuels, go to this page. Automation

As of Alloy Forgery 2.0.0 automation has been improved. You can now finally use hoppers to automate alloy forging.



NOTE - You can also use a Hopper Minecart instead of a regular hopper. Modded transfer methods might not be supported.

As of Alloy Forgery 2.0.8 hoppers will automatically stop inserting items when it is forging. In larger contraptions, or older versions of the mod, you might want to use redstone in order to automate them more effectively.



For this you can use a comparator on the Forge Controller. It even supports putting the comparator inside the Forge.

Datapack Tutorial
Knowing how to create a datapack is essential when creating new Alloy Forge recipes. If you already know how to create a basic datapack you can start making recipes.

Creating a Datapack
Creating a basic datapack is fairly simple. To start out you need a folder or a zip file that contains the datapack. The main components for a datapack:

A pack.mcmeta file, which tells Minecraft what versions your datapack supports.

A data folder, which contains all the data of your pack.

These are required for any data pack. If you look at any example you will find these folders. This tutorial will teach you how to format these.

At any point where JSON is used, using a JSON checker like JSONLint is useful for catching bad formatting, especially comma errors.

The pack.mcmeta file

A .mcmeta file is just a JSON file with a custom extension. The file usually looks something like this:

{ "pack": { "pack_format": 7, "description": "Put your description here" } }

The pack_format file determines what versions of Minecraft your datapack supports. You can still load outdated packs, but the game warns you about loading them.

To create this file you can simply save/edit a text file with the .mcmeta extension.

Currently for 1.17+ the pack format is 7. For future versions of Minecraft this can change, and the best page to find the latest number is on the Minecraft Wiki.

If you are struggling with creating the file, you can simply copy a mcmeta from ANY datapack. It's not stealing. The data folder

The data folder frankly contains all your data files. When putting data inside you separate it using folders. The first folder you create is a namespace.

A namespace is a core/root folder, which prevents conflicts with data from other places. The standard structure for your pack would be data/namespace, and in this folder you put your data.

Having limitless possibility can cause some confusion between packs (for the better), which is why Minecraft only loads specific things from specific folders. An example is the fact that recipes will only be loaded under a recipes folder. A list of folders that work this way are:

advancements

dimensions

functions

loot_tables

predicates

recipes <--- This one is the most important for Alloy Forging

structures

tags

worldgen

When putting files inside these main folders but you can create subfolders to sort it as you please. Note that every file and folder inside the data folder MUST BE LOWERCASE.

Packing the datapack
Once you are done with creating your datapack it is likely you want to share it around. The simplest way to do this is to create a zip file out of it. For this tutorial I will be using 7zip, and I will create a zip file of the folder. To do this I open up 7zip, find the datapack I have created, and create a new zip file from it. An image showing the 7zip GUI, and using the 7zip -> add to Testpack.zip



NOTE! By zipping in this particular way you will have to extract the folder out of zip file in order to use the datapack. If you instead create a zip file which only contains the data itself (data folder and .mcmeta file), you can import/install it directly.

You can send this zip file to your friends, who can install it by extracting the folder into their datapacks folder for the world they want to install it in.

Example Datapack
Now to try to create a datapack!

To get started we will do the following:

Create a new single player world (with cheats enabled)

Exit back to the menu

Navigate to the world we created

Click "Edit World"

Finally, click "Open World Folder".

Then we will head into the datapacks folder, where we can create our datapack.

NOTE! that when we are done with this we can turn this folder into a zip file, and then install it on other worlds/servers.*

First we will create the pack folder, which can be named anything you please. For this example we will call it "TestPack". Inside we create a pack.mcmeta file, and an empty data folder. Since I am playing on 1.17.1 I set the pack_format to 7 and give it a description.

Now we open the world again, and as long as the datapack was properly formatted it will be loaded automatically. We can verify this by running the command /datapack list. If done correctly it should load!

Running "/datapack list" was successful, and shows the datapack in the chat.



Now we can add something to the pack which could be useful. Considering we are making an Alloy Forgery recipe later, we should probably add a tag which we can use in our recipes. I want to be able to smelt certain stone blocks into deepslate using an Alloy Forge.

NOTE! At this point you do not need to go back to the main menu when changing things, as you can run the /reload command to reload the datapack.

Creating a tag
We start by creating a new folder inside data, which determines the namespace for the pack. We will choose based_tutorial for this. Then we create a tags folder. Since Minecraft separates block and item tags we will create an items folder.

NOTE! Mixing blocks and items in an item tag is fine, but doing it in a block tag will fail.

Inside it we create a new tag file called "rocks_and_stones.json". Tags has to be JSON files (Most files in datapacks are .json files). The structure of the file looks like this:

{ "replace": false, "values": [ "minecraft:andesite", "minecraft:diorite", "minecraft:granite" ] }

The replace boolean here decides if the tag should be overwritten. By default this should be false. The reason being that other mods/datapacks may want to be able to add new values to this tag. The values field is an array, and contains all the blocks or items you want in the tag.

NOTE! If you create a tag with the same namespace and path of another tag (I.E: minecraft:gold_ores) you can add to it or overwrite it by setting replace to false or true.

We can now test to see if this tag exists in the game. We will use /reload to reload the datapack, and then we will use the /clear command, which supports removing tags from your inventory!

If done correctly we can now remove andesite, diorite, and granite, with the tag, from our inventory!

Running "/clear @s #based_tutorial:rocks_and_stones 10" removed exactly 10 granite, diorite, and andesite from the inventory. It was successful!



Creating a recipe
We will now use the tag we made to make a recipe!

To start out we need to create a new folder under our namespace called recipes.

NOTE! Under this main folder you can put the recipe anywhere you want, since Minecraft's recipe manager loads everything in this folder recursively.

Here is an example of what the recipe folder from Mythic Metals looks like inside:



An image showing multiple folders with different names, all containing recipes

NOTE! The identifier of a recipe will include folders in the name. For Mythic Metals a recipe for an Adamantite Sword has the identifier mythicmetals:swords/adamantite_sword. Note the slash.

For our pack we will simply create a new JSON file inside the recipe folder called deepslate_from_stones.json.

Inside it we write our new recipe. A regular smelting recipe looks something like this:

{ "type": "minecraft:smelting", "ingredient": { "tag": "based_tutorial:rocks_and_stones" }, "result": "minecraft:deepslate", "experience": 0.2, "cookingtime": 200 }

All of these objects shape a smelting recipe. Here is what each object means:

type decides what is using your recipe, like smelting or shapeless crafting. You can find a list of vanilla recipe types here.

ingredient is an object that contains either an item or a tag, which is used in the recipe. The object inside contains the identifier of either the tag or the item, depending on what you picked.

result is the item output of the recipe. Note for vanilla this only accepts single items.

experience is the amount of experience dropped when completing a smelting recipe.

cookingtime is how long it takes for the item to smelt.

The type is used in all recipes, but the other objects can vary depending on what you are making.

For more in-depth info check out the Minecraft Wiki.

After running /reload again, and using /recipe give @s *, which gives us all the recipes, we can now see that the recipe appears in-game!

An animated image that shows the recipe in a furnace using the recipe book.



Where do I define it?
When Alloy Forgery is loaded for the first time it generates a folder in the .minecraft directory, which is called moddata. Under the moddata folder you can create new forges, and override existing ones. An example would be overriding the deepslate forge. For this we would create enough folders so that we can go into moddata/alloy_forgery/alloy_forges, and create a new deepslate_bricks_forge.json file. This new file will override the existing deepslate bricks forge, allowing us to change it.

For creating new forges simply create your own data folder.

An example would be moddata/custom_content/alloy_forges, with a new bedrock_forge.json file inside.

Defining the forge
An example is provided below:

{ "material": "minecraft:deepslate_bricks", "additional_materials": [ "minecraft:deepslate_tiles", "minecraft:polished_deepslate", "minecraft:chiseled_deepslate" ], "tier": 2, "speed_multiplier": 1.5, "fuel_capacity": 96000 }

material - Defines the block used for crafting the Forge Controller and the block the Forge is built from.

additional_materials - Defines extra materials the Forge structure can be built from.

tier - The tier of the Forge. Determines what recipes it can process.

fuel_capacity - How much fuel the Forge can hold before needing to be refueled.

speed_multiplier - A multiplier which decides how fast the Forge processes a recipe. Does not impact fuel consumption.