{
  "code": "spear",
  "class": "CombatOverhaul:MeleeWeapon",
  "tags": ["weapon", "weapon-melee", "weapon-ranged", "projectile", "spear", "polearm", "onehanded", "twohanded"],
  "behaviors": [
    {
      "name": "GroundStorable",
      "properties": {
        "layout": "WallHalves",
        "wallOffY": 3,
        "sprintKey": true,
        "selectionBox": {"x1": 0, "y1": 0, "z1": 0, "x2": 1, "y2": 0.1, "z2": 1},
        "collisionBox": {"x1": 0, "y1": 0, "z1": 0, "x2": 0, "y2": 0, "z2": 0}
      }
    },
    {
      "name": "CombatOverhaul:Projectile",
      "properties": {
        "stats": {
          "AdditionalDurabilityCost": 0,
          "CollisionRadius": 0.05,
          "DamageStats": {"DamageType": "PiercingAttack", "Damage": 3},
          "HitSound": "game:sounds/player/projectilehit",
          "SpeedThreshold": 0.3,
          "Knockback": 0.3,
          "EntityCode": "combatoverhaul:spear-generic-{material}",
          "DurabilityDamage": 1,
          "DropChance": 1
        }
      }
    }
  ],
  "variantgroups": [{"code": "type", "states": ["scrap"]}, {"code": "material", "states": ["scrap"]}],
  "tool": "spear",
  "shape": {"base": "combatoverhaul:weapons/spears/spear-{material}"},
  "attributes": {
    "groundStorageTransform": {"translation": {"x": 0.5, "y": 2, "z": 0.41}, "rotation": {"x": 12, "y": 0, "z": 90}, "origin": {"x": 0, "y": 0, "z": 0}, "scale": 0.8},
    "toolrackTransform": {"translation": {"x": 1.6, "y": 1.2, "z": 0.5}, "rotation": {"x": 90, "y": -2, "z": 0}, "origin": {"x": 0, "y": 0, "z": 0}, "scale": 1.3},
    "ProficiencyStat": "spearsProficiency",
    "RenderingOffset": false,
    "OneHandedStance": {
      "CanAttack": true,
      "CanParry": false,
      "CanBlock": false,
      "CanSprint": true,
      "CanThrow": true,
      "SpeedPenalty": 0,
      "AttackCooldownMs": 550,
      "GripLengthFactor": 0,
      "GripMinLength": 0,
      "GripMaxLength": 0,
      "Attack": {
        "StopOnTerrainHit": false,
        "StopOnEntityHit": false,
        "CollideWithTerrain": true,
        "MaxReach": 9,
        "DamageTypes": [{"Damage": {"DamageType": "PiercingAttack", "Tier": 2, "Damage": 3.5}, "Knockback": 0.5, "DurabilityDamage": 1, "Collider": [0, 0, 0.5, 1.2, 0, 0.5]}]
      },
      "HandleAttack": {
        "StopOnTerrainHit": true,
        "StopOnEntityHit": false,
        "CollideWithTerrain": true,
        "MaxReach": 9,
        "DamageTypes": [{"Damage": {"DamageType": "BluntAttack", "Tier": 0, "Damage": 1}, "Knockback": 1, "DurabilityDamage": 1, "Collider": [0, 0, 0.5, -2.5, 0, 0.5]}]
      },
      "HandleHitSound": "game:sounds/thud",
      "AttackAnimation": {"Main": ["combatoverhaul:spear-thrust-1h"]},
      "TpAttackAnimation": {"Main": "combatoverhaul-falx-slash"},
      "ReadyAnimation": "combatoverhaul:spear-ready-1h",
      "IdleAnimation": "combatoverhaul:spear-idle-1h",
      "AttackTpAnimation": "spearhit"
    },
    "TwoHandedStance": {
      "CanAttack": true,
      "CanParry": false,
      "CanBlock": false,
      "CanSprint": true,
      "CanThrow": true,
      "SpeedPenalty": 0,
      "AttackCooldownMs": 500,
      "BlockCooldownMs": 750,
      "GripLengthFactor": 4,
      "GripMinLength": 0,
      "GripMaxLength": 20,
      "Attack": {
        "StopOnTerrainHit": false,
        "StopOnEntityHit": false,
        "CollideWithTerrain": true,
        "MaxReach": 15,
        "DamageTypes": [{"Damage": {"DamageType": "PiercingAttack", "Tier": 2, "Damage": 4.5}, "Knockback": 0.5, "DurabilityDamage": 1, "Collider": [0, 0, 0.5, 1.2, 0, 0.5]}]
      },
      "HandleAttack": {
        "StopOnTerrainHit": true,
        "StopOnEntityHit": false,
        "CollideWithTerrain": true,
        "MaxReach": 9,
        "DamageTypes": [{"Damage": {"DamageType": "BluntAttack", "Tier": 0, "Damage": 0}, "Knockback": 0, "DurabilityDamage": 0, "Collider": [0, 0, 0.5, -2.5, 0, 0.5]}]
      },
      "HandleHitSound": "game:sounds/thud",
      "AttackDirectionsType": "None",
      "AttackAnimation": {"Main": ["combatoverhaul:spear-thrust-2h-1", "combatoverhaul:spear-thrust-2h-2", "combatoverhaul:spear-thrust-2h-3"]},
      "ReadyAnimation": "combatoverhaul:spear-ready-2h",
      "IdleAnimation": "combatoverhaul:spear-idle-2h"
    },
    "ThrowAttack": {
      "AimAnimation": "combatoverhaul:javelin-aim",
      "ThrowAnimation": "combatoverhaul:javelin-throw",
      "Aiming": {
        "AimDifficulty": 1,
        "CursorType": "Fixed",
        "AccuracyOvertimeSec": 0,
        "CursorTextureReady": "combatoverhaul:gui/aiming/arrow-full.png",
        "CursorTextureNotReady": "combatoverhaul:gui/aiming/arrow-part.png",
        "AllowSprint": true,
        "MoveSpeedPenalty": 0.1,
        "AimDrift": 60,
        "AimTwitch": 4,
        "AnimationFollowX": 5.5,
        "AnimationFollowY": 5.5,
        "VerticalLimit": 0.25,
        "VerticalOffset": -0.05
      },
      "DamageStrengthByType": {"*-scrap": 3},
      "Knockback": 1,
      "DurabilityDamage": 1,
      "Velocity": 0.9,
      "Zeroing": 2.5
    }
  },
  "durabilitybytype": {
    "*-copper": 300,
    "*-tinbronze": 500,
    "*-bismuthbronze": 400,
    "*-blackbronze": 600,
    "*-iron": 400,
    "*-meteoriciron": 600,
    "*-ornategold": 600,
    "*-ornatesilver": 500,
    "*-steel": 1250,
    "*-flint": 150,
    "*-obsidian": 100,
    "*": 100
  },
  "creativeinventory": {"general": ["*"], "items": ["*"], "tools": ["*"], "combatoverhaul": ["*"]},
  "guiTransform": {"translation": {"x": 0, "y": 0, "z": 0}, "rotation": {"x": 39, "y": 0, "z": -130}, "origin": {"x": 1, "y": 0.1, "z": 0.3}, "scale": 2},
  "groundTransform": {"translation": {"x": 0, "y": 0, "z": 0}, "rotation": {"x": -90, "y": 0, "z": 0}, "origin": {"x": 0.6, "y": 0, "z": 0.4}, "scale": 4},
  "tpHandTransform": {"translation": {"x": -2.5, "y": 0.05, "z": 0.5}, "rotation": {"x": 0, "y": 0, "z": 0}, "origin": {"x": 0, "y": 0, "z": 0}, "scale": 0.8}
}