Skip to content

Item Attribute Config V1.0

Alexandra-Myers edited this page Mar 3, 2025 · 2 revisions

Combatify Items config and you

The Combatify Items config is located in config/combatify/combatify-items.json and is used to configure stack size, attack damage, attack speed, attack reach, and attack charged reach.

The Format

The JSON format for this config is as the following:

{
  "items": [
    {
      "name": "foo:real_item",
      "damage": 2,
      "speed": 3,
      "reach": 3,
      "charged_reach": 1,
      "stack_size": 1,
      "cooldown": 2,
      "cooldown_after": true,
      "weapon_type": "axe",
      "blocking_type": "sword",
      "damage_protection": 65,
      "block_knockback_resistance": 0.1,
      "enchantment_level": 20,
      "is_enchantable": true,
      "has_sword_enchants": true,
      "use_duration": 100,
      "armor_piercing": 0.6,
      "can_sweep": true,
      "sword_enchants_from_enchanting": true,
      "durability": 250,
      "tier": "wood",
      "armor": 8,
      "armor_toughness": 1,
      "armor_knockback_resistance": 0.05,
      "tool_tag": "#foo:bar"
    },
    {
      "name": [
        "foo:also_real_item",
        "foo:fake_item"
      ],
      "weapon_type": "potion",
      "tier": "foo",
      "durability": {
        "helmet": 275,
        "chestplate": 400,
        "leggings": 375,
        "boots": 325,
        "body": 550,
        "any": 500
      },
      "armor": {
        "helmet": 3,
        "chestplate": 8,
        "leggings": 6,
        "boots": 3,
        "body": 12,
        "any": 8
      }
    }
  ],
  "weapon_types": [
    {
      "name": "sword",
      "damage_offset": 3,
      "speed": 3.5,
      "reach": 4,
      "charged_reach": 0.5
      "tierable": true,
      "blocking_type": "foo",
      "has_sword_enchants": false,
      "armor_piercing": 0.1,
      "can_sweep": false
    },
    {
      "name": "potion",
      "tierable": false,
      "damage_offset": 4,
      "speed": 2.25,
      "reach": 3,
      "has_sword_enchants": true,
      "can_sweep": true,
      "sword_enchants_from_enchanting": true
    }
  ],
  "blocking_types": [
    {
      "name": "foo",
      "class": "net.atlas.combatify.util.TestBlockingType",
      "require_full_charge": false,
      "is_tool": true,
      "can_block_hit": false,
      "can_crouch_block": true,
      "can_be_disabled": false,
      "default_kb_mechanics": false,
      "requires_sword_blocking": false
    }
  ],
  "tiers": [
    {
      "name": "foo",
      "base_tier": "gold",
      "uses": 256,
      "mining_speed": 15.0,
      "damage_bonus": 2,
      "mining_level": 4,
      "enchant_level": 40,
      "repair_ingredient": "foo:great_repair_ingredient"
    }
  ]
}

Items

The JSON Array items is required, but it can be empty. The JSON Objects in the array include the following elements:

  1. name: Required for a valid config option, cannot be minecraft:air but can be any other value so long as it is a valid resource location for an item. (including modded items)
    • This is the only required element for the config to work.
    • Can be a JSON Array containing the names of multiple items, for these items all of the changes made here will apply. Example: making 10 items all have a weapon type of sword.
  2. damage: Defines the total attack damage dealt by the item.
  3. speed: Defines the total attack speed of the item.
  4. reach: Defines the fast hit reach of the item.
  5. charged_reach: Defines the reach gained in a charged hit. (200% charge)
  6. weapon_type: Defines the Weapon Type used by the item, as of yet only ones which exist by default can be used. (Not case-sensitive, can be any existing weapon type)
  7. blocking_type: Defines the Blocking Type used by the item. Must already be registered. (Blocking Types added through config will be registered at this point)
  8. cooldown: Defines the cooldown of the item, will apply no matter what.
    • Cannot be used on its own.
  9. cooldown_after: Defines whether the cooldown will apply upon item use or after the item is released.
    • Required if cooldown was modified, unused if cooldown is not applied.
  10. damage_protection: Defines the damage protection of an item provided it can defend from attacks. Will be in a percentage if the Blocking Type is a percentage, otherwise is an absolute value.
  11. block_knockback_resistance: Defines the knockback resistance of an item provided it can defend from attacks. Must be between 0 and 1.
  12. enchantment_level: Defines the power with which an item can be enchanted. For example, Netherite items have 15, while Gold has 22.
  13. is_enchantable: Defines if the item can be enchanted. If enchantment_level is not set and the item does not already have an enchantment level, the default enchantment level is 14.
  14. has_sword_enchants: Allows for an item to be enchanted with every sword enchantment if true. NOTE: Removed in 1.21
  15. use_duration: Defines the use duration of an item, or for how many ticks it can be used.
  16. armor_piercing: Defines the percentage, as a decimal, of which an item will pierce through armor.
  17. can_sweep: Defines whether or not an item can sweep without needing Sweeping Edge.
  18. sword_enchants_from_enchanting: Defines whether or not an item can gain sword enchants through enchanting. NOTE: Removed in 1.21
  19. durability: Defines the durability of an item. Can be represented as an integer or as a JSON Object formatted on the Armor Object Format.
  20. tier: Defines the tier of an item. Can be either one which exists in vanilla (wood, stone, gold, iron, diamond, or netherite) or one added via the items config itself.
  21. armor: Defines the armor value of an item. Can be represented as an integer or as a JSON Object formatted on the Armor Object Format.
  22. armor_toughness: Defines the armor toughness of an item.
  23. armor_knockback_resistance: Defines the knockback resistance of an item. Must be between 0 and 1.
  24. repair_ingredient: Defines the repair ingredient for an item. Cannot be minecraft:air but can be any other value so long as it is a valid resource location for an item.
  25. tool_tag: Defines the tag used for what a tool can mine.

Armor Object Format

In objects which use this format, this is how it is used:

  1. helmet: Armor items which represent the type helmet will choose what this is set to over other options
  2. chestplate: Armor items which represent the type chestplate will choose what this is set to over other options
  3. leggings: Armor items which represent the type leggings will choose what this is set to over other options
  4. boots: Armor items which represent the type boots will choose what this is set to over other options
  5. body: Armor items which represent the type body will choose what this is set to over other options
  6. any: Chosen for any item which is not armor already.  

Weapon Types

The JSON Array weapon_types is required, but it can be empty. The JSON Objects in the array include the following elements:

  1. name: Identifies what weapon type is being customized or added (Not case-sensitive). If it is new (Not SWORD, LONGSWORD, AXE, PICKAXE, HOE, SHOVEL, KNIFE, TRIDENT, or MACE), must contain damage_offset, speed, and reach.
    • This is the required for the config to work.
  2. damage_offset: The offset of damage which this weapon will deal, added onto the damage bonus from the item's tier. (if applicable)
  3. speed: Attack Speed of all weapons of this type.
  4. reach: Attack Reach of all weapons of this type.
  5. charged_reach: Charged Reach Bonus for all weapons of this type.
  6. tierable: Defines whether or not damage_offset has a tier apply.
    • This is the required for the config to work.
  7. blocking_type: Defines the Blocking Type to apply to weapons of this Weapon Type. Must already be registered. (Blocking Types added through config will be registered at this point)
  8. has_sword_enchants: Allows for every item of this Weapon Type to be enchanted with every sword enchantment if true. NOTE: Removed in 1.21
  9. armor_piercing: Defines the percentage, as a decimal, of which items of this type will pierce through armor.
  10. can_sweep: Defines whether or not items belonging to this weapon type can sweep without needing Sweeping Edge.
  11. sword_enchants_from_enchanting: Defines whether or not items belonging to this weapon type can gain sword enchants through enchanting. NOTE: Removed in 1.21

Blocking Types

The JSON Array blocking_types is required, but it can be empty. The JSON Objects in the array include the following elements:

  1. name: Identifies what blocking type is being added / edited. CANNOT BE "empty" OR "blank". (Not case-sensitive)
    • This is the required for the config to work.
  2. class: The binary name of the class this Blocking Type inherits the function of. Must extend BlockingType but the functionality is yours to choose.
    • This is required if you are adding a Blocking Type that does not already exist.
  3. require_full_charge: Whether this Blocking Type will require a charge if the config for that is enabled.
  4. is_tool: Whether this Blocking Type will be considered a tool. Triggers the sword blocking animation and affects opponent knockback.
  5. can_block_hit: Whether this Blocking Type can attack blocks while guarding.
  6. can_crouch_block: Whether this Blocking Type will let you crouch-block.
  7. can_be_disabled: Whether this Blocking Type can be disabled.
  8. default_kb_mechanics: Whether this Blocking Type will have the standard Knockback Resistance functionality (adding it onto the base Knockback Resistance) or will instead only apply if the Knockback Resistance granted is greater than the Knockback Resistance you have already.
  9. requires_sword_blocking: Whether this Blocking Type will require Sword Blocking to be enabled to show its stats.
  10. has_shield_delay: Whether this Blocking Type will have shield delay if it is above 0

Tiers

The JSON Array tiers is required, but it can be empty. The JSON Objects in the array include the following elements:

  1. name: Identifies what tier is being added. (Not case-sensitive)
    • This is the required for the config to work.
  2. base_tier: Identifies the tier this is based on. Can either be a tier defined prior in the config to this one, or a vanilla one (wood, stone, gold, iron, diamond, or netherite).
    • This is the required for the config to work.
  3. uses: The durability of items belonging to this tier.
  4. mining_speed: The speed at which items of this tier mine.
  5. damage_bonus: The damage items of this tier have on top of the weapon type's damage and base damage.
  6. mining_level: Chooses both the tag for incompatible blocks of this tier, and impacts formulas for blocking and weapon types.
  7. enchant_level: Defines the power with which an item of this tier can be enchanted.
  8. repair_ingredient: Defines the repair item for items of this tier.

Armor Calculations

The JSON Element armor_calculation is NOT required, and shouldn't be set if not used. This is split into two formulas, the armor formula, which represents a(D,P,T) inside of the formula D(1 - a(D,P,T)) and is adjusted for the effect of Breach accordingly, and the enchantment formula, which represents e(D,E) inside of the formula D * e(D,E). The armor formula has the following parameters:

  1. D: The amount of damage which was dealt.
  2. P: The amount of armor the entity has.
  3. T: The amount of armor toughness the entity has. The enchant formula has the following parameters:
  4. D: The amount of damage which was dealt.
  5. E: The total enchant level the entity has. The format of this is a string which expresses an equation using several operations, which are the following:
  6. min(x,y): Chooses the smallest between two numbers, which are separated by the comma.
  7. max(x,y): Chooses the largest between two numbers, which are separated by the comma.
  8. pow<b^e>: Raises a base to an exponent, the base is the left of the ^ while the exponent is the right.
  9. mul[x*y]: Multiplies the left and the right numbers.
  10. div[x/y]: Divides the left number by the right number.
  11. add{x+y}: Adds the left and the right numbers.
  12. sub{x-y}: Subtracts the right number from the left number.
  13. enchant:: Denotates the end of the armor formula and beginning of the enchant formula.
    • Everything done before this represents the armor formula. Everything done after this represents the enchantment formula.

Default Config

{
  "items": [
    {
      "name": [
        "minecraft:snowball",
        "minecraft:egg"
      ],
      "cooldown": 4,
      "cooldown_after": false
    },
    {
      "name": "minecraft:snowball",
      "stack_size": 64
    },
    {
      "name": [
        "minecraft:mushroom_stew",
        "minecraft:rabbit_stew",
        "minecraft:beetroot_soup",
        "minecraft:suspicious_stew",
        "minecraft:potion",
        "minecraft:splash_potion",
        "minecraft:lingering_potion",
        "minecraft:milk_bucket",
        "minecraft:honey_bottle",
        "minecraft:ominous_bottle"
      ],
      "use_duration": 20
    },
    {
      "name": "minecraft:potion",
      "stack_size": 16
    }
  ],
  "weapon_types": [
  ],
  "blocking_types": [
  ],
  "tiers": [
    
  ]
}

This is the default config, as it will be when you first launch the mod.

  • This can be modified if you want to, but ideally configurations should keep these as is.

Recommended Configs

These are configs which I suggest using for casual players, but due to the nature of this config being very versatile, no one config will be perfect for everyone, and these are simply as a basis for changes I recommend using. Feel free to mix and match as you like.

{
  "items": [
    {
      "name": [
        "minecraft:snowball",
        "minecraft:egg"
      ],
      "cooldown": 4,
      "cooldown_after": false
    },
    {
      "name": "minecraft:snowball",
      "stack_size": 64
    },
    {
      "name": [
        "minecraft:mushroom_stew",
        "minecraft:rabbit_stew",
        "minecraft:beetroot_soup",
        "minecraft:suspicious_stew",
        "minecraft:potion",
        "minecraft:splash_potion",
        "minecraft:lingering_potion",
        "minecraft:milk_bucket",
        "minecraft:honey_bottle",
        "minecraft:ominous_bottle"
      ],
      "use_duration": 20
    },
    {
      "name": "minecraft:potion",
      "stack_size": 16
    }
  ],
  "weapon_types": [
    {
      "name": "hoe",
      "tierable": true,
      "has_sword_enchants": true
    }
  ],
  "blocking_types": [
  ],
  "tiers": [
    
  ]
}

This particular config simply adds sword enchantments to the hoe. Nothing else. This is something which befits the hoe's nature as a weapon in this combat system, and matches the same being true for the axe by default.

{
  "items": [
    {
      "name": [
        "minecraft:snowball",
        "minecraft:egg"
      ],
      "cooldown": 4,
      "cooldown_after": false
    },
    {
      "name": "minecraft:snowball",
      "stack_size": 64
    },
    {
      "name": [
        "minecraft:mushroom_stew",
        "minecraft:rabbit_stew",
        "minecraft:beetroot_soup",
        "minecraft:suspicious_stew",
        "minecraft:potion",
        "minecraft:splash_potion",
        "minecraft:lingering_potion",
        "minecraft:milk_bucket",
        "minecraft:honey_bottle",
        "minecraft:ominous_bottle"
      ],
      "use_duration": 20
    },
    {
      "name": "minecraft:potion",
      "stack_size": 16
    },
    {
      "name": [
        "minecraft:golden_sword",
        "minecraft:golden_shovel",
        "minecraft:golden_axe",
        "minecraft:golden_pickaxe",
        "minecraft:golden_hoe",
        "combatify:golden_knife",
        "combatify:golden_longsword",
        "combatify:golden_shield"
      ],
      "tier": "better_gold"
    },
    {
      "name": [
        "minecraft:golden_helmet",
        "minecraft:golden_chestplate",
        "minecraft:golden_leggings",
        "minecraft:golden_boots",
        "minecraft:golden_horse_armor"
      ],
      "armor": {
        "helmet": 2,
        "chestplate": 6,
        "leggings": 5,
        "boots": 2,
        "any": 7
      },
      "armor_toughness": 2,
      "durability": {
        "helmet": 275,
        "chestplate": 400,
        "leggings": 375,
        "boots": 325,
        "any": 500
      }
    },
    {
      "name": [
        "minecraft:iron_helmet",
        "minecraft:iron_chestplate",
        "minecraft:iron_leggings",
        "minecraft:iron_boots",
        "minecraft:iron_horse_armor"
      ],
      "armor_toughness": 1
    }
  ],
  "weapon_types": [
    
  ],
  "blocking_types": [
  ],
  "tiers": [
    {
      "name": "better_gold",
      "base_tier": "gold",
      "uses": 500,
      "damage_bonus": 1,
      "mining_speed": 15.0,
      "mining_level": 2
    }
  ]
}

This particular config gives golden tools a better tier which is balanced around being an alternative to Diamond which is better in some ways and worse in others, as well as giving golden and iron armor better stats.

{
  "items": [
    {
      "name": [
        "minecraft:snowball",
        "minecraft:egg"
      ],
      "cooldown": 4,
      "cooldown_after": false
    },
    {
      "name": "minecraft:snowball",
      "stack_size": 64
    },
    {
      "name": [
        "minecraft:mushroom_stew",
        "minecraft:rabbit_stew",
        "minecraft:beetroot_soup",
        "minecraft:suspicious_stew",
        "minecraft:potion",
        "minecraft:splash_potion",
        "minecraft:lingering_potion",
        "minecraft:milk_bucket",
        "minecraft:honey_bottle",
        "minecraft:ominous_bottle"
      ],
      "use_duration": 20
    },
    {
      "name": "minecraft:potion",
      "stack_size": 16
    }
  ],
  "weapon_types": [
  ],
  "blocking_types": [
  ],
  "tiers": [
    
  ],
  "armor_calculation": "div[min(P,max(div[P/5],mul[P*sub{1-div[mul[2*D]/add{mul[7*T]+max(mul[4*P],30)}]}]))/min(mul[25*max(div[P/20],1)],add{add{P+div[P/8]}+2.5})]enchant:pow<0.945^E>"
}

This config simply adds new armor calculations I made myself, which balance out lower tiers by making them better than they were before while making higher tiers worse than they were before.

Clone this wiki locally