Module: Custom Statuses - pearuhdox/Cartographer GitHub Wiki
Custom Statuses is a module provided in Cartographer. It adds new status effects or modifies existing ones, which can be applied to mobs. Custom Enchantments utilizes its features, and without this module, several enchantments in Custom Enchantments will not function.
Positive Statuses
Cleansing
Cleansing will remove negative effects from players who obtain it.
To give a player cleansing, give them any duration of Nausea 101 (Amplifier:100b)
or /effect give @s nausea 1 100
Cloaked
While an enemy is Cloaked, it receives Invisibility. It creates particles and sounds around it to hint at its location. When a cloaked enemy receives damage, it loses 3 seconds of Cloaked. A Cloaked enemy loses its invisibility temporarily if within 3 blocks of a player. Cloaked is applied by some effects in Mob Abilities.
Negative Statuses (Vanilla Effects)
Blindness
Modifies the vanilla Blindness stat to work on mobs.
While an enemy is afflicted with Blindness, it loses 90% Follow Range, severely reducing the mob's follow distance and sight distance.
Since this is a modification to an existing vanilla debuff, vanilla Blindness will be affected too.
To make a mob blind, give it vanilla Blindness.
Vanilla Effect Application
With Custom Statuses, items can be made to apply both vanilla and custom effects when they are used to attack mobs.
To add this behavior to an item for vanilla potion effects, an example of this syntax is provided here:
give @s diamond_sword{apply_effects:[{id:"minecraft:slowness",duration:80,amplifier:1b}]}
Place all applied potion effects inside the apply_effects nbt data, in identical format to how they would be on a custom potion. You can copy the syntax of potion data from a website like MCStacker, so long as it is placed inside of an apply_effects:[] data array.
Negative Statuses (Custom Effects)
Bleeding
While an enemy is Bleeding, it takes damage every second, equal to the amount/potency of Bleeding. When Bleeding damage is taken, the remaining amount of Bleeding is cut in half. When Bleeding is added to a mob, it will add onto any existing Bleeding.
Brittle
When an enemy is Brittle, an amount of damage appears above their head. Taking that damage before the effect expires activates Brittle, which will then damage the mob and close nearby mobs, and remove the effect. The amount of damage required to trigger the activation, and the damage Brittle does are dependent on the effect's level. (2x the level to activate, and 1.5x the level for the damage received.)
Exposed
Enemies with Exposed take additional damage, based on the level of the effect. Exposed enemies take 10% additional damage per level.
Charmed
When an enemy is Charmed, it becomes blinded for 1 second. When the blind expires, the target attacks the nearest hostile mob to it for the specified duration. Charmed mobs move 100% faster for the first second of the effect, then they move 40% faster until the effect expires. Charmed Creepers will instead instantly start to blow up. Charmed cannot be applied again to an enemy for a short time after the effect wears off.
Infection
While an enemy is Infected, it takes 1.5 damage every second. When an Infected enemy dies, it will spread Infection to the closest 2 (not currently Infected) enemies within 6 blocks. (The duration of the spread will be shared from the remaining time of Infection on the original mob.) If there are no enemies to spread it to, it deals 6 damage in a small AoE (3 block radius) instead. Enemies Infection spreads to are briefly slowed and weakened (3 Second Duration, Slowness and Weakness 1). They also take a tick (1.5 damage) of Infection damage.
Polymorphed
While an enemy is Polymorphed, it is briefly turned into a Chicken with matching Health. If killed as a chicken, it drops cooked meat. It stays turned for the specified duration, and if not killed, is reverted back to the original mob it was, with the health it still had.
Polymorphed cannot be applied to an enemy for a short time after they de-transform.
Oiled
While an enemy is Oiled, nothing happens immediately. If an enemy is lit on fire while Oiled, they will ignite the Oiled effect. The effect will gain the same duration as the fire tick, and deal additional damage to the mob on each fire tick equivalent to the level of Oiled. As long as the mob stays on fire, Oiled will continue to damage the mob even if the duration of the effect would otherwise have ended.
Shackled
While an enemy is Shackled, 25% of the damage it takes will also be dealt to any other Shackled mob within 20 blocks.
Shocking
While an enemy is Shocked, it takes 1 damage every second. When it takes damage from Shocked, it also deals 0.5 damage to the closest 3 mobs within 3.5 blocks. Every third damage tick, it stuns itself for 0.75 seconds and knocking back the neighboring targets.
Shocked targets can deal damage to each other, and the damage ticks are increased proportionally.
Targets in water are stunned and knocked back every other damage tick instead.
Stunned
While an enemy is Stunned, it cannot move, attack, or cast an active ability. Any active ability this mob was casting is cancelled and put on a short cooldown.
Additionally, all knockback the stunned target receives is inflicted at the end of the stun effect.
Custom Effect Application
With Custom Statuses, items can be made to apply both vanilla and custom effects when they are used to attack mobs.
To add this behavior to an item for custom status effects, an example of each syntax is provided here. Duration is set in ticks, and amplifier is equivalent to vanilla (0b is level 1).
/give @s splash_potion{apply_status:[{Id:"bleeding",amplifier:4b}]}
(Amplifier is the total bleed added, where 0b is 1 stack, and +1 stack per level.)
/give @s diamond_sword{apply_status:[{id:"shocked",duration:100}]}
/give @s diamond_sword{apply_status:[{id:"infected",duration:100}]}
/give @s diamond_sword{apply_status:[{id:"cloaked",duration:100}]}
/give @s diamond_sword{apply_status:[{id:"stunned",duration:20}]}
/give @s diamond_sword{apply_status:[{id:"charmed",duration:120}]}
/give @s diamond_sword{apply_status:[{id:"morphed",duration:100}]}
/give @s diamond_sword{apply_status:[{id:"exposed",duration:120,amplifier:1b}]}
/give @s diamond_sword{apply_status:[{id:"brittle",duration:120,amplifier:1b}]}
/give @s diamond_sword{apply_status:[{id:"oiled",duration:120,amplifier:1b}]}
/give @s diamond_sword{apply_status:[{id:"shackled",duration:120}]}
On splash or lingering potions the structure of the data is similar, but the NBT is called "custom_statuses". Potions also have two additional background effects, "fire" and "entropy". Fire will apply fire tick to the hit mobs, and Entropy will apply basic damage (unlike Instant Health/Damage):
/give @s splash_potion{custom_statuses:[{id:"bleeding",amplifier:4b}]}
(Amplifier is the total bleed added, where 0b is 1 stack, and +1 stack per level.)
/give @s splash_potion{custom_statuses:[{id:"shocked",duration:100}]}
/give @s splash_potion{custom_statuses:[{id:"infected",duration:100}]}
/give @s splash_potion{custom_statuses:[{id:"cloaked",duration:100}]}
/give @s splash_potion{custom_statuses:[{id:"stunned",duration:20}]}
/give @s splash_potion{custom_statuses:[{id:"charmed",duration:120}]}
/give @s splash_potion{custom_statuses:[{id:"morphed",duration:100}]}
/give @s splash_potion{custom_statuses:[{id:"exposed",duration:120,amplifier:1b}]}
/give @s splash_potion{custom_statuses:[{id:"brittle",duration:120,amplifier:1b}]}
/give @s splash_potion{custom_statuses:[{id:"oiled",duration:120,amplifier:1b}]}
/give @s splash_potion{custom_statuses:[{id:"shackled",duration:120}]}
/give @s splash_potion{custom_statuses:[{id:"fire",duration:100}]}
(Duration is the length of fire tick inflicted, in ticks)
/give @s splash_potion{custom_statuses:[{id:"entropy",amplifier:5b}]}
(Amplifier is damage dealt, where 0 is 1 damage, and each level is +1 damage.)
In both custom_statuses and apply_status, a percent chance can be given on each effect to make effects not always apply. Without setting this, the chance is set to 100%. Below is an example of an item that has a 50% chance of inflicting Bleeding. A chance value of 50 is equal to 50%. Chances can be set independently for each status.
/give @s diamond_sword{apply_status:[{id:"bleeding",amplifier:4b,chance:50}]}
Override Flags
The following tags can be added to items to modify the conditions on which effects (custom and vanilla potion effects) are inflicted.
Melee
Syntax: /give @s diamond_boots{HasOverride:1b,OverrideMelee:1b,apply_status:[{id:"bleeding",amplifier:2b}]}
Grants your melee attacks this effect application while wearing or holding an item with this data.
Ranged
Syntax: /give @s diamond_boots{HasOverride:1b,OverrideRanged:1b,apply_status:[{id:"bleeding",amplifier:2b}]}
Grants your ranged attacks this effect application while wearing or holding an item with this data.
Critical Hits
Syntax: /give @s diamond_sword{HasOverride:1b,OverrideCrit:1b,apply_status:[{id:"bleeding",amplifier:2b}]}
Grants your melee critical hits this effect application while wearing or holding an item with this data.
Sneak Attacks
Syntax: /give @s diamond_sword{HasOverride:1b,OverrideSneak:1b,apply_status:[{id:"bleeding",amplifier:2b}]}
Grants your melee sneak attacks this effect application while wearing or holding an item with this data.
Override Sprint
Syntax: /give @s diamond_sword{HasOverride:1b,OverrideSprint:1b,apply_status:[{id:"bleeding",amplifier:2b}]}
Grants your melee sprint attacks this effect application while wearing or holding an item with this data.
Allow Melee Inflict
Syntax: /give @s bow{AllowMeleeInflict:1b,apply_status:[{id:"bleeding",amplifier:2b}]}
Allows a weapon like a bow to inflict its effects on melee hit in addition to ranged hits.
Allow Offhand Inflict
Syntax: /give @s leather_helmet{AllowOffhandInflict:1b,apply_status:[{id:"bleeding",amplifier:2b}]}
Allows an armor piece to provide Custom Status benefits when placed in the offhand slot.