Materials
Some properties can now be defined per material and then references from modules and schematics.
Material data is organized in folders based on the type of the material (e.g. wood
, metal
or skin
) with one file/resource per material. Modules and
schematics can then reference a specific material (e.g. wood/spruce
or misc/bone
) or all materials of a type (e.g. wood
or metal
) and defined how
the properties of those materials should be applied for the module.
Material data is loaded from the data/tetra/materials/
folder.
Material
Definition of material data in tetra. Most of the fields in this resource are available on module variants and schematic outcomes and are probably easier to understand when read about in that context.
Format:Marks if this should replace or merge with existing entries (if any) for this schematic definition. The default behaviour for materials added by other mods and datapacks is to merge values set by those into the existing entry (if any). By setting replace to true it's possible to completely replace materials registered by tetra, which can be useful when one wants to remove something.
Identifier for the material, will be used as suffix for module variants from this material.
Applied to all module variants from this material.
If set to true, this material will not show up in the holosphere.
If set to true, module and improvement variants derived from this material will not show up in the holosphere.
Multiplier for primary attributes & effects. Should represent hardness, sharpness or the ability to shape this material into something with a hard/sharp edge. Material module variants reference this when determining attributes and effects.
Multiplier for secondary attributes & effects. Should represent material density, rigidity or weight, how much kinetic energy does this carry as it's swung. Material module variants reference this when determining attributes and effects.
Multiplier for tertiary attributes & effects. Should represent flexibility or tensile strength, how fast does this material spring back when bent. Material module variants reference this when determining attributes and effects.
Durability base, modules use this to determine flat or multiplier durability bonuses.
Multiplier for modules that provide integrity.
Multiplier for modules that consume integrity.
The magic capacity of major modules variants made from this material.
Modules that provide tools that vary based on material use this to determine the efficiency of the tools.
Innate attributes gained from the material, all modules and improvements crafted from this material will inherit these attributes.
Aspects that will be inherited by modules and improvements crafted from this material. Intended for when the material should affect how a module can be modified by improvements and enchantments.
All major modules made from this material will have these improvements. Useful for when major modules crafted from the material should have some effect but minor modules or improvements should not.
Variants and improvements derived from this material will have the tags listed here. Variants and improvements may add additional tags. This is a hacky solution, se schema for module variants for more info.
An array of texture suffixes that this material would prefer to use, the first suffix that matches a value in the 'availableTextures' from referencing material variant will be used.
Referencing modules with models that have a base path matching one of these values will be forced to use the first texture suffix from this material, even if that suffix is not listed in 'availableTextures'. This is useful if an addon wants to add specific textures for some modules added by base tetra or by another addon. Obsidian has an example for this in base tetra.
If set to true, when textures are provided through the 'textureOverrides' method the texture will still be tinted with the material's tint. Leave this as false when the textureOverrides already have colored textures.
Can be set if the material stack should have some specific nbt data.
Determines how large the itemstack has to be to match this outcome. This also determines how many items are consumed when crafting.
Defines which item is required by outcomes derived from this material. The count field may be offset or multiplied by the referencing outcome.
Outcomes derived from this material will have this experience cost, outcomes may add to or subtract from this value.
Features are displayed when viewing the material in the holosphere, to be used to describe crafting effect behavior related to this material. E.g. tetracelium uses this to describe how Twilight Forest metals apply different enchantments depending on module type.
{
"key": "oak",
"category": "wood",
"primary": "3",
"secondary": "4",
"tertiary": "6",
"durability": "5.2",
"integrityCost": "1",
"integrityGain": "4",
"magicCapacity": "90",
"toolLevel": "1",
"toolEfficiency": "2",
"tints": {
"glyph": "oak_glyph",
"texture": "oak"
},
"textures": [
"crude",
"default"
],
"material": {
"tag": "minecraft:planks"
},
"requiredTools": {
"axe": 1
}
}
{
"key": "diamond",
"category": "gem",
"primary": "6",
"secondary": "7",
"tertiary": "0",
"durability": "156.1",
"integrityCost": "2",
"integrityGain": "2",
"magicCapacity": 60,
"toolLevel": "4",
"toolEfficiency": "8",
"tints": {
"glyph": "diamond_glyph",
"texture": "diamond"
},
"textures": [
"shiny",
"crude",
"default"
],
"material": {
"item": "minecraft:diamond"
},
"improvements": {
"arrested": 0
},
"requiredTools": {
"hammer": 3
}
}
Relevant localization keys
Keys used for localization entries related to materials:
tetra.material.<material_key>
: The name of the material, displayed in the holosphere and in the "applicable materials" tooltip in the workbenchtetra.material.<material_key>.prefix
: Used to prefix module variants and improvements derived from this materialtetra.material.feature.<feature_key>
: The label used for a feature, displayed in the holospheretetra.material.feature.<feature_key>.tooltip
: This tooltip is displayed when hovering a feature in the holosphere UItetra.material.feature.<feature_key>.tooltip_extended
: (Optional) This is added to the tooltip while hovering a feature while holding shift
Structure
Vanilla materials are grouped/structured like this:
├── fabric
│ └── wool.json
├── fibre
│ ├── phantom_membrane.json
│ ├── string.json
│ ├── twisting_vine.json
│ ├── vine.json
│ └── weeping_vine.json
├── gem
│ ├── diamond.json
│ └── emerald.json
├── metal
│ ├── gold.json
│ ├── iron.json
│ └── netherite.json
├── misc
│ ├── blaze_rod.json
│ ├── bone.json
│ └── end_rod.json
├── scale
│ └── turtle_scute.json
├── skin
│ ├── hide.json
│ └── leather.json
├── stone
│ ├── andesite.json
│ ├── blackstone.json
│ ├── diorite.json
│ ├── flint.json
│ ├── granite.json
│ ├── obsidian.json
│ └── stone.json
└── wood
├── acacia.json
├── birch.json
├── crimson.json
├── dark_oak.json
├── oak.json
├── spruce.json
└── warped.json