Skip to content

Enchantments

endstone.enchantments

Classes relating to the specialized enhancements to ItemStacks.

Classes:

Name Description
Enchantment

Represents an enchantment that may be added to armor, weapons, tools or other items.

Enchantment

Represents an enchantment that may be added to armor, weapons, tools or other items.

Methods:

Name Description
can_enchant_item

Checks if this Enchantment may be applied to the given ItemStack.

conflicts_with

Check if this enchantment conflicts with another enchantment.

get

Look up a registry entry by identifier.

Attributes:

Name Type Description
AQUA_AFFINITY Identifier[Enchantment]
BANE_OF_ARTHROPODS Identifier[Enchantment]
BLAST_PROTECTION Identifier[Enchantment]
BREACH Identifier[Enchantment]
CHANNELING Identifier[Enchantment]
CURSE_OF_BINDING Identifier[Enchantment]
CURSE_OF_VANISHING Identifier[Enchantment]
DENSITY Identifier[Enchantment]
DEPTH_STRIDER Identifier[Enchantment]
EFFICIENCY Identifier[Enchantment]
FEATHER_FALLING Identifier[Enchantment]
FIRE_ASPECT Identifier[Enchantment]
FIRE_PROTECTION Identifier[Enchantment]
FLAME Identifier[Enchantment]
FROST_WALKER Identifier[Enchantment]
IMPALING Identifier[Enchantment]
INFINITY Identifier[Enchantment]
KNOCKBACK Identifier[Enchantment]
LOOTING Identifier[Enchantment]
LOYALTY Identifier[Enchantment]
LUCK_OF_THE_SEA Identifier[Enchantment]
LUNGE Identifier[Enchantment]
LURE Identifier[Enchantment]
MENDING Identifier[Enchantment]
MULTISHOT Identifier[Enchantment]
PIERCING Identifier[Enchantment]
POWER Identifier[Enchantment]
PROJECTILE_PROTECTION Identifier[Enchantment]
PROTECTION Identifier[Enchantment]
PUNCH Identifier[Enchantment]
QUICK_CHARGE Identifier[Enchantment]
RESPIRATION Identifier[Enchantment]
RIPTIDE Identifier[Enchantment]
SHARPNESS Identifier[Enchantment]
SILK_TOUCH Identifier[Enchantment]
SMITE Identifier[Enchantment]
SOUL_SPEED Identifier[Enchantment]
SWIFT_SNEAK Identifier[Enchantment]
THORNS Identifier[Enchantment]
UNBREAKING Identifier[Enchantment]
WIND_BURST Identifier[Enchantment]
id Identifier[Enchantment]

The identifier of this enchantment.

max_level int

The maximum level that this Enchantment may become.

start_level int

The level that this Enchantment should start at (also known as minimum level).

translation_key str

The translation key, suitable for use in a translation component.

AQUA_AFFINITY class-attribute instance-attribute

AQUA_AFFINITY: Identifier[Enchantment] = (
    "minecraft:aqua_affinity"
)

BANE_OF_ARTHROPODS class-attribute instance-attribute

BANE_OF_ARTHROPODS: Identifier[Enchantment] = (
    "minecraft:bane_of_arthropods"
)

BLAST_PROTECTION class-attribute instance-attribute

BLAST_PROTECTION: Identifier[Enchantment] = (
    "minecraft:blast_protection"
)

BREACH class-attribute instance-attribute

BREACH: Identifier[Enchantment] = 'minecraft:breach'

CHANNELING class-attribute instance-attribute

CHANNELING: Identifier[Enchantment] = "minecraft:channeling"

CURSE_OF_BINDING class-attribute instance-attribute

CURSE_OF_BINDING: Identifier[Enchantment] = (
    "minecraft:binding"
)

CURSE_OF_VANISHING class-attribute instance-attribute

CURSE_OF_VANISHING: Identifier[Enchantment] = (
    "minecraft:vanishing"
)

DENSITY class-attribute instance-attribute

DENSITY: Identifier[Enchantment] = 'minecraft:density'

DEPTH_STRIDER class-attribute instance-attribute

DEPTH_STRIDER: Identifier[Enchantment] = (
    "minecraft:depth_strider"
)

EFFICIENCY class-attribute instance-attribute

EFFICIENCY: Identifier[Enchantment] = "minecraft:efficiency"

FEATHER_FALLING class-attribute instance-attribute

FEATHER_FALLING: Identifier[Enchantment] = (
    "minecraft:feather_falling"
)

FIRE_ASPECT class-attribute instance-attribute

FIRE_ASPECT: Identifier[Enchantment] = (
    "minecraft:fire_aspect"
)

FIRE_PROTECTION class-attribute instance-attribute

FIRE_PROTECTION: Identifier[Enchantment] = (
    "minecraft:fire_protection"
)

FLAME class-attribute instance-attribute

FLAME: Identifier[Enchantment] = 'minecraft:flame'

FROST_WALKER class-attribute instance-attribute

FROST_WALKER: Identifier[Enchantment] = (
    "minecraft:frost_walker"
)

IMPALING class-attribute instance-attribute

IMPALING: Identifier[Enchantment] = 'minecraft:impaling'

INFINITY class-attribute instance-attribute

INFINITY: Identifier[Enchantment] = 'minecraft:infinity'

KNOCKBACK class-attribute instance-attribute

KNOCKBACK: Identifier[Enchantment] = 'minecraft:knockback'

LOOTING class-attribute instance-attribute

LOOTING: Identifier[Enchantment] = 'minecraft:looting'

LOYALTY class-attribute instance-attribute

LOYALTY: Identifier[Enchantment] = 'minecraft:loyalty'

LUCK_OF_THE_SEA class-attribute instance-attribute

LUCK_OF_THE_SEA: Identifier[Enchantment] = (
    "minecraft:luck_of_the_sea"
)

LUNGE class-attribute instance-attribute

LUNGE: Identifier[Enchantment] = 'minecraft:lunge'

LURE class-attribute instance-attribute

LURE: Identifier[Enchantment] = 'minecraft:lure'

MENDING class-attribute instance-attribute

MENDING: Identifier[Enchantment] = 'minecraft:mending'

MULTISHOT class-attribute instance-attribute

MULTISHOT: Identifier[Enchantment] = 'minecraft:multishot'

PIERCING class-attribute instance-attribute

PIERCING: Identifier[Enchantment] = 'minecraft:piercing'

POWER class-attribute instance-attribute

POWER: Identifier[Enchantment] = 'minecraft:power'

PROJECTILE_PROTECTION class-attribute instance-attribute

PROJECTILE_PROTECTION: Identifier[Enchantment] = (
    "minecraft:projectile_protection"
)

PROTECTION class-attribute instance-attribute

PROTECTION: Identifier[Enchantment] = "minecraft:protection"

PUNCH class-attribute instance-attribute

PUNCH: Identifier[Enchantment] = 'minecraft:punch'

QUICK_CHARGE class-attribute instance-attribute

QUICK_CHARGE: Identifier[Enchantment] = (
    "minecraft:quick_charge"
)

RESPIRATION class-attribute instance-attribute

RESPIRATION: Identifier[Enchantment] = (
    "minecraft:respiration"
)

RIPTIDE class-attribute instance-attribute

RIPTIDE: Identifier[Enchantment] = 'minecraft:riptide'

SHARPNESS class-attribute instance-attribute

SHARPNESS: Identifier[Enchantment] = 'minecraft:sharpness'

SILK_TOUCH class-attribute instance-attribute

SILK_TOUCH: Identifier[Enchantment] = "minecraft:silk_touch"

SMITE class-attribute instance-attribute

SMITE: Identifier[Enchantment] = 'minecraft:smite'

SOUL_SPEED class-attribute instance-attribute

SOUL_SPEED: Identifier[Enchantment] = "minecraft:soul_speed"

SWIFT_SNEAK class-attribute instance-attribute

SWIFT_SNEAK: Identifier[Enchantment] = (
    "minecraft:swift_sneak"
)

THORNS class-attribute instance-attribute

THORNS: Identifier[Enchantment] = 'minecraft:thorns'

UNBREAKING class-attribute instance-attribute

UNBREAKING: Identifier[Enchantment] = "minecraft:unbreaking"

WIND_BURST class-attribute instance-attribute

WIND_BURST: Identifier[Enchantment] = "minecraft:wind_burst"

id property

id: Identifier[Enchantment]

The identifier of this enchantment.

max_level property

max_level: int

The maximum level that this Enchantment may become.

start_level property

start_level: int

The level that this Enchantment should start at (also known as minimum level).

translation_key property

translation_key: str

The translation key, suitable for use in a translation component.

can_enchant_item

can_enchant_item(item: ItemStack) -> bool

Checks if this Enchantment may be applied to the given ItemStack.

This does not check if it conflicts with any enchantments already applied to the item.

Parameters:

Name Type Description Default
item ItemStack

Item to test.

required

Returns:

Type Description
bool

True if the enchantment may be applied, False otherwise.

conflicts_with

conflicts_with(other: Enchantment) -> bool

Check if this enchantment conflicts with another enchantment.

Parameters:

Name Type Description Default
other Enchantment

The enchantment to check against.

required

Returns:

Type Description
bool

True if there is a conflict.

get staticmethod

get(name: Identifier[Enchantment] | str) -> Enchantment

Look up a registry entry by identifier.

Parameters:

Name Type Description Default
name Identifier[Enchantment] | str

Identifier to look up.

required

Returns:

Type Description
Enchantment

The Enchantment, or None if not found.