{"$schema":"http://json-schema.org/draft-07/schema#","title":"NTM 1.0.1 consumable_treatment","type":"object","properties":{"targets":{"description":"Item ID, #namespace:tag, or item-ID list.","markdownDescription":"Item ID, `#namespace:tag`, or item-ID list."},"trigger":{"description":"consume runs after the item's normal consumption finishes. use replaces the item's own use action: it runs immediately, consumes one held item and returns remainder.","markdownDescription":"`consume` runs after the item's normal consumption finishes. `use` replaces the item's own use action: it runs immediately, consumes one held item and returns `remainder`."},"block_when_potion_sick":{"type":"boolean","description":"Blocks starting use while potion sickness is active; default false.","markdownDescription":"Blocks starting use while potion sickness is active; default false."},"remainder":{"description":"Item ID returned by a use treatment; omission returns no item. Rejected with consume, which uses the item's vanilla remainder component.","markdownDescription":"Item ID returned by a `use` treatment; omission returns no item. Rejected with `consume`, which uses the item's vanilla remainder component."},"sound":{"description":"Sound-event ID or vanilla sound-event object played before actions.","markdownDescription":"Sound-event ID or vanilla sound-event object played before actions."},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","anyOf":[{"enum":["counter","damage","effect","potion_sickness","remove_effects"]},{"type":"string"}]}},"required":["type"],"allOf":[{"if":{"properties":{"type":{"const":"counter"}},"required":["type"]},"then":{"type":"object","properties":{"type":{"description":"counter.","markdownDescription":"`counter`."},"counter":{"description":"radiation, digamma, asbestos, or black_lung.","markdownDescription":"`radiation`, `digamma`, `asbestos`, or `black_lung`."},"operation":{"description":"add, set, or min.","markdownDescription":"`add`, `set`, or `min`."},"amount":{"type":"number","minimum":-1.7976931348623157e+308,"maximum":1.7976931348623157e+308,"description":"Operand; default 0. Add accepts a negative amount; set and min require nonnegative amounts. Lung-disease amounts are integers in [-i32::MAX, i32::MAX].\n\nRange: finite f64","markdownDescription":"Operand; default 0. Add accepts a negative amount; set and min require nonnegative amounts. Lung-disease amounts are integers in [-`i32::MAX`, `i32::MAX`].\n\nRange: finite `f64`"},"limit_divisor":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Uses the lung-disease maximum divided by this integer as the operand. Applies only to asbestos and black_lung; amount must be 0. Omit to use amount.\n\nRange: [1, i32::MAX]","markdownDescription":"Uses the lung-disease maximum divided by this integer as the operand. Applies only to asbestos and black_lung; amount must be 0. Omit to use amount.\n\nRange: [1, `i32::MAX`]"}},"required":["type","counter","operation"]}},{"if":{"properties":{"type":{"const":"damage"}},"required":["type"]},"then":{"type":"object","properties":{"type":{"description":"damage.","markdownDescription":"`damage`."},"sources":{"description":"Damage-type ID, #namespace:tag, or ID list. Use a nonempty selection.","markdownDescription":"Damage-type ID, `#namespace:tag`, or ID list. Use a nonempty selection."},"amount":{"type":"number","minimum":0,"maximum":3.4028234663852886e+38,"description":"Damage attempted per application.\n\nRange: [0, f32::MAX]","markdownDescription":"Damage attempted per application.\n\nRange: [0, `f32::MAX`]"},"repeat":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Number of damage applications after a successful roll; default 1.\n\nRange: [1, i32::MAX]","markdownDescription":"Number of damage applications after a successful roll; default 1.\n\nRange: [1, `i32::MAX`]"},"one_in":{"type":"integer","minimum":1,"maximum":2147483647,"description":"One successful roll per this many outcomes; default 1. The roll covers the entire action.\n\nRange: [1, i32::MAX]","markdownDescription":"One successful roll per this many outcomes; default 1. The roll covers the entire action.\n\nRange: [1, `i32::MAX`]"}},"required":["type","sources","amount"]}},{"if":{"properties":{"type":{"const":"effect"}},"required":["type"]},"then":{"type":"object","properties":{"type":{"description":"effect.","markdownDescription":"`effect`."},"effect":{"description":"Mob-effect ID.","markdownDescription":"Mob-effect ID."},"duration":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Duration in ticks.\n\nRange: [1, i32::MAX]","markdownDescription":"Duration in ticks.\n\nRange: [1, `i32::MAX`]"},"amplifier":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Zero-based effect level; default 0.\n\nRange: [0, i32::MAX]","markdownDescription":"Zero-based effect level; default 0.\n\nRange: [0, `i32::MAX`]"},"extend":{"type":"boolean","description":"Adds duration to the active effect duration; default false. The resulting duration must fit a signed integer.","markdownDescription":"Adds duration to the active effect duration; default false. The resulting duration must fit a signed integer."},"incurable":{"type":"boolean","description":"Applies the effect without normal cure items; default false.","markdownDescription":"Applies the effect without normal cure items; default false."}},"required":["type","effect","duration"]}},{"if":{"properties":{"type":{"const":"potion_sickness"}},"required":["type"]},"then":{"type":"object","properties":{"type":{"description":"potion_sickness.","markdownDescription":"`potion_sickness`."},"seconds":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Potion sickness duration before the mode multiplier.\n\nRange: [1, i32::MAX]","markdownDescription":"Potion sickness duration before the mode multiplier.\n\nRange: [1, `i32::MAX`]"}},"required":["type","seconds"]}},{"if":{"properties":{"type":{"const":"remove_effects"}},"required":["type"]},"then":{"type":"object","properties":{"type":{"description":"remove_effects.","markdownDescription":"`remove_effects`."},"effects":{"description":"Mob-effect ID, #namespace:tag, or mob-effect ID list to remove.","markdownDescription":"Mob-effect ID, `#namespace:tag`, or mob-effect ID list to remove."}},"required":["type","effects"]}}]},"description":"Ordered treatment actions; each entry selects its format with type.","markdownDescription":"Ordered treatment actions; each entry selects its format with type."}},"required":["targets","trigger","actions"]}