{
  "$id": "blockception.minecraft.behavior.entities.minecraft.projectile",
  "type": "object",
  "title": "Projectile",
  "description": "Allows the entity to be a thrown entity.",
  "additionalProperties": false,
  "properties": {
    "anchor": {
      "type": "integer",
      "description": "Allows you to choose an anchor point for where the projectile is fired from. 0 = Original point, 1 = EyeHeight, and 2 = Middle or body height.",
      "title": "Anchor",
      "default": 0
    },
    "angle_offset": {
      "type": "number",
      "default": 0,
      "description": "Alters the angle at which a projectile is vertically shot. Many splash potions in the game use this to offset their angles by -20 degrees.",
      "title": "Angle Offset"
    },
    "catch_fire": {
      "type": "boolean",
      "default": false,
      "description": "If true, the entity hit will be set on fire.",
      "title": "Catch Fire"
    },
    "crit_particle_on_hurt": {
      "type": "boolean",
      "default": false,
      "description": "If true, when a projectile deals damage, whether or not to spawn in the critical damage particles.",
      "title": "Crit Particle On Hurt"
    },
    "destroy_on_hurt": {
      "type": "boolean",
      "default": false,
      "description": "When this projectile deals damage, whether or not to immediately destroy this projectile.",
      "title": "Destroy On Hurt"
    },
    "filter": {
      "type": "string",
      "description": "Entity Definitions defined here can't be hurt by the projectile.",
      "title": "Filter"
    },
    "fire_affected_by_griefing": {
      "type": "boolean",
      "default": false,
      "description": "If true, whether the projectile causes fire is affected by the mob griefing game rule.",
      "title": "Fire Affected By Griefing"
    },
    "gravity": {
      "type": "number",
      "default": 0.05,
      "description": "The gravity applied to this entity when thrown. When this actor is not on the ground, subtracts this amount from the actors change in vertical position every tick. The higher the value, the faster the entity falls.",
      "title": "Gravity"
    },
    "hit_nearest_passenger": {
      "type": "boolean",
      "default": false,
      "title": "Hit Nearest Passenger",
      "description": "If true, when hitting a vehicle, and there's at least one passenger in the vehicle, the damage will be dealt to the passenger closest to the projectile impact point. If there are no passengers, this setting does nothing."
    },
    "ignored_entities": {
      "title": "Ignored Entities",
      "description": "[EXPERIMENTAL] An array of strings defining the types of entities that this entity does not collide with.",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "hit_ground_sound": {
      "$ref": "../../../../general/sound_event.json",
      "default": "",
      "description": "The sound that plays when the projectile hits the ground.",
      "title": "Hit Ground Sound"
    },
    "hit_sound": {
      "$ref": "../../../../general/sound_event.json",
      "default": "",
      "description": "The sound that plays when the projectile hits something.",
      "title": "Hit Sound"
    },
    "homing": {
      "type": "boolean",
      "default": false,
      "description": "If true, the projectile homes in to the nearest entity.",
      "title": "Homing"
    },
    "inertia": {
      "type": "number",
      "default": 0.99,
      "description": "The fraction of the projectile's speed maintained every frame while traveling in air.",
      "title": "Inertia"
    },
    "is_dangerous": {
      "type": "boolean",
      "default": false,
      "description": "If true, the projectile will be treated as dangerous to the players.",
      "title": "Is Dangerous"
    },
    "knockback": {
      "type": "boolean",
      "default": true,
      "description": "If true, the projectile will knock back the entity it hits.",
      "title": "Knockback"
    },
    "lightning": {
      "type": "boolean",
      "default": false,
      "description": "If true, the entity hit will be struck by lightning.",
      "title": "Lightning"
    },
    "liquid_inertia": {
      "type": "number",
      "default": 0.6,
      "description": "The fraction of the projectile's speed maintained every frame while traveling in water.",
      "title": "Liquid Inertia"
    },
    "multiple_targets": {
      "type": "boolean",
      "default": true,
      "description": "If true, the projectile can hit multiple entities per flight.",
      "title": "Multiple Targets"
    },
    "mob_effect": {
      "title": "Mob Effect",
      "$comment": "Deprecated",
      "description": "SEE on_hit/mob_effect."
    },
    "offset": {
      "type": "array",
      "default": [ 0, 0.0, 0 ],
      "description": "The offset from the entity's anchor where the projectile will spawn.",
      "title": "Offset",
      "$ref": "../../../../general/vectors/number3.json"
    },
    "on_fire_time": {
      "type": "number",
      "default": 5,
      "description": "Time in seconds that the entity hit will be on fire for.",
      "title": "On Fire Time"
    },
    "on_hit": {
      "additionalProperties": false,
      "type": "object",
      "description": "Defines the behaviors that may execute on a projectile's hit, including impact damage, impact effect, and stuck in ground. See more on these parameters below.",
      "title": "On Hit",
      "properties": {
        "arrow_effect": {
          "title": "Arrow Effect",
          "type": "object",
          "description": "The target receives a mob effect. See the table below for all arrow_effect parameters.",
          "additionalProperties": false,
          "properties": {
            "apply_effect_to_blocking_targets": {
              "type": "boolean",
              "title": "Apply Effect To Blocking Targets",
              "description": "If true, the effect will be applied to blocking targets."
            }
          }
        },
        "catch_fire": {
          "title": "Catch Fire",
          "type": "boolean",
          "default": false,
          "description": "Determines if the struck object is set on fire."
        },
        "definition_event": {
          "title": "Definition Event",
          "type": "object",
          "description": "The event that is triggered on a hit. See the table below for all definition event parameters.",
          "additionalProperties": false,
          "properties": {
            "affect_projectile": {
              "title": "Affect Projectile",
              "type": "boolean",
              "default": false,
              "description": "The projectile that will be affected by this event."
            },
            "affect_shooter": {
              "title": "Affect Shooter",
              "type": "boolean",
              "default": false,
              "description": "The shooter that will be affected by this event."
            },
            "affect_splash_area": {
              "title": "Affect Splash Area",
              "type": "boolean",
              "default": false,
              "description": "All entities in the splash area will be affected by this event."
            },
            "affect_target": {
              "title": "Affect Target",
              "type": "boolean",
              "default": false,
              "description": "The target will be affected by this event."
            },
            "event_trigger": {
              "title": "Event Trigger",
              "description": "The event triggered. Also has an option filters parameter to limit affected targets.",
              "$ref": "../types/event.json"
            },
            "splash_area": {
              "title": "Splash Area",
              "type": "number",
              "default": 0.0,
              "description": "The splash area that will be affected."
            }
          }
        },
        "douse_fire": {
          "title": "Douse Fire",
          "description": "If the target is on fire, then douse the fire.",
          "type": "boolean",
          "default": false
        },
        "freeze_on_hit": {
          "title": "Freeze On Hit",
          "type": "object",
          "description": "An area of entities that is frozen to block on hits. Has shape of either sphere or cube, snap_to_block boolean ,and size decimal properties.",
          "additionalProperties": false,
          "properties": {
            "shape": {
              "enum": [ "sphere", "cube" ],
              "default": "sphere",
              "description": "The shape of the area that is frozen.",
              "title": "Shape"
            },
            "snap_to_block": {
              "type": "boolean",
              "default": false,
              "description": "If true, the area will snap to the nearest block.",
              "title": "Snap To Block"
            },
            "size": {
              "type": "number",
              "default": 0.0,
              "description": "The size of the area that is frozen.",
              "title": "Size"
            }
          }
        },
        "grant_xp": {
          "title": "Grant XP",
          "type": "object",
          "description": "Grants XP on hit. Has minXP for minimum XP granted, maxXp for maximum, or simply flat xp properties.",
          "additionalProperties": false,
          "properties": {
            "minXP": {
              "title": "Min XP",
              "type": "number",
              "default": 0,
              "description": "The minimum XP granted."
            },
            "maxXP": {
              "title": "Max XP",
              "type": "number",
              "default": 0,
              "description": "The maximum XP granted."
            }
          }
        },
        "hurt_owner": {
          "title": "Hurt Owner",
          "type": "object",
          "description": "Determines if the owner of the entity is hurt on hit. Contains decimal owner_damage, knockback boolean, and ignite boolean.",
          "additionalProperties": false,
          "properties": {
            "owner_damage": {
              "title": "Owner Damage",
              "type": "number",
              "default": 0,
              "description": "The amount of damage the owner will take."
            },
            "knockback": {
              "title": "Knockback",
              "type": "boolean",
              "default": false,
              "description": "If true, the owner will be knocked back."
            },
            "ignite": {
              "title": "Ignite",
              "type": "boolean",
              "default": false,
              "description": "If true, the owner will be set on fire."
            }
          }
        },
        "ignite": {
          "title": "Ignite",
          "type": "boolean",
          "default": false,
          "description": "Determines if a fire may be started on a flammable target."
        },
        "impact_damage": {
          "title": "Impact Damage",
          "type": "object",
          "description": "Defines the damage that an entity may receive on being hit by this projectile. See the table below for all impact_damage parameters.",
          "additionalProperties": false,
          "properties": {
            "catch_fire": {
              "title": "Catch Fire",
              "description": "Determines if the struck object is set on fire.",
              "type": "boolean",
              "default": false
            },
            "channeling": {
              "title": "Channeling",
              "type": "boolean",
              "default": true,
              "description": "Whether lightning can be channeled through hte weapon."
            },
            "damage": {
              "title": "Damage",
              "description": "The damage dealt on impact.",
              "oneOf": [
                { "type": "number", "default": 1 },
                {
                  "type": "array",
                  "items": [
                    { "type": "number", "title": "Min" },
                    { "type": "number", "title": "Max" }
                  ]
                }
              ]
            },
            "destroy_on_hit": {
              "title": "Destroy On Hit",
              "type": "boolean",
              "default": false,
              "description": "Projectile is removed on hit."
            },
            "destroy_on_hit_requires_damage": {
              "title": "Destroy On Hit Requires Damage",
              "type": "boolean",
              "default": true,
              "description": "If true, then the hit must cause damage to destroy the projectile."
            },
            "filter": {
              "title": "Filter",
              "type": "string",
              "default": "not set",
              "description": "The identifier of an entity that can be hit."
            },
            "knockback": {
              "title": "Knockback",
              "type": "boolean",
              "default": true,
              "description": "If true, the projectile will knock back the entity it hits."
            },
            "max_critical_damage": {
              "title": "Max Critical Damage",
              "type": "integer",
              "description": "Maximum critical damage."
            },
            "min_critical_damage": {
              "title": "Min Critical Damage",
              "type": "integer",
              "default": 0,
              "description": "Minimum critical damage."
            },
            "power_multiplier": {
              "title": "Power Multiplier",
              "type": "number",
              "default": 2.0,
              "description": "How much the base damage is multiplied."
            },
            "semi_random_diff_damage": {
              "title": "Semi Random Diff Damage",
              "type": "boolean",
              "default": false,
              "description": "If true, damage will be randomized based on damage and speed."
            },
            "set_last_hurt_requires_damage": {
              "title": "Set Last Hurt Requires Damage",
              "type": "boolean",
              "default": false,
              "description": "If true, then the hit must cause damage to update the last hurt property."
            },
            "should_bounce": {
              "title": "Should Bounce",
              "description": "If true, the projectile will bounce",
              "type": "boolean",
              "default": false
            }
          }
        },
        "mob_effect": {
          "title": "Mob Effect",
          "type": "object",
          "description": "The target receives a mob effect. See the table below for all mob_effect parameters.",
          "additionalProperties": false,
          "properties": {
            "ambient": {
              "title": "Ambient",
              "type": "boolean",
              "default": false,
              "description": "If true, a mob will spawn that is not hostile, like the bat entity in Minecraft."
            },
            "amplifier": {
              "title": "Amplifier",
              "type": "integer",
              "default": 1,
              "description": "The multiplier of the amplification of this effect."
            },
            "duration": {
              "title": "Duration",
              "type": "integer",
              "default": 1,
              "description": "The effect's duration."
            },
            "durationeasy": {
              "title": "Duration Easy",
              "type": "integer",
              "default": 0,
              "description": "The effect's duration on easy mode."
            },
            "durationhard": {
              "title": "Duration Hard",
              "type": "integer",
              "default": 800,
              "description": "The effect's duration on hard mode."
            },
            "durationnormal": {
              "title": "Duration Normal",
              "type": "integer",
              "default": 200,
              "description": "The effect's duration on normal mode."
            },
            "effect": {
              "title": "Effect",
              "$ref": "../../../../general/vanilla/effect.json",
              "description": "The identifier of the mob entity to affect."
            },
            "visible": {
              "title": "Visible",
              "type": "boolean",
              "default": false,
              "description": "Does the entity's look change."
            }
          }
        },
        "on_fire_time": {
          "title": "On Fire Time",
          "type": "number",
          "default": 0.0,
          "description": "The amount of time a target will remain on fire."
        },
        "particle_on_hit": {
          "title": "Particle On Hit",
          "type": "object",
          "description": "The particles that spawn on hit. See the table below for all particle_on_hit parameters.",
          "additionalProperties": false,
          "properties": {
            "num_particles": {
              "title": "Num Particles",
              "type": "number",
              "default": 6,
              "description": "The number of particles to spawn."
            },
            "on_entity_hit": {
              "title": "On Entity Hit",
              "type": "boolean",
              "default": false,
              "description": "If true, spawns particles on an entity hit."
            },
            "on_other_hit": {
              "title": "On Other Hit",
              "type": "boolean",
              "default": false,
              "description": "If true, spawns particles on any other hit."
            },
            "particle_type": {
              "title": "Particle Type",
              "type": "string",
              "default": "not set",
              "description": "The id of the particle to spawn on hit."
            }
          }
        },
        "potion_effect": {
          "title": "Potion Effect",
          "type": "integer",
          "default": -1,
          "description": "Defines the effect the arrow will apply to the entity it hits."
        },
        "remove_on_hit": {
          "title": "Remove On Hit",
          "type": "object",
          "description": "Removes the projectile.",
          "additionalProperties": true,
          "properties": { }
        },
        "spawn_aoe_cloud": {
          "title": "Spawn AOE Cloud",
          "type": "object",
          "default": false,
          "description": "Potion spawns an area of effect cloud. See the table below for all spawn_aoe_cloud parameters.",
          "additionalProperties": false,
          "properties": {
            "affect_owner": {
              "title": "Affect Owner",
              "type": "boolean",
              "default": true,
              "description": "Determines if the projectile shooter is affected."
            },
            "color": {
              "title": "Color",
              "type": "array",
              "description": "Particle color defined by three rgb values.",
              "$ref": "../../../../general/vectors/number3.json"
            },
            "duration": {
              "title": "Duration",
              "type": "integer",
              "default": 0,
              "description": "How long the particle emits."
            },
            "particle": {
              "title": "Particle",
              "type": "string",
              "description": "The particle emitter."
            },
            "potion": {
              "title": "Potion",
              "type": "integer",
              "default": -1,
              "description": "The id of the potion."
            },
            "radius": {
              "title": "Radius",
              "type": "number",
              "default": 0,
              "description": "Defines the affected area."
            },
            "radius_on_use": {
              "title": "Radius On Use",
              "type": "number",
              "default": -1,
              "description": "Defines the affected area when potion is used."
            },
            "reapplication_delay": {
              "title": "Reapplication Delay",
              "type": "integer",
              "default": 0,
              "description": "Delay before the potion can affect the area again."
            }
          }
        },
        "spawn_chance": {
          "title": "Spawn Chance",
          "type": "object",
          "description": "Contains information on the chance of spawning an entity on hit. See parameters below.",
          "additionalProperties": false,
          "properties": {
            "first_spawn_count": {
              "title": "First Spawn Count",
              "type": "integer",
              "default": 0,
              "description": "The amount of new entities spawned."
            },
            "first_spawn_percent_chance": {
              "title": "First Spawn Percent Chance",
              "type": "number",
              "default": 0,
              "description": "The chance that a spawn occurs when a projectile hits the entity."
            },
            "first_spawn_chance": {
              "title": "First Spawn Chance",
              "type": "number",
              "default": 8,
              "description": "The chance that a first spawn occurs when a projectile hits the entity."
            },
            "second_spawn_chance": {
              "title": "Second Spawn Chance",
              "type": "number",
              "default": 32,
              "description": "The chance that a second spawn occurs when a projectile hits the entity."
            },
            "second_spawn_count": {
              "title": "Second Spawn Count",
              "type": "integer",
              "default": 0,
              "description": "The amount of new entities spawned in teh second spawn."
            },
            "spawn_baby": {
              "title": "Spawn Baby",
              "type": "boolean",
              "default": false,
              "description": "Determines if a baby spawns."
            },
            "spawn_definition": {
              "title": "Spawn Definition",
              "type": "string",
              "default": "not set",
              "description": "The entity that will spawn."
            }
          }
        },
        "stick_in_ground": {
          "title": "Stick In Ground",
          "type": "object",

          "description": "Decides if the object sticks in ground and contains shake_time integer parameter to determine how long it will shake."
        },
        "teleport_owner": {
          "title": "Teleport Owner",
          "description": "Determines if the owner is transported on hit.",
          "type": "boolean",
          "default": false
        },
        "thrown_potion_effect": {
          "title": "Thrown Potion Effect",
          "type": "object",
          "description": "Creates a splash area for effects caused by a thrown potion."
        }
      }
    },
    "particle": {
      "type": "string",
      "default": "iconcrack",
      "description": "Particle to use upon collision.",
      "title": "Particle"
    },
    "potion_effect": {
      "type": "integer",
      "default": -1,
      "description": "Defines the effect the arrow will apply to the entity it hits.",
      "title": "Potion Effect"
    },
    "power": {
      "type": "number",
      "default": 1.3,
      "description": "Determines the velocity of the projectile.",
      "title": "Power"
    },
    "reflect_immunity": {
      "type": "number",
      "default": 0,
      "description": "During the specified time, in seconds, the projectile cannot be reflected by hitting it",
      "title": "Reflect Immunity"
    },
    "reflect_on_hurt": {
      "type": "boolean",
      "default": false,
      "description": "If true, this entity will be reflected back when hit.",
      "title": "Reflect On Hurt"
    },
    "semi_random_diff_damage": {
      "type": "boolean",
      "default": false,
      "description": "If true, damage will be randomized based on damage and speed.",
      "title": "Semi Random Diff Damage"
    },
    "shoot_sound": {
      "$ref": "../../../../general/sound_event.json",
      "default": "",
      "description": "The sound that plays when the projectile is shot.",
      "title": "Shoot Sound"
    },
    "shoot_target": {
      "type": "boolean",
      "default": true,
      "description": "If true, the projectile will be shot towards the target of the entity firing it.",
      "title": "Shoot Target"
    },
    "should_bounce": {
      "type": "boolean",
      "default": false,
      "description": "If true, the projectile will bounce upon hit.",
      "title": "Should Bounce"
    },
    "splash_potion": {
      "type": "boolean",
      "default": false,
      "description": "If true, the projectile will be treated like a splash potion.",
      "title": "Splash Potion"
    },
    "splash_range": {
      "type": "number",
      "default": 4,
      "description": "Radius in blocks of the 'splash' effect.",
      "title": "Splash Range"
    },
    "stop_on_hurt": {
      "title": "Stop On Hurt",
      "type": "boolean",
      "description": "Determines if the projectile stops when the target is hurt."
    },
    "uncertainty_base": {
      "type": "number",
      "default": 0,
      "description": "The base accuracy. Accuracy is determined by the formula uncertaintyBase - difficultyLevel * uncertaintyMultiplier.",
      "title": "Uncertainty Base"
    },
    "uncertainty_multiplier": {
      "type": "number",
      "default": 0,
      "description": "Determines how much difficulty affects accuracy. Accuracy is determined by the formula uncertaintyBase - difficultyLevel * uncertaintyMultiplier.",
      "title": "Uncertainty Multiplier"
    }
  },
  "examples": [
    {
      "anchor": 0,
      "angle_offset": 0,
      "catch_fire": false,
      "crit_particle_on_hurt": false,
      "destroy_on_hurt": false,
      "filter": "",
      "fire_affected_by_griefing": false,
      "gravity": 0.05,
      "hit_sound": "",
      "homing": false,
      "inertia": 0.99,
      "is_dangerous": false,
      "knockback": true,
      "lightning": false,
      "liquid_inertia": 0.6,
      "multiple_targets": true,
      "offset": [ ],
      "on_fire_time": 5,
      "on_hit": { },
      "particle": "iconcrack",
      "potion_effect": -1,
      "power": 1.3,
      "reflect_on_hurt": false,
      "semi_random_diff_damage": false,
      "shoot_sound": "",
      "shoot_target": true,
      "should_bounce": false,
      "splash_potion": false,
      "splash_range": 4,
      "uncertainty_base": 0,
      "uncertainty_multiplier": 0
    }
  ]
}
