Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / EnchantmentEffects

Interface: EnchantmentEffects โ€‹

Defined in: core/values/enchantment/components.ts:29

Vanilla's enchantment effect components, named as vanilla's in camelCase.

Properties โ€‹

ammoUse? โ€‹

readonly optional ammoUse?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:35

Item parameters. 0 also makes the shot unpickable.


armorEffectiveness? โ€‹

readonly optional armorEffectiveness?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:31

Damage parameters. 0 is no armor effect, 1 full.


attributes? โ€‹

readonly optional attributes?: AttributeEffect[]

Defined in: core/values/enchantment/components.ts:33

Attribute modifiers while the item is worn or held in its slots.


blockExperience? โ€‹

readonly optional blockExperience?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:37

Item parameters. Experience from breaking a block.


crossbowChargeTime? โ€‹

readonly optional crossbowChargeTime?: ValueEffect

Defined in: core/values/enchantment/components.ts:41

Seconds to charge a crossbow. Read every tick, so a change lands mid-charge.


crossbowChargingSounds? โ€‹

readonly optional crossbowChargingSounds?: object[]

Defined in: core/values/enchantment/components.ts:39

Sounds while charging, one entry per level.

end? โ€‹

optional end?: SoundRef

mid? โ€‹

optional mid?: SoundRef

start? โ€‹

optional start?: SoundRef


damage? โ€‹

readonly optional damage?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:43

Damage parameters.


damageImmunity? โ€‹

readonly optional damageImmunity?: object[]

Defined in: core/values/enchantment/components.ts:45

Damage parameters. No damage at all while one matches.

requirements? โ€‹

optional requirements?: Predicate


damageProtection? โ€‹

readonly optional damageProtection?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:47

Damage parameters. Each unit is 4% less damage, up to 80%.


equipmentDrops? โ€‹

readonly optional equipmentDrops?: Conditional<ValueEffect> & object[]

Defined in: core/values/enchantment/components.ts:49

Damage parameters. Chance (0 to 1) a victim's gear drops; enchanted is who has it.


fishingLuckBonus? โ€‹

readonly optional fishingLuckBonus?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:51

Entity parameters on the fishing player.


fishingTimeReduction? โ€‹

readonly optional fishingTimeReduction?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:53

Entity parameters on the fishing player. Seconds less to wait for a bite.


hitBlock? โ€‹

readonly optional hitBlock?: Conditional<EntityEffect>[]

Defined in: core/values/enchantment/components.ts:55

Entity parameters on the entity hitting the block; for a projectile, the projectile.


itemDamage? โ€‹

readonly optional itemDamage?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:59

Item parameters. Durability used.


knockback? โ€‹

readonly optional knockback?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:57

Damage parameters.


locationChanged? โ€‹

readonly optional locationChanged?: Conditional<LocationEffect>[]

Defined in: core/values/enchantment/components.ts:61

Location parameters. Runs when the entity moves; attribute modifiers come off when it stops matching.


mobExperience? โ€‹

readonly optional mobExperience?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:63

Entity parameters on the killed mob.


postAttack? โ€‹

readonly optional postAttack?: Targeted<EntityEffect>[]

Defined in: core/values/enchantment/components.ts:65

Damage parameters.


postPiercingAttack? โ€‹

readonly optional postPiercingAttack?: Conditional<EntityEffect>[]

Defined in: core/values/enchantment/components.ts:67

1.21.11+. Damage parameters; the effect lands on the attacker.


preventArmorChange? โ€‹

readonly optional preventArmorChange?: true

Defined in: core/values/enchantment/components.ts:69

The item can't be taken out of an armor slot.


preventEquipmentDrop? โ€‹

readonly optional preventEquipmentDrop?: true

Defined in: core/values/enchantment/components.ts:71

The item isn't dropped on death.


projectileCount? โ€‹

readonly optional projectileCount?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:73

Entity parameters on the one drawing. Projectiles past the first can't be picked up.


projectilePiercing? โ€‹

readonly optional projectilePiercing?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:75

Item parameters on the ammunition. Entities a shot passes through.


projectileSpawned? โ€‹

readonly optional projectileSpawned?: Conditional<EntityEffect>[]

Defined in: core/values/enchantment/components.ts:77

Entity parameters on the newly fired projectile.


projectileSpread? โ€‹

readonly optional projectileSpread?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:79

Entity parameters on the shooter. Degrees from the aim line.


repairWithXp? โ€‹

readonly optional repairWithXp?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:81

Item parameters. Durability per experience point; Mending uses 2.


smashDamagePerFallenBlock? โ€‹

readonly optional smashDamagePerFallenBlock?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:83

Damage parameters. A mace smash's damage per block fallen.


tick? โ€‹

readonly optional tick?: Conditional<EntityEffect>[]

Defined in: core/values/enchantment/components.ts:85

Entity parameters on the holder. Every tick.


tridentReturnAcceleration? โ€‹

readonly optional tridentReturnAcceleration?: Conditional<ValueEffect>[]

Defined in: core/values/enchantment/components.ts:87

Entity parameters on the trident.


tridentSound? โ€‹

readonly optional tridentSound?: SoundRef[]

Defined in: core/values/enchantment/components.ts:91

The throw sound, one entry per level.


tridentSpinAttackStrength? โ€‹

readonly optional tridentSpinAttackStrength?: ValueEffect

Defined in: core/values/enchantment/components.ts:89

Above 0 makes a trident a spin attack instead of a throw.

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.