This page covers information for 1.18.2. For 1.19.2+, see Json Things.

While we aim to make as much of our mods configurable and extendable through data packs and resource packs, there are some areas of the game that simply cannot be data driven at this time. Addons written in Java can of course access these features through code, but that is more difficult for modpacks and developers with less coding experience.

Json Things offers a good middle ground for developers wishing to add registry content such as items, blocks and fluids using an interface very similar to data packs and resource packs called “thing packs”, allowing very extensive mods to be written without writing any Java code. For a demonstration of its potential, see Tinkers’ JSON Things, an official addon to Tinkers’ Construct written purely using JSON files.

Json Things provides most of the components you need to create a Tinkers’ Construct addon, though a few components, notably the item classes required to register tools, required custom compatibility. This page documents that compatibility.

Prerequisites

Tinkers’ Construct items and blocks added through Json Things follow the same base format as the items added in Json Things. Make sure to read the basics of items on the Json Things documentation Json Things Item Definitions.

Material Items

Folder: things/<domain>/item/.

Material items are items that have a variant based on materials. While the NBT for these items is handled primarily through recipes and the textures through models, these item classes ensure the proper tooltips are shown and that creative tabs and JEI show all variants.

Tool Part

Tool parts are essential for creating new tools; the majority of tool recipes require certain interfaces to be present on any items used.

The format of the tool part item type is as follows:

  • (Object): The root object.
    • type (Resource Location): Item type ID, must be tconstruct:tool_part.
    • stat_type (Stat Type ID): Supported stat type. This will determine available material variants, along with how the part contributes stats and traits to the tool.
    • Any other fields supported in item definitions.

Repair Kit

Repair kits allow repairing a tool both in the Tinkers’ Station or Anvil, and in a standard crafting table. Most addons will not need to add custom repair kits, but they serve as a nice example “tool part” and may be useful to a modpack wishing for more granular on the go repair.

The format of the repair kit item type is as follows:

  • (Object): The root object.
    • type (Resource Location): Item type ID, must be tconstruct:repair_kit.
    • repair_amount (Number): Amount this repair kit will repair. 1.0 makes it equivelent to a single “common unit” of the material, for instance an ingot or a wood plank. Note that this does not determine the cost of the repair kit, that is controlled through recipes.
    • Any other fields supported in item definitions.

Tool Items

Folder: things/<domain>/item/.

While the majority of tool behavior is defined as part of tool definitions in data packs, the internal tool logic must still be registered as an item of the appropriate type to ensure all modifiers can properly function. There is also a small amount of tool behavior tied to the item type, though that may change in future updates as more content is migrated to data packs.

Stat Providers

All tools must have a stat provider, which determines which tool parts are allowed and required, and how those parts are used to compute stats. The following stat providers are valid for tools requesting a stat provider:

  • tconstruct:no_parts: Stat provider for a tool with no tool parts. Will cause the tool definition to error if the parts array has any values.
  • tconstruct:melee_harvest: Stat provider for melee weapons and harvest tools. Requires one or more parts of stat type tconstruct:head, and also supports stat types tconstruct:handle and tconstruct:extra. See Melee/Harvest Stat Type for more info.
  • tconstruct:ranged: Stat provider for ranged weapons such as bows. Requires one or more parts of stat type tconstruct:limb, and also supports stat types tconstruct:grip and tconstruct:bowstring. See Ranged Stat Type for more info.

Standard Tool

The majority of tools (melee weapons, harvest tools, shields, staffs) are added using these item types, with the differing behaviors caused by tool definitions, starting modifiers, and item tags. tconstruct:staff causes the tool to support running interact modifiers on left (used for shields and staffs notably), while tconstruct:tool does not run interaction modifiers on left click. The behavior of the two is otherwise identical for supporting melee attacks, block harvesting, and right click interaction.

The format of these item types are as follows:

  • (Object): The root object.
    • type (Resource Location): Item type ID, must be tconstruct:tool or tconstruct:staff.
    • stat_provider (Stat Provider ID): Stat provider ID.
    • break_blocks_in_creative (Boolean): If true (default), this tool can break blocks in creative mode. Weapons that are primarily for combat (notably swords) will set this to false.
    • Any other fields supported in item definitions except max_stack_size, which is always 1.

Bow

This item type represents a modifiable bow, with behavior similar to longbows. Bows support firing arrows on releasing right click. They only support left click interaction modifiers by default (instead of all interaction modifier hooks). They fully support melee attacks and block harvest if added to the proper tags.

The format of the bow item type is as follows:

  • (Object): The root object.
    • type (Resource Location): Item type ID, must be tconstruct:bow.
    • stat_provider (Stat Provider ID): Stat provider ID, if unset defaults to tconstruct:ranged.
    • max_stack_size (Integer): Maximum stack size of the tool, default 64. This is a standard Json Things property which nearly all tools will want to set to 1; however some tools such as daggers have a higher stack size for modifier crafting incentives.
    • Any other fields supported in item definitions except max_stack_size, which is always 1.

Crossbow

This item type represents a modifiable crossbow. Crossbows support firing arrows and fireworks by charging to load then firing on a second click. They only support left click interaction modifiers by default (instead of all interaction modifier hooks). They fully support melee attacks and block harvest if added to the proper tags.

The format of the crossbow item type is as follows:

  • (Object): The root object.
    • type (Resource Location): Item type ID, must be tconstruct:crossbow.
    • stat_provider (Stat Provider ID): Stat provider ID, if unset defaults to tconstruct:ranged.
    • allow_fireworks (Boolean): If true, this crossbow may use fireworks as ammo. If false, it is limited to only standard arrows.
    • Any other fields supported in item definitions except max_stack_size, which is always 1.

Armor Items

Armor behaves notably different from tools. They notably do not fire many modifier hooks when holding the item, instead firing their hooks when the armor is worn in the correct slot. The majority of the armor’s behavior including stats is defined through the tool definition in data packs.

Each of the different armor types behaves differently with respect to how they determine armor textures. All three armor types share the following common fields:

  • (Object): The root object.
    • stat_provider (Stat Provider ID): Stat provider ID, if unset defaults to tconstruct:no_parts.
    • name (Resource Location): Name of this armor set, typically the item name without the slot (e.g. tconstruct:plate for tconstruct:plate_helmet). Used to determine armor textures.
    • equip_sound (Sound Event ID): Sound to play when equipping the armor. If unset, defaults to minecraft:item.armor.equip_generic.
    • slot (String): Slot where this armor piece is worn. May be helmet, chestplate, leggings, or boots.
    • Any other fields supported in item definitions except max_stack_size, which is always 1.

Basic Armor

Basic armor uses two base textures for the armor, assets/<domain>/textures/models/armor/<texture_name>_layer_2 for leggings and assets/<domain>/textures/models/armor/<texture_name>_layer_1 for all other pieces. Basic armor can be configured to render similarly to traveler’s gear, or can be reduced down to requiring just two textures.

Basic armor has the following fields:

  • (Object): The root object.
    • type (Resource Location): Item type ID, must be tconstruct:basic_armor.
    • All common armor item fields.
    • has_golden (bool): If true (default), this armor will swap its base texture when the golden modifier is applied to assets/<domain>/textures/models/armor/<texture_name>_golden_2 for leggings and assets/<domain>/textures/models/armor/<texture_name>_golden_1 for all other pieces, mimicing the behavior of traveler’s gear.
    • dyeable (bool): If true (defaults to false), this armor will add an additional colored overlay when the dyed modifier is applied. The colored overlay will be assets/<domain>/textures/models/armor/<texture_name>_overlay_2 for leggings and assets/<domain>/textures/models/armor/<texture_name>_overlay_1 for all other pieces, mimicing the behavior of traveler’s gear.

Layered Embellished Armor

Layered embellished armor has a base texture that is always rendered, assets/<domain>/textures/models/armor/<texture_name>_layer_2 for leggings and assets/<domain>/textures/models/armor/<texture_name>_layer_1 for all other pieces. In addition, it renders a layer on top based on the embellishment material, rendering similarly to plate armor.

Layered embellished armor has the following fields:

  • (Object): The root object.
    • type (Resource Location): Item type ID, must be tconstruct:layered_embellished_armor.
    • All common armor item fields.

Flat Embellished Armor

Flat embellished armor has no base texture. It loads textures for the first layer from assets/<domain>/textures/models/armor/<texture_name>/layer_2_<material_domain>_<material_name> for leggings and assets/<domain>/textures/models/armor/<texture_name>/layer_1_<material_domain>_<material_name> for all other pieces, where the material will be tconstruct:gold if the golden modifier is applied, otherwise will be fetched from the embellishment. Flat embellished armor renders similarly to the slime suit, though has the option for an additional dyed overlay.

  • (Object): The root object.
    • type (Resource Location): Item type ID, must be tconstruct:flat_embellished_armor.
    • All common armor item fields.
    • type (Material ID): Material ID to use when neither embellishment nor golden is applied.
    • dyeable (bool): If true (defaults to false), this armor will add an additional colored overlay when the dyed modifier is applied. The colored overlay will be assets/<domain>/textures/models/armor/<texture_name>_overlay_2 for leggings and assets/<domain>/textures/models/armor/<texture_name>_overlay_1 for all other pieces, mimicing the behavior of traveler’s gear.

Other Items

Folder: things/<domain>/item/.

These item types do not fit into any of the above categories.

Tool Part Cast

Any item is valid as a cast, and casts like ingot or nugget casts can just use the standard plain type provided by Json Things. The tool part cast item type simply adds an additional tooltip to the cast showing the material cost for the cast, which is fetched from the relevant recipe in the data pack.

The format of the tool part cast item type is as follows:

  • (Object): The root object.
    • type (Resource Location): Item type ID, must be tconstruct:part_cast.
    • part (Item ID): ID of the part item associated with this cast. Will be used to find the cost from the relevant recipe.
    • Any other fields supported in item definitions.