endstone/enchantments

Classes

NameDescription
Enchantment

Type Aliases

NameDescription
EnchantmentId

classEnchantment

Defined in <endstone/enchantments/enchantment.h>

Bases: Registry<T>::Type

Variables

NameDescription
ProtectionProvides protection against environmental damage.
FireProtectionProvides protection against fire damage.
FeatherFallingProvides protection against fall damage.
BlastProtectionProvides protection against explosive damage.
ProjectileProtectionProvides protection against projectile damage.
ThornsDamages the attacker.
RespirationDecreases the rate of air loss whilst underwater.
DepthStriderIncreases walking speed while in water.
AquaAffinityIncreases the speed at which a player may mine underwater.
SharpnessIncreases damage against all targets.
SmiteIncreases damage against undead targets.
BaneOfArthropodsIncreases damage against arthropod targets.
KnockbackAll damage to other targets will knock them back when hit.
FireAspectWhen attacking a target, has a chance to set them on fire.
LootingProvides a chance of gaining extra loot when killing monsters.
EfficiencyIncreases the rate at which you mine/dig.
SilkTouchAllows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)
UnbreakingDecreases the rate at which a tool looses durability.
FortuneProvides a chance of gaining extra loot when destroying blocks.
PowerProvides extra damage when shooting arrows from bows.
PunchProvides a knockback when an entity is hit by an arrow from a bow.
FlameSets entities on fire when hit by arrows shot from a bow.
InfinityProvides infinite arrows when shooting a bow.
LuckOfTheSeaDecreases odds of catching worthless junk.
LureIncreases rate of fish biting your hook.
FrostWalkerFreezes any still water adjacent to ice / frost which player is walking on.
MendingAllows mending the item using experience orbs.
CurseOfBindingItem cannot be removed.
CurseOfVanishingItem disappears instead of dropping.
ImpalingDeals more damage to mobs that live in the ocean.
RiptideWhen it is rainy, launches the player in the direction their trident is thrown.
LoyaltyCauses a thrown trident to return to the player who threw it.
ChannelingStrikes lightning when a mob is hit with a trident if conditions are stormy.
MultishotShoot multiple arrows from crossbows.
PiercingCrossbow projectiles pierce entities.
QuickChargeCharges crossbows quickly.
SoulSpeedWalk quicker on soul blocks.
SwiftSneakWalk quicker while sneaking.
WindBurstEmits wind burst upon hitting enemy.
DensityIncreases fall damage of maces.
BreachReduces armor effectiveness against maces.
LungeApplied to spears, causes jab attacks to propel the wielder forward horizontally.

Methods

NameDescription
getMaxLevelGets the maximum level that this Enchantment may become.
getStartLevelGets the level that this Enchantment should start at (also known as minimum level).
conflictsWithCheck if this enchantment conflicts with another enchantment.
canEnchantItemChecks if this Enchantment may be applied to the given ItemStack.

varProtectionstaticconstexpr

auto Protection

Provides protection against environmental damage.

varFireProtectionstaticconstexpr

auto FireProtection

Provides protection against fire damage.

varFeatherFallingstaticconstexpr

auto FeatherFalling

Provides protection against fall damage.

varBlastProtectionstaticconstexpr

auto BlastProtection

Provides protection against explosive damage.

varProjectileProtectionstaticconstexpr

auto ProjectileProtection

Provides protection against projectile damage.

varThornsstaticconstexpr

auto Thorns

Damages the attacker.

varRespirationstaticconstexpr

auto Respiration

Decreases the rate of air loss whilst underwater.

varDepthStriderstaticconstexpr

auto DepthStrider

Increases walking speed while in water.

varAquaAffinitystaticconstexpr

auto AquaAffinity

Increases the speed at which a player may mine underwater.

varSharpnessstaticconstexpr

auto Sharpness

Increases damage against all targets.

varSmitestaticconstexpr

auto Smite

Increases damage against undead targets.

varBaneOfArthropodsstaticconstexpr

auto BaneOfArthropods

Increases damage against arthropod targets.

varKnockbackstaticconstexpr

auto Knockback

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

varFireAspectstaticconstexpr

auto FireAspect

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

varLootingstaticconstexpr

auto Looting

Provides a chance of gaining extra loot when killing monsters.

varEfficiencystaticconstexpr

auto Efficiency

Increases the rate at which you mine/dig.

varSilkTouchstaticconstexpr

auto SilkTouch

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

varUnbreakingstaticconstexpr

auto Unbreaking

Decreases the rate at which a tool looses durability.

varFortunestaticconstexpr

auto Fortune

Provides a chance of gaining extra loot when destroying blocks.

varPowerstaticconstexpr

auto Power

Provides extra damage when shooting arrows from bows.

varPunchstaticconstexpr

auto Punch

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

varFlamestaticconstexpr

auto Flame

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

varInfinitystaticconstexpr

auto Infinity

Provides infinite arrows when shooting a bow.

varLuckOfTheSeastaticconstexpr

auto LuckOfTheSea

Decreases odds of catching worthless junk.

varLurestaticconstexpr

auto Lure

Increases rate of fish biting your hook.

varFrostWalkerstaticconstexpr

auto FrostWalker

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

varMendingstaticconstexpr

auto Mending

Allows mending the item using experience orbs.

varCurseOfBindingstaticconstexpr

auto CurseOfBinding

Item cannot be removed.

varCurseOfVanishingstaticconstexpr

auto CurseOfVanishing

Item disappears instead of dropping.

varImpalingstaticconstexpr

auto Impaling

Deals more damage to mobs that live in the ocean.

varRiptidestaticconstexpr

auto Riptide

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

varLoyaltystaticconstexpr

auto Loyalty

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

varChannelingstaticconstexpr

auto Channeling

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

varMultishotstaticconstexpr

auto Multishot

Shoot multiple arrows from crossbows.

varPiercingstaticconstexpr

auto Piercing

Crossbow projectiles pierce entities.

varQuickChargestaticconstexpr

auto QuickCharge

Charges crossbows quickly.

varSoulSpeedstaticconstexpr

auto SoulSpeed

Walk quicker on soul blocks.

varSwiftSneakstaticconstexpr

auto SwiftSneak

Walk quicker while sneaking.

varWindBurststaticconstexpr

auto WindBurst

Emits wind burst upon hitting enemy.

varDensitystaticconstexpr

auto Density

Increases fall damage of maces.

varBreachstaticconstexpr

auto Breach

Reduces armor effectiveness against maces.

varLungestaticconstexpr

auto Lunge

Applied to spears, causes jab attacks to propel the wielder forward horizontally.

methgetMaxLevelabstractconst

int getMaxLevel() const =0

Gets the maximum level that this Enchantment may become.

Returns

TypeDescription
intMaximum level of the Enchantment

methgetStartLevelabstractconst

int getStartLevel() const =0

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

Returns

TypeDescription
intStarting level of the Enchantment

methconflictsWithabstractconst

bool conflictsWith(const Enchantment& other) const =0

Check if this enchantment conflicts with another enchantment.

Parameters

NameTypeDescription
otherconst Enchantment&The enchantment to check against

Returns

TypeDescription
boolTrue if there is a conflict.

methcanEnchantItemabstractconst

bool canEnchantItem(const ItemStack& item) const =0

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

NameTypeDescription
itemconst ItemStack&Item to test

Returns

TypeDescription
boolTrue if the enchantment may be applied, otherwise False

typeEnchantmentId

Identifier<class Enchantment> EnchantmentId

On this page