The format of all data-driven JSON configs for items
Insulation Items
/item/insulator/
Insulation items are the most advanced config settings in Cold Sweat. This system allows for insulation items to add attribute modifiers to the entity, and can have a condition that the wearing entity must match for the insulation to be active.
Format
First, insulation items have a few unique data structures of their own:
Slot Type
There are 3 insulation slot types that determine how the insulation item is used:
item : A normal insulation item that is applied to armor
armor : An armor item that provides insulation directly when worn
curio : Exclusive to items that can be worn as curios via the Curios mod
The slot type is simply represented by a string in the config, i.e. "slot": "armor"
Insulation Type
There are also the 2 insulation types:
static : Provides a static amount of heat and cold insulation when worn
adaptive : Adapts to the player's environment to provide a varying amount of hot and cold insulation, like chameleon molt.
The formats for each type look like so:
For static insulation items:
"insulation": {
"hot": 6,
"cold": 4
}
For adaptive insulation items:
"insulation": {
"value": 6,
"adapt_speed": 0.01
}
adapt_speed controls the rate at which the insulation item adapts to the entity's environment. This value is added/subtracted every tick in a range between -1 (full cold) and 1 (full heat).
Attribute Modifiers
Attribute modifiers are added to insulation items like so:
For more info on how attribute modifiers work, see here.
Given all of this information, we can take a look at an example insulation item:
{
// A list of mods that must be loaded for this insulation item to be registered.
// Useful for adding inter-mod compat that would break if one mod isn't loaded
"required_mods": [
"thirst",
"sereneseasons"
],
// This item gives insulation when worn directly
"type": "armor",
// The insulation this item provides
"insulation": {
"heat": 6,
"cold": 4
},
// An item requirement (see )
"data": {
// A list of items that will have this insulation.
// Also accepts tags (prefixed with #)
"items": [
"minecraft:iron_chestplate",
"#forge:armors/helmets"
],
"enchantments": [
{
"enchantment": "minecraft:protection",
"levels": {
"min": 1,
"max": 2
}
}
]
},
// The predicate that the wearing entity must pass for the insulation to work
// An entity requirement (see )
"entity": {
"stepping_on": {
"block": {
"blocks": [
"minecraft:iron_block"
]
}
},
"equipment": {
"mainhand": {
"items": [
"minecraft:stick"
]
}
}
},
// Attribute modifiers that are applied to the entity when the item is worn
// For a list of Cold Sweat attributes, see
"attributes": {
"generic.movement_speed": [
{
"name": "super speed",
"amount": 0.3,
"operation": "addition"
}
]
},
// Provide protection against certain TempModifiers, reducing their effectiveness
// A value of 1.0 is full protection
// See
"immune_temp_modifiers": {
"cold_sweat:blocks": 0.5,
"sereneseasons:season": 1.0
}
}
The above example does the following:
Checks if both Thirst Was Taken and Create are loaded
Gives 6 heat insulation and 4 cold insulation when worn in armor slots
Applies to iron chestplates, or any helmet, enchanted with protection 1 or 2
Only works if the entity is standing on an iron block and holding a stick
Increases the player's walking speed by 0.3 blocks per tick when worn
Fuel Items
/item/fuel/
Fuel items apply to the icebox, boiler, hearth, and soulspring lamp. They do not currently have extra functionality over what is achievable through normal configs.
Format
The format for fuel items is as follows:
{
// This fuel item is for the hearth
"type": "hearth",
// Negative values indicate cold fuel (hearth only)
"fuel": -100,
// Items to be assigned this fuel value
// An item requirement (see )
"data": {
"items": [
"minecraft:slimeball"
]
}
}
Food Items
/item/food/
Food items change the entity's body temperature when eaten. They support item requirements and entity requirements (for the entity eating the item).
Format
{
"required_mods": [
"aether"
],
// An item requirement (see )
"data": {
"items": [
"minecraft:carrot",
"#minecraft:piglin_food"
]
},
// Positive values increase temperature, negative values decrease
"value": 20,
// The entity must be in the overworld for this food to change its temperature
// An entity requirement (see )
"entity": {
"location": {
"dimension": "minecraft:overworld"
}
}
}
Inventory Items
/item/carried_temp/
Items can be configured to affect the player's temperature when being carried in their inventory. This system can check any inventory slots, including armor slots.
Format
{
"required_mods": [
"twilightforest"
],
// An item requirement (see )
"data": {
"items": [
"minecraft:lava_bucket"
]
},
// slot name, or range of slot IDs
// Slot names: mainhand, offhand, feet, legs, chest, head
"slots": [
"mainhand",
"offhand",
{
"min": 36,
"max": 44
}
],
// The temperature of the item.
// This value is added for every matching instance of the item
"temperature": 0.5,
// The temperature trait that this item will modify (see )
"trait": "world",
// Limits the temperature change this item can cause, even when stacking
"max_effect": 4,
// An entity requirement (see )
"entity": {}
}