Skip to content

[Legacy up to 1.3.2] Defining Forges, Materials and Recipes

Noaaan edited this page Nov 10, 2021 · 1 revision

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"
  }