Chaos Effect: Component Compensation - yeelp/MCCE GitHub Wiki

Component Compensation is an Instant Chaos Effect.

Effects

Component Compensation gives and alters stack components on every item in the player's inventory. It can give or alter stack components on an item 0-2 times per item. The rules it follows for altering stack components is outlined below per stack component. If a stack component isn't listed, it isn't altered or affected by Component Compensation.

Attribute Modifiers

Component Compensation has a 10% chance to remove all attribute modifiers present on the item. Otherwise it replaces the stacks attribute modifiers with a list of new ones; Component Compensation picks a random attribute from the following list and creates an attribute modifier whose value is with the given range (the minimum value is inclusive and the maximum is exclusive) and has the operation as specified. It has a 50% chance of adding another attribute modifier as well, picking from the same list and potentially picking the same attribute. If the stack already has an attribute modifier for that attribute, it is changed to whatever is generated. Each attribute has an equal probability. The attribute modifier is applied whenever the stack is held or worn.

Attribute Range Operation
Step Height [-0.5,1.6) ADD
Block Break Speed [-1,1) ADD
Block Interaction Range [-4,64) ADD
Burning Time [-0.8,2) MULTIPLY BASE
Gravity [-0.5,0.8) ADD
Scale [-0.5,1.5) MULTIPLY BASE
Max Health [-5,15) ADD
Movement Efficiency [0,1) ADD
Sneaking Speed [-0.3,0.7) ADD
Entity Interaction Range [-3,32) ADD
Attack Damage [-1,10) ADD
Attack Knockback [0,5) ADD

Consumable

Component Compensation has a 10% chance of making the stack unable to be consumed. Otherwise, it makes the stack consumable with an equal chance for the stack to do the following when consumed:

  • Teleport randomly similar to Chorus Fruit.
  • Clear all potion effects similar to Milk.
  • Apply Instant Health IX and Saturation IX, effectively fully healing the player.
  • Nothing

The stack will take anywhere from 0.5 to 5.5 seconds and will use a random use animation.

The stack will also have lore to indicate that it is edible and the effects it provides, so long as it has this component.

Custom Name

Component Compensation will give the stack a custom name up to 20 characters in length, with random characters (Unicode characters 32 through 384, ignoring the control characters from 128 to 159).

Damage

Component Compensation only modifies this component if the stack is damageable. Otherwise, it tries to pick a different component. The stack's damage will be set to a random amount, but not exceeding its max damage.

Death Protection

Component Compensation has a 10% chance to remove any death protection the item provides. Otherwise, it gives the stack death protection, which will clear all potion effects and give the entity Instant Health IX and Saturation IX when it dies. It also gives Resistance IX for 200 ticks when it dies. Like a Totem of Undying, the stack must be held (not equipped) to protect the entity.

The stack will have lore indicating it will protect from death so long as it has this component.

Dyed Color

Component Compensation only modifies this component if the stack is dyeable. Then, it has a 10% chance to remove the dyed color. Otherwise, it sets the dyed color to any random hex color.

Enchantments

Component Compensation gives the stack 0-7 random enchantments, replacing all existing enchantments. The enchantments will have a strength between 1 and 9

Equippable

Component Compensation has a 10% chance to make the stack unable to be equipped. If it does, it also removes any glider component as well. Otherwise, then stack will be equippable in one of the head, chest, legs or feet slots. If the stack is currently equipped, it will remain equipped but if removed, will only be able to be equipped in the specified slot.

The stack will have lore indicating that it is equippable in the specified slot so long as it has this component.

Food

Component Compensation only modifies this component if the stack is consumable, either naturally or through this effect. The stack will restore up to 20 hunger when consumed, and will have a saturation modifier of up to 3.0. It will also have a 50% chance of being always edible.

The stack will have lore indicating the amount of hunger and saturation it restores upon being eating, along with whether it is always edible, so long as it has this component.

Glider

Component Compensation only modifies this component if the stack is equippable, either naturally or through this effect and has a 10% chance to remove gliding abilities of this stack. Otherwise, the stack will allow the player to glide similar to an Elytra when equipped.

The stack will have lore indication that it allows gliding while equipped, so long as it has this component.

Hide Tooltip

Component Compensation has a 10% chance of removing this component, making the tooltip visible. Otherwise, the stack's tooltip will be hidden.

Item Model

Component Compensation will set the item's model to a random item.

Lore

Component Compensation will give the stack 2-30 lines of lore, replacing any lore given by this option in particular, with each line of lore being up to 49 characters in length. Each line will have a random color, and may randomly be any of bold, italic, underline, strikethrough or obfuscated; each having a 50% chance of occurring and are independent.

Max Damage

Component Compensation will only modify this component if the stack is damageable. It will be given a random max damage with no upper bound.

The stack will have lore indicating the number of uses it has total so long as it has this component.

Max Stack Size

Component Compensation will only modify this component if the stack is stackable. It will change the max stack size to be anything from 1 to 99. If the stack had an amount larger than this, the stack will be broken up into stacks of sizes no larger than its new max stack size if it is moved.

The stack will have lore indication the new max stack size it has so long as it has this component.

Rarity

Component Compensation will change the rarity of the stack, which changes the color of its name.

Suspicious Stew Effects

Component Compensation will only modify this component if the stack is Suspicious Stew. It changes the effects the stew gives to be a new list of 1-4 random effects that all last 160 ticks. Each effect will be strength 1.

Trim

Component Compensation will only modify this component if the stack is trimmable armor. It randomizes the armor trim to a random pattern and material.

Unbreakable

Component Compensation will only modify this component if the stack is damageable. It makes the stack unbreakable. If the stack gets this modification, it is never removed; the stack will always be unbreakable.

Use Cooldown

Component Compensation will add the stack to either Cooldown Group A or Cooldown Group B. Items in Group A share the same cooldown; using one will apply its cooldown duration to the others and similarly for Group B. The cooldown duration given is up to 480 seconds.

Applicability

Component Compensation is only applicable if the players inventory is non-empty.

Exclusivity

Component Compensation is not mutually exclusive with any other Chaos Effect.

History

Version Notes
1.2 Introduced