endstone/enchantments
Classes
| Name | Description |
|---|---|
Enchantment |
Type Aliases
| Name | Description |
|---|---|
EnchantmentId |
classEnchantment
Defined in <endstone/enchantments/enchantment.h>
Variables
| Name | Description |
|---|---|
Protection | Provides protection against environmental damage. |
FireProtection | Provides protection against fire damage. |
FeatherFalling | Provides protection against fall damage. |
BlastProtection | Provides protection against explosive damage. |
ProjectileProtection | Provides protection against projectile damage. |
Thorns | Damages the attacker. |
Respiration | Decreases the rate of air loss whilst underwater. |
DepthStrider | Increases walking speed while in water. |
AquaAffinity | Increases the speed at which a player may mine underwater. |
Sharpness | Increases damage against all targets. |
Smite | Increases damage against undead targets. |
BaneOfArthropods | Increases damage against arthropod targets. |
Knockback | All damage to other targets will knock them back when hit. |
FireAspect | When attacking a target, has a chance to set them on fire. |
Looting | Provides a chance of gaining extra loot when killing monsters. |
Efficiency | Increases the rate at which you mine/dig. |
SilkTouch | Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone) |
Unbreaking | Decreases the rate at which a tool looses durability. |
Fortune | Provides a chance of gaining extra loot when destroying blocks. |
Power | Provides extra damage when shooting arrows from bows. |
Punch | Provides a knockback when an entity is hit by an arrow from a bow. |
Flame | Sets entities on fire when hit by arrows shot from a bow. |
Infinity | Provides infinite arrows when shooting a bow. |
LuckOfTheSea | Decreases odds of catching worthless junk. |
Lure | Increases rate of fish biting your hook. |
FrostWalker | Freezes any still water adjacent to ice / frost which player is walking on. |
Mending | Allows mending the item using experience orbs. |
CurseOfBinding | Item cannot be removed. |
CurseOfVanishing | Item disappears instead of dropping. |
Impaling | Deals more damage to mobs that live in the ocean. |
Riptide | When it is rainy, launches the player in the direction their trident is thrown. |
Loyalty | Causes a thrown trident to return to the player who threw it. |
Channeling | Strikes lightning when a mob is hit with a trident if conditions are stormy. |
Multishot | Shoot multiple arrows from crossbows. |
Piercing | Crossbow projectiles pierce entities. |
QuickCharge | Charges crossbows quickly. |
SoulSpeed | Walk quicker on soul blocks. |
SwiftSneak | Walk quicker while sneaking. |
WindBurst | Emits wind burst upon hitting enemy. |
Density | Increases fall damage of maces. |
Breach | Reduces armor effectiveness against maces. |
Lunge | Applied to spears, causes jab attacks to propel the wielder forward horizontally. |
Methods
| Name | Description |
|---|---|
getMaxLevel | Gets the maximum level that this Enchantment may become. |
getStartLevel | Gets the level that this Enchantment should start at (also known as minimum level). |
conflictsWith | Check if this enchantment conflicts with another enchantment. |
canEnchantItem | Checks if this Enchantment may be applied to the given ItemStack. |
varProtectionstaticconstexpr
auto ProtectionProvides protection against environmental damage.
varFireProtectionstaticconstexpr
auto FireProtectionProvides protection against fire damage.
varFeatherFallingstaticconstexpr
auto FeatherFallingProvides protection against fall damage.
varBlastProtectionstaticconstexpr
auto BlastProtectionProvides protection against explosive damage.
varProjectileProtectionstaticconstexpr
auto ProjectileProtectionProvides protection against projectile damage.
varThornsstaticconstexpr
auto ThornsDamages the attacker.
varRespirationstaticconstexpr
auto RespirationDecreases the rate of air loss whilst underwater.
varDepthStriderstaticconstexpr
auto DepthStriderIncreases walking speed while in water.
varAquaAffinitystaticconstexpr
auto AquaAffinityIncreases the speed at which a player may mine underwater.
varSharpnessstaticconstexpr
auto SharpnessIncreases damage against all targets.
varSmitestaticconstexpr
auto SmiteIncreases damage against undead targets.
varBaneOfArthropodsstaticconstexpr
auto BaneOfArthropodsIncreases damage against arthropod targets.
varKnockbackstaticconstexpr
auto KnockbackAll damage to other targets will knock them back when hit.
varFireAspectstaticconstexpr
auto FireAspectWhen attacking a target, has a chance to set them on fire.
varLootingstaticconstexpr
auto LootingProvides a chance of gaining extra loot when killing monsters.
varEfficiencystaticconstexpr
auto EfficiencyIncreases the rate at which you mine/dig.
varSilkTouchstaticconstexpr
auto SilkTouchAllows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)
varUnbreakingstaticconstexpr
auto UnbreakingDecreases the rate at which a tool looses durability.
varFortunestaticconstexpr
auto FortuneProvides a chance of gaining extra loot when destroying blocks.
varPowerstaticconstexpr
auto PowerProvides extra damage when shooting arrows from bows.
varPunchstaticconstexpr
auto PunchProvides a knockback when an entity is hit by an arrow from a bow.
varFlamestaticconstexpr
auto FlameSets entities on fire when hit by arrows shot from a bow.
varInfinitystaticconstexpr
auto InfinityProvides infinite arrows when shooting a bow.
varLuckOfTheSeastaticconstexpr
auto LuckOfTheSeaDecreases odds of catching worthless junk.
varLurestaticconstexpr
auto LureIncreases rate of fish biting your hook.
varFrostWalkerstaticconstexpr
auto FrostWalkerFreezes any still water adjacent to ice / frost which player is walking on.
varMendingstaticconstexpr
auto MendingAllows mending the item using experience orbs.
varCurseOfBindingstaticconstexpr
auto CurseOfBindingItem cannot be removed.
varCurseOfVanishingstaticconstexpr
auto CurseOfVanishingItem disappears instead of dropping.
varImpalingstaticconstexpr
auto ImpalingDeals more damage to mobs that live in the ocean.
varRiptidestaticconstexpr
auto RiptideWhen it is rainy, launches the player in the direction their trident is thrown.
varLoyaltystaticconstexpr
auto LoyaltyCauses a thrown trident to return to the player who threw it.
varChannelingstaticconstexpr
auto ChannelingStrikes lightning when a mob is hit with a trident if conditions are stormy.
varMultishotstaticconstexpr
auto MultishotShoot multiple arrows from crossbows.
varPiercingstaticconstexpr
auto PiercingCrossbow projectiles pierce entities.
varQuickChargestaticconstexpr
auto QuickChargeCharges crossbows quickly.
varSoulSpeedstaticconstexpr
auto SoulSpeedWalk quicker on soul blocks.
varSwiftSneakstaticconstexpr
auto SwiftSneakWalk quicker while sneaking.
varWindBurststaticconstexpr
auto WindBurstEmits wind burst upon hitting enemy.
varDensitystaticconstexpr
auto DensityIncreases fall damage of maces.
varBreachstaticconstexpr
auto BreachReduces armor effectiveness against maces.
varLungestaticconstexpr
auto LungeApplied to spears, causes jab attacks to propel the wielder forward horizontally.
methgetMaxLevelabstractconst
int getMaxLevel() const =0Gets the maximum level that this Enchantment may become.
Returns
| Type | Description |
|---|---|
int | Maximum level of the Enchantment |
methgetStartLevelabstractconst
int getStartLevel() const =0Gets the level that this Enchantment should start at (also known as minimum level).
Returns
| Type | Description |
|---|---|
int | Starting level of the Enchantment |
methconflictsWithabstractconst
bool conflictsWith(const Enchantment& other) const =0Check if this enchantment conflicts with another enchantment.
Parameters
| Name | Type | Description |
|---|---|---|
other | const Enchantment& | The enchantment to check against |
Returns
| Type | Description |
|---|---|
bool | True if there is a conflict. |
methcanEnchantItemabstractconst
bool canEnchantItem(const ItemStack& item) const =0Checks 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.
Returns
| Type | Description |
|---|---|
bool | True if the enchantment may be applied, otherwise False |
typeEnchantmentId
Identifier<class Enchantment> EnchantmentId