Skip to content

Class endstone::Enchantment

ClassList > endstone > Enchantment

Public Static Attributes

Type Name
constexpr auto AquaAffinity = EnchantmentId::minecraft("aqua\_affinity")
Increases the speed at which a player may mine underwater.
constexpr auto BaneOfArthropods = EnchantmentId::minecraft("bane\_of\_arthropods")
Increases damage against arthropod targets.
constexpr auto BlastProtection = EnchantmentId::minecraft("blast\_protection")
Provides protection against explosive damage.
constexpr auto Breach = EnchantmentId::minecraft("breach")
Reduces armor effectiveness against maces.
constexpr auto Channeling = EnchantmentId::minecraft("channeling")
Strikes lightning when a mob is hit with a trident if conditions are stormy.
constexpr auto CurseOfBinding = EnchantmentId::minecraft("binding")
Item cannot be removed.
constexpr auto CurseOfVanishing = EnchantmentId::minecraft("vanishing")
Item disappears instead of dropping.
constexpr auto Density = EnchantmentId::minecraft("density")
Increases fall damage of maces.
constexpr auto DepthStrider = EnchantmentId::minecraft("depth\_strider")
Increases walking speed while in water.
constexpr auto Efficiency = EnchantmentId::minecraft("efficiency")
Increases the rate at which you mine/dig.
constexpr auto FeatherFalling = EnchantmentId::minecraft("feather\_falling")
Provides protection against fall damage.
constexpr auto FireAspect = EnchantmentId::minecraft("fire\_aspect")
When attacking a target, has a chance to set them on fire.
constexpr auto FireProtection = EnchantmentId::minecraft("fire\_protection")
Provides protection against fire damage.
constexpr auto Flame = EnchantmentId::minecraft("flame")
Sets entities on fire when hit by arrows shot from a bow.
constexpr auto Fortune = EnchantmentId::minecraft("fortune")
Provides a chance of gaining extra loot when destroying blocks.
constexpr auto FrostWalker = EnchantmentId::minecraft("frost\_walker")
Freezes any still water adjacent to ice / frost which player is walking on.
constexpr auto Impaling = EnchantmentId::minecraft("impaling")
Deals more damage to mobs that live in the ocean.
constexpr auto Infinity = EnchantmentId::minecraft("infinity")
Provides infinite arrows when shooting a bow.
constexpr auto Knockback = EnchantmentId::minecraft("knockback")
All damage to other targets will knock them back when hit.
constexpr auto Looting = EnchantmentId::minecraft("looting")
Provides a chance of gaining extra loot when killing monsters.
constexpr auto Loyalty = EnchantmentId::minecraft("loyalty")
Causes a thrown trident to return to the player who threw it.
constexpr auto LuckOfTheSea = EnchantmentId::minecraft("luck\_of\_the\_sea")
Decreases odds of catching worthless junk.
constexpr auto Lure = EnchantmentId::minecraft("lure")
Increases rate of fish biting your hook.
constexpr auto Mending = EnchantmentId::minecraft("mending")
Allows mending the item using experience orbs.
constexpr auto Multishot = EnchantmentId::minecraft("multishot")
Shoot multiple arrows from crossbows.
constexpr auto Piercing = EnchantmentId::minecraft("piercing")
Crossbow projectiles pierce entities.
constexpr auto Power = EnchantmentId::minecraft("power")
Provides extra damage when shooting arrows from bows.
constexpr auto ProjectileProtection = EnchantmentId::minecraft("projectile\_protection")
Provides protection against projectile damage.
constexpr auto Protection = EnchantmentId::minecraft("protection")
Provides protection against environmental damage.
constexpr auto Punch = EnchantmentId::minecraft("punch")
Provides a knockback when an entity is hit by an arrow from a bow.
constexpr auto QuickCharge = EnchantmentId::minecraft("quick\_charge")
Charges crossbows quickly.
constexpr auto Respiration = EnchantmentId::minecraft("respiration")
Decreases the rate of air loss whilst underwater.
constexpr auto Riptide = EnchantmentId::minecraft("riptide")
When it is rainy, launches the player in the direction their trident is thrown.
constexpr auto Sharpness = EnchantmentId::minecraft("sharpness")
Increases damage against all targets.
constexpr auto SilkTouch = EnchantmentId::minecraft("silk\_touch")
Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)
constexpr auto Smite = EnchantmentId::minecraft("smite")
Increases damage against undead targets.
constexpr auto SoulSpeed = EnchantmentId::minecraft("soul\_speed")
Walk quicker on soul blocks.
constexpr auto SwiftSneak = EnchantmentId::minecraft("swift\_sneak")
Walk quicker while sneaking.
constexpr auto Thorns = EnchantmentId::minecraft("thorns")
Damages the attacker.
constexpr auto Unbreaking = EnchantmentId::minecraft("unbreaking")
Decreases the rate at which a tool looses durability.
constexpr auto WindBurst = EnchantmentId::minecraft("wind\_burst")
Emits wind burst upon hitting enemy.

Public Functions

Type Name
virtual bool canEnchantItem (const ItemStack & item) const = 0
Checks if this Enchantment may be applied to the givenItemStack .
virtual bool conflictsWith (const Enchantment & other) const = 0
Check if this enchantment conflicts with another enchantment.
virtual EnchantmentId getId () const = 0
Return the identifier for this enchantment.
virtual int getMaxLevel () const = 0
Gets the maximum level that this Enchantment may become.
virtual int getStartLevel () const = 0
Gets the level that this Enchantment should start at (also known as minimum level).
virtual std::string getTranslationKey () const = 0
Get the translation key, suitable for use in a translation component.
operator EnchantmentId () const
bool operator!= (const EnchantmentId & other) const
bool operator!= (const Enchantment & other) const
bool operator== (const EnchantmentId & other) const
bool operator== (const Enchantment & other) const
virtual ~Enchantment () = default

Public Static Attributes Documentation

variable AquaAffinity

Increases the speed at which a player may mine underwater.

constexpr auto endstone::Enchantment::AquaAffinity;


variable BaneOfArthropods

Increases damage against arthropod targets.

constexpr auto endstone::Enchantment::BaneOfArthropods;


variable BlastProtection

Provides protection against explosive damage.

constexpr auto endstone::Enchantment::BlastProtection;


variable Breach

Reduces armor effectiveness against maces.

constexpr auto endstone::Enchantment::Breach;


variable Channeling

Strikes lightning when a mob is hit with a trident if conditions are stormy.

constexpr auto endstone::Enchantment::Channeling;


variable CurseOfBinding

Item cannot be removed.

constexpr auto endstone::Enchantment::CurseOfBinding;


variable CurseOfVanishing

Item disappears instead of dropping.

constexpr auto endstone::Enchantment::CurseOfVanishing;


variable Density

Increases fall damage of maces.

constexpr auto endstone::Enchantment::Density;


variable DepthStrider

Increases walking speed while in water.

constexpr auto endstone::Enchantment::DepthStrider;


variable Efficiency

Increases the rate at which you mine/dig.

constexpr auto endstone::Enchantment::Efficiency;


variable FeatherFalling

Provides protection against fall damage.

constexpr auto endstone::Enchantment::FeatherFalling;


variable FireAspect

When attacking a target, has a chance to set them on fire.

constexpr auto endstone::Enchantment::FireAspect;


variable FireProtection

Provides protection against fire damage.

constexpr auto endstone::Enchantment::FireProtection;


variable Flame

Sets entities on fire when hit by arrows shot from a bow.

constexpr auto endstone::Enchantment::Flame;


variable Fortune

Provides a chance of gaining extra loot when destroying blocks.

constexpr auto endstone::Enchantment::Fortune;


variable FrostWalker

Freezes any still water adjacent to ice / frost which player is walking on.

constexpr auto endstone::Enchantment::FrostWalker;


variable Impaling

Deals more damage to mobs that live in the ocean.

constexpr auto endstone::Enchantment::Impaling;


variable Infinity

Provides infinite arrows when shooting a bow.

constexpr auto endstone::Enchantment::Infinity;


variable Knockback

All damage to other targets will knock them back when hit.

constexpr auto endstone::Enchantment::Knockback;


variable Looting

Provides a chance of gaining extra loot when killing monsters.

constexpr auto endstone::Enchantment::Looting;


variable Loyalty

Causes a thrown trident to return to the player who threw it.

constexpr auto endstone::Enchantment::Loyalty;


variable LuckOfTheSea

Decreases odds of catching worthless junk.

constexpr auto endstone::Enchantment::LuckOfTheSea;


variable Lure

Increases rate of fish biting your hook.

constexpr auto endstone::Enchantment::Lure;


variable Mending

Allows mending the item using experience orbs.

constexpr auto endstone::Enchantment::Mending;


variable Multishot

Shoot multiple arrows from crossbows.

constexpr auto endstone::Enchantment::Multishot;


variable Piercing

Crossbow projectiles pierce entities.

constexpr auto endstone::Enchantment::Piercing;


variable Power

Provides extra damage when shooting arrows from bows.

constexpr auto endstone::Enchantment::Power;


variable ProjectileProtection

Provides protection against projectile damage.

constexpr auto endstone::Enchantment::ProjectileProtection;


variable Protection

Provides protection against environmental damage.

constexpr auto endstone::Enchantment::Protection;


variable Punch

Provides a knockback when an entity is hit by an arrow from a bow.

constexpr auto endstone::Enchantment::Punch;


variable QuickCharge

Charges crossbows quickly.

constexpr auto endstone::Enchantment::QuickCharge;


variable Respiration

Decreases the rate of air loss whilst underwater.

constexpr auto endstone::Enchantment::Respiration;


variable Riptide

When it is rainy, launches the player in the direction their trident is thrown.

constexpr auto endstone::Enchantment::Riptide;


variable Sharpness

Increases damage against all targets.

constexpr auto endstone::Enchantment::Sharpness;


variable SilkTouch

Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)

constexpr auto endstone::Enchantment::SilkTouch;


variable Smite

Increases damage against undead targets.

constexpr auto endstone::Enchantment::Smite;


variable SoulSpeed

Walk quicker on soul blocks.

constexpr auto endstone::Enchantment::SoulSpeed;


variable SwiftSneak

Walk quicker while sneaking.

constexpr auto endstone::Enchantment::SwiftSneak;


variable Thorns

Damages the attacker.

constexpr auto endstone::Enchantment::Thorns;


variable Unbreaking

Decreases the rate at which a tool looses durability.

constexpr auto endstone::Enchantment::Unbreaking;


variable WindBurst

Emits wind burst upon hitting enemy.

constexpr auto endstone::Enchantment::WindBurst;


Public Functions Documentation

function canEnchantItem

Checks if this Enchantment may be applied to the givenItemStack .

virtual bool endstone::Enchantment::canEnchantItem (
    const  ItemStack & item
) const = 0

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

Parameters:

Returns:

True if the enchantment may be applied, otherwise False


function conflictsWith

Check if this enchantment conflicts with another enchantment.

virtual bool endstone::Enchantment::conflictsWith (
    const  Enchantment & other
) const = 0

Parameters:

  • other The enchantment to check against

Returns:

True if there is a conflict.


function getId

Return the identifier for this enchantment.

virtual EnchantmentId endstone::Enchantment::getId () const = 0

Returns:

this enchantment's id


function getMaxLevel

Gets the maximum level that this Enchantment may become.

virtual int endstone::Enchantment::getMaxLevel () const = 0

Returns:

Maximum level of the Enchantment


function getStartLevel

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

virtual int endstone::Enchantment::getStartLevel () const = 0

Returns:

Starting level of the Enchantment


function getTranslationKey

Get the translation key, suitable for use in a translation component.

virtual std::string endstone::Enchantment::getTranslationKey () const = 0

Returns:

the translation key


function operator EnchantmentId

inline endstone::Enchantment::operator EnchantmentId () const

function operator!=

inline bool endstone::Enchantment::operator!= (
    const  EnchantmentId & other
) const

function operator!=

inline bool endstone::Enchantment::operator!= (
    const  Enchantment & other
) const

function operator==

inline bool endstone::Enchantment::operator== (
    const  EnchantmentId & other
) const

function operator==

inline bool endstone::Enchantment::operator== (
    const  Enchantment & other
) const

function ~Enchantment

virtual endstone::Enchantment::~Enchantment () = default


The documentation for this class was generated from the following file include/endstone/enchantments/enchantment.h