Materials (1.21 and up) - SilentChaos512/Silent-Gear GitHub Wiki

Materials are used to craft compound parts, such as tool heads, rods, and other parts. A single material often supports multiple part types. Materials are linked to items with ingredients, just like how items are specified in recipes. Any single item cannot be linked to multiple materials.

A material is valid for a given part type if it has a properties object assigned to that part type, even if the properties object is empty.

See also: Part Types

File Location

All material data files should be placed in data/my_namespace/silentgear_materials, where my_namespace is a namespace that you have chosen for your data pack or mod. All files in data/*/silentgear_materials will be considered as materials.

You should never use the silentgear namespace unless you are overriding existing materials!

Examples

Data packs are a vanilla Minecraft feature, so there is plenty of information and tutorials online. These examples should be more than enough to get you started, assuming you already know the basics of data packs from vanilla.

Built-in Files

Built-in data files can be found here on GitHub or in the mod JAR file.

Material data files: 26.1.x | 1.21.1

Specification

This is an outline of the JSON format. Many items are described in greater detail below.

  • type (string) - The material type, which is typically silentgear:simple
  • parent (string) - The parent for the material, which can be silentgear:empty if it has no parent. Most materials have no parent.
  • crafting (object) - An object containing crafting-related properties of the material
    • can_salvage (boolean) - Indicates whether or not the material can be salvaged
    • categories (list) - A list of material categories the material falls into (empty lists are highly discouraged)
    • gear_type_blacklist (list) - A list of gear types the material is not allowed to be used in (may be empty)
    • ingredient (optional, ingredient string/object) - An ingredient (exactly like what is used in recipes) to match items to the material
    • part_substitutes (object) - A map of part type -> ingredient that allows items to be substituted as parts made of this material for crafting purposes.
  • display (object) - Contains visual properties of the material
    • color (string) - A color for the material, specified as a Silent Lib Color, which allows common CSS color names and an RGB hex format (e.g. "#FFDC143C")
    • equippable (object, MC 1.21.11+ only) - Armor visual properties
      • equip_sound (string) - Sound ID for equipping this armor
      • asset_id (string ID of EquipmentAsset) - used for armor made only of this material
      • compound_asset_id (string ID of EquipmentAsset) - used for armor made of compounds of this material
      • always_use_tint (boolean) - Whether or not to tint the armor texture with the material color
    • main_texture_type (string) - A basic texture for parts made of this material (can be either "HIGH_CONTRAST" or "LOW_CONTRAST").
    • name (text component object) - The name of the material displayed in game. Built-in materials use translated text, while data packs will typically use literal text.
    • name_prefix (text component object) - An optional name prefix (may be "" if no prefix is needed). Prefixes are rarely needed.
  • properties (object) - A map of part type -> property map (property maps may be empty, but must exist for all supported part types)
    • `<part_type_id> (object) - map of property -> property value

Details for data files

Type

Material types include silentgear:simple, silentgear:compound, silentgear:custom_compound, and silentgear:processed. The vast majority of materials will be silentgear:simple, but silentgear:custom_compound may be useful for some data packs.

Parent

Materials will inherit some properties from their parents. Most materials do not need a parent, in which case it can be silentgear:empty, indicating no parent. Examples of materials with parents include different wood and wool types. Each block has it's own material so it can have a different color, but they share many properties. So specifying a parent reduces the amount of duplicate data in your JSON files.

Materials have have parents are called "child" materials. Child materials will be matched with items before their parents. For example, the "wood" material matches all #minecraft:planks, but any child materials that match specific planks (such as oak planks or spruce planks) will match the child material instead. The parent material will match any items that child materials do not match, such as modded planks. In older versions of Silent Gear, a special "exclusion ingredient" on the parent material was needed to accomplish this, but not anymore.

Crafting

All crafting-related properties that match materials to items, combined into a single object.

categories

Categories determine synergy when mixing materials in alloy makers, as well as what alloy makers will accept the materials. Some recipes (like elytra wings) will also restrict materials to certain categories. Materials can have any number of categories but most have 2 or 3, with one of those being any of "basic", "intermediate", "advanced", or "endgame". This isn't required but helps create more interesting alloys.

While a set of categories is defined by the mod, you can simply enter any string to create a new category. This also means you need to be cautious when entering categories, as a typo will create a new category rather than causing an error.

A list of built-in categories at time of writing (2026-04-15):

  • metal
  • gem
  • rock
  • dust
  • cloth
  • fiber
  • wood
  • organic
  • slime
  • sheet
  • intangible
  • basic
  • intermediate
  • advanced
  • endgame

gear_type_blacklist

A list of gear types this material is not allowed to be used with. This will typically be an empty list, indicating no restrictions. To list a gear type in the blacklist, just enter its ID as a string, such as "silentgear:armor" to blacklist all armor types. See Gear Types for a list of gear types in the mod.

ingredient

The item(s) that match the material for crafting parts. This is specified as an Ingredient, which is how items are specified in recipes. The exact JSON format will depend on the Minecraft version. Some common examples are shown below, but anything that works in a recipe ingredient should work here as well.

The ingredient field is optional and can be left out if the material is not usable normally or is only a part substitute (blaze rods, for example).

Note that child materials will always match to items before their parents, so it is okay for parent ingredients to contain their children (see the "Parent" section above).

Minecraft 1.21.11+

Most ingredients will be simply a string containing either the item ID or tag ID (with leading "#" for tags only)

"ingredient": "#c:ingots/iron"

or...

"ingredient": "minecraft:iron_ingot"

Minecraft 1.21.1

All ingredients are packed into an object, typically containing either an "item" or "tag" field. There is no "#" before tags, unlike newer versions.

"ingredient": {
  "tag": "c:ingots/iron"
}

or...

"ingredient": {
  "item": "minecraft:iron_ingot"
}

part_substitutes

A map of Part Type -> Ingredients that indicates items that can be substituted for parts made of this material. For example, the wood parent material contains sticks as a rod substitute for quicker early game gear crafting. Similarly, iron rods can be substituted for compound rods made of iron:

"part_substitutes": {
  "silentgear:rod": "#c:rods/iron"
}

This may be empty if no part substitutes are needed:

"part_substitutes": {}

While most commonly used for rods, any compound part type is supported.

It is important to note that the ingredients for substitutes may not overlap with the ingredient for the material. This will cause matching of the material to fail and it will only work as a part substitute. No single item can be both a part and a material.

Display

All visual properties for the material. These have seen the most changes over time and are likely to change again in the future.

color

A color to use for the material, specified using the Silent Lib color format, which consists of an optional "#" followed by 6 or 8 hexadecimal digits representing the RGB (or ARGB) color in hex. You can find color pickers that will give you a usable hex code on most image editing applications and on many websites (search online for "color picker"). You can also enter CSS color names in place of a hex code (like "darkorange" or "purple")

Choosing a Color

The color of a material will be used to tint gear textures, so it will be mostly darkened but also lightened in some spots if the gear item has a highlight layer. So the color of a material should be on the lighter side, but not so light it loses all of its saturation. I typically pick the color from an item texture using the color picker tool, picking a pixel on the lighter side but avoiding "highlights" and shading.

Choosing a color from an item texture

equippable

New in versions after 1.21.1, this object specifies armor display properties for the material. You can optionally specify custom armor textures, or use a generic one and tint it with the material's color.

An example of a common equippable info object:

"equippable": {
  "always_use_tint": true,
  "asset_id": "silentgear:generic_shiny",
  "compound_asset_id": "silentgear:generic_shiny",
  "equip_sound": "minecraft:item.armor.equip_generic"
},

I will add more information to this section once the code is more fleshed out, as some of these fields seem to be accidentally unused (#933)

main_texture_type

Sets one of two texture types to be used for the main part, either "high_contrast" or "low_contrast". The low contrast texture has a flatter/duller appearance suitable for stone or wood, while the high contrast texture has darker shading and a highlight layer which makes the final gear item appear more shiny/metallic.

This may be changed or removed in future versions when custom textures are possible again.

name

The displayed name of the material, which may become part of the final gear item's name. Built-in materials use translatable text that references the language files, while data packs may prefer to simply use literal text.

Translatable text:

"name": {
  "translate": "material.silentgear.diamond"
},

or literal text:

"name": {
  "text": "My Material"
},

name_prefix

An optional name prefix which will be added to the beginning of the final gear item's name. This will typically be left empty, like this:

"name_prefix": ""

or you can add a prefix text component use the same format as "name" for special materials:

"name_prefix": {
  "translate": "material.silentgear.netherite"
}

properties

A map of property maps which make up the real meat of the file. You can support as many part types as you want. Supported part types must be present in this map, but they need not contain any properties. The exception is silentgear:main parts, which must have either non-zero durability or armor_durability to be usable for crafting.

For each property, you can also add a "property/gear_type" key to override the property on specific gear types. This is frequently used to set armor protection values and sometimes used to set the attack speed of axes and hoes independently to match vanilla items.

Here is a trimmed down version of the iron material JSON as an example:

"properties": {
  "silentgear:main": {
    "armor": 15.0,
    "armor/boots": 2.0,
    "armor/chestplate": 6.0,
    "armor/helmet": 2.0,
    "armor/leggings": 5.0,
    "armor_durability": 15.0,
    "attack_damage": 2.0,
    "attack_speed": 0.0,
    "attack_speed/axe": -0.1,
    "attack_speed/hoe": 0.0,
    "charging_value": 0.7,
    "draw_speed": 0.1,
    "durability": 250.0,
    "enchantment_value": 14.0,
    "harvest_speed": 6.0,
    "harvest_tier": {
      "incorrect_blocks_for_tool": "silentgear:incorrect_for_iron_tools",
      "level_hint": "2",
      "name": "iron"
    },
    "magic_armor": 6.0,
    "magic_damage": 1.0,
    "projectile_accuracy": 1.1,
    "projectile_speed": 1.0,
    "ranged_damage": 1.0,
    "rarity": 20.0,
    "traits": [
      {
        "conditions": [],
        "level": 3,
        "trait": "silentgear:malleable"
      }
    ]
  },
  "silentgear:rod": {
    ...
  },
  "silentgear:tip": {
    ...
  }
}

It is worth noting that while most properties are numerical, a property can be literally anything as long as a property is registered by either Silent Gear or another mod.

Number properties

Encoding as either a real number (floating point) or a number with an operation. Examples:

A simple value (operation implied to be "AVERAGE", alias "AVG")

"armor": "15.0"

or...

"draw_speed": {
  "operation": "ADD",
  "value": 0.2
},

which creates a +0.2 modifier, adding to the final property value on the gear item.

Boolean properties

Represents a boolean value, either true or false. The only current example is the silentgear:additive property, which marks a material as only being usable for alloying and not direct gear crafting. The additive property defaults to false, so you do not need to add it to your JSON files unless you are making materials that only allow alloying (like redstone as a main part).

"additive": true

Harvest Tier property

Encodes harvestability information into an object. It requires a string name and a block tag incorrect_blocks_for_tool which contains the blocks the material cannot mine. An optional level_hint string can be included to help players identify where the harvest tier falls in progression.

  • name (string) - A literal string displayed in the tooltip to name the harvest tier
  • level_hint (optional, string) - Gives the player a hint about the harvest tier. Displayed next to name in the tooltip. This has no actual effect on the harvest tier itself and is simply to make progression more obvious. All built-in materials display numerical values like "0" or "1.5", where "0" is wood and "4" is netherite.
  • incorrect_blocks_for_tool (string, block tag identifier without a leading "#") - The actual block tag that determines what this harvest tier can mine or not mine. This must be an existing block tag. You can create your own tags, or use one of the incorrect_for_... tags already defined by Silent Gear here.

Example:

"harvest_tier": {
  "incorrect_blocks_for_tool": "silentgear:incorrect_for_iron_tools",
  "level_hint": "2",
  "name": "iron"
}

Trait List properties

A list of trait instances, containing trait ID, level, and conditions. Encoded as a JSON array. Example taken from crimson steel:

"traits": [
  {
    "conditions": [],
    "level": 5,
    "trait": "silentgear:malleable"
  },
  {
    "conditions": [],
    "level": 3,
    "trait": "silentgear:hard"
  },
  {
    "conditions": [
      {
        "type": "silentgear:or",
        "values": [
          {
            "type": "silentgear:material_count",
            "count": 3
          },
          {
            "type": "silentgear:material_ratio",
            "ratio": 0.33
          }
        ]
      }
    ],
    "level": 1,
    "trait": "silentgear:flame_ward"
  }
]

Other Properties

At the time of writing there are two additional properties, "kinetic weapon" and "swing animation" which I will not detail. These primarily exist for spears and currently have values calculated at runtime from other gear properties for all materials. You do not need to set these properties for spears to be craftable and usable.