Class endstone::Enchantment¶
ClassList > endstone > Enchantment
Inherits the following classes: endstone::Registry::Type
Public Types inherited from endstone::Registry::Type¶
| Type | Name |
|---|---|
| typedef Identifier< T > | Id |
Public Static Attributes¶
| Type | Name |
|---|---|
| auto | AquaAffinity = EnchantmentId::minecraft("aqua\_affinity")Increases the speed at which a player may mine underwater. |
| auto | BaneOfArthropods = EnchantmentId::minecraft("bane\_of\_arthropods")Increases damage against arthropod targets. |
| auto | BlastProtection = EnchantmentId::minecraft("blast\_protection")Provides protection against explosive damage. |
| auto | Breach = EnchantmentId::minecraft("breach")Reduces armor effectiveness against maces. |
| auto | Channeling = EnchantmentId::minecraft("channeling")Strikes lightning when a mob is hit with a trident if conditions are stormy. |
| auto | CurseOfBinding = EnchantmentId::minecraft("binding")Item cannot be removed. |
| auto | CurseOfVanishing = EnchantmentId::minecraft("vanishing")Item disappears instead of dropping. |
| auto | Density = EnchantmentId::minecraft("density")Increases fall damage of maces. |
| auto | DepthStrider = EnchantmentId::minecraft("depth\_strider")Increases walking speed while in water. |
| auto | Efficiency = EnchantmentId::minecraft("efficiency")Increases the rate at which you mine/dig. |
| auto | FeatherFalling = EnchantmentId::minecraft("feather\_falling")Provides protection against fall damage. |
| auto | FireAspect = EnchantmentId::minecraft("fire\_aspect")When attacking a target, has a chance to set them on fire. |
| auto | FireProtection = EnchantmentId::minecraft("fire\_protection")Provides protection against fire damage. |
| auto | Flame = EnchantmentId::minecraft("flame")Sets entities on fire when hit by arrows shot from a bow. |
| auto | Fortune = EnchantmentId::minecraft("fortune")Provides a chance of gaining extra loot when destroying blocks. |
| auto | FrostWalker = EnchantmentId::minecraft("frost\_walker")Freezes any still water adjacent to ice / frost which player is walking on. |
| auto | Impaling = EnchantmentId::minecraft("impaling")Deals more damage to mobs that live in the ocean. |
| auto | Infinity = EnchantmentId::minecraft("infinity")Provides infinite arrows when shooting a bow. |
| auto | Knockback = EnchantmentId::minecraft("knockback")All damage to other targets will knock them back when hit. |
| auto | Looting = EnchantmentId::minecraft("looting")Provides a chance of gaining extra loot when killing monsters. |
| auto | Loyalty = EnchantmentId::minecraft("loyalty")Causes a thrown trident to return to the player who threw it. |
| auto | LuckOfTheSea = EnchantmentId::minecraft("luck\_of\_the\_sea")Decreases odds of catching worthless junk. |
| auto | Lunge = EnchantmentId::minecraft("lunge")Applied to spears, causes jab attacks to propel the wielder forward horizontally. |
| auto | Lure = EnchantmentId::minecraft("lure")Increases rate of fish biting your hook. |
| auto | Mending = EnchantmentId::minecraft("mending")Allows mending the item using experience orbs. |
| auto | Multishot = EnchantmentId::minecraft("multishot")Shoot multiple arrows from crossbows. |
| auto | Piercing = EnchantmentId::minecraft("piercing")Crossbow projectiles pierce entities. |
| auto | Power = EnchantmentId::minecraft("power")Provides extra damage when shooting arrows from bows. |
| auto | ProjectileProtection = EnchantmentId::minecraft("projectile\_protection")Provides protection against projectile damage. |
| auto | Protection = EnchantmentId::minecraft("protection")Provides protection against environmental damage. |
| auto | Punch = EnchantmentId::minecraft("punch")Provides a knockback when an entity is hit by an arrow from a bow. |
| auto | QuickCharge = EnchantmentId::minecraft("quick\_charge")Charges crossbows quickly. |
| auto | Respiration = EnchantmentId::minecraft("respiration")Decreases the rate of air loss whilst underwater. |
| auto | Riptide = EnchantmentId::minecraft("riptide")When it is rainy, launches the player in the direction their trident is thrown. |
| auto | Sharpness = EnchantmentId::minecraft("sharpness")Increases damage against all targets. |
| auto | SilkTouch = EnchantmentId::minecraft("silk\_touch")Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone). |
| auto | Smite = EnchantmentId::minecraft("smite")Increases damage against undead targets. |
| auto | SoulSpeed = EnchantmentId::minecraft("soul\_speed")Walk quicker on soul blocks. |
| auto | SwiftSneak = EnchantmentId::minecraft("swift\_sneak")Walk quicker while sneaking. |
| auto | Thorns = EnchantmentId::minecraft("thorns")Damages the attacker. |
| auto | Unbreaking = EnchantmentId::minecraft("unbreaking")Decreases the rate at which a tool looses durability. |
| 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 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). |
Public Functions inherited from endstone::Registry::Type¶
| Type | Name |
|---|---|
| virtual Id | getId () const = 0 Return the identifier of this object. |
| virtual std::string | getTranslationKey () const = 0 Get the translation key, suitable for use in a translation component. |
| operator Id () const |
|
| bool | operator!= (const Id & other) const |
| bool | operator!= (const T & other) const |
| bool | operator== (const Id & other) const |
| bool | operator== (const T & other) const |
| virtual | ~Type () = default |
Public Static Functions inherited from endstone::Registry::Type¶
| Type | Name |
|---|---|
| const T * | get (Id id) Look up a registry entry by identifier. |
Public Static Attributes Documentation¶
variable AquaAffinity¶
Increases the speed at which a player may mine underwater.
variable BaneOfArthropods¶
Increases damage against arthropod targets.
variable BlastProtection¶
Provides protection against explosive damage.
variable Breach¶
Reduces armor effectiveness against maces.
variable Channeling¶
Strikes lightning when a mob is hit with a trident if conditions are stormy.
variable CurseOfBinding¶
Item cannot be removed.
variable CurseOfVanishing¶
Item disappears instead of dropping.
variable Density¶
Increases fall damage of maces.
variable DepthStrider¶
Increases walking speed while in water.
variable Efficiency¶
Increases the rate at which you mine/dig.
variable FeatherFalling¶
Provides protection against fall damage.
variable FireAspect¶
When attacking a target, has a chance to set them on fire.
variable FireProtection¶
Provides protection against fire damage.
variable Flame¶
Sets entities on fire when hit by arrows shot from a bow.
variable Fortune¶
Provides a chance of gaining extra loot when destroying blocks.
variable FrostWalker¶
Freezes any still water adjacent to ice / frost which player is walking on.
variable Impaling¶
Deals more damage to mobs that live in the ocean.
variable Infinity¶
Provides infinite arrows when shooting a bow.
variable Knockback¶
All damage to other targets will knock them back when hit.
variable Looting¶
Provides a chance of gaining extra loot when killing monsters.
variable Loyalty¶
Causes a thrown trident to return to the player who threw it.
variable LuckOfTheSea¶
Decreases odds of catching worthless junk.
variable Lunge¶
Applied to spears, causes jab attacks to propel the wielder forward horizontally.
variable Lure¶
Increases rate of fish biting your hook.
variable Mending¶
Allows mending the item using experience orbs.
variable Multishot¶
Shoot multiple arrows from crossbows.
variable Piercing¶
Crossbow projectiles pierce entities.
variable Power¶
Provides extra damage when shooting arrows from bows.
variable ProjectileProtection¶
Provides protection against projectile damage.
variable Protection¶
Provides protection against environmental damage.
variable Punch¶
Provides a knockback when an entity is hit by an arrow from a bow.
variable QuickCharge¶
Charges crossbows quickly.
variable Respiration¶
Decreases the rate of air loss whilst underwater.
variable Riptide¶
When it is rainy, launches the player in the direction their trident is thrown.
variable Sharpness¶
Increases damage against all targets.
variable SilkTouch¶
Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone).
variable Smite¶
Increases damage against undead targets.
variable SoulSpeed¶
Walk quicker on soul blocks.
variable SwiftSneak¶
Walk quicker while sneaking.
variable Thorns¶
Damages the attacker.
variable Unbreaking¶
Decreases the rate at which a tool looses durability.
variable WindBurst¶
Emits wind burst upon hitting enemy.
Public Functions Documentation¶
function canEnchantItem¶
Checks if this Enchantment may be applied to the givenItemStack .
This does not check if it conflicts with any enchantments already applied to the item.
Parameters:
itemItem to test
Returns:
True if the enchantment may be applied, otherwise False
function conflictsWith¶
Check if this enchantment conflicts with another enchantment.
Parameters:
otherThe enchantment to check against
Returns:
True if there is a conflict.
function getMaxLevel¶
Gets the maximum level that this Enchantment may become.
Returns:
Maximum level of the Enchantment
function getStartLevel¶
Gets the level that this Enchantment should start at (also known as minimum level).
Returns:
Starting level of the Enchantment
The documentation for this class was generated from the following file include/endstone/enchantments/enchantment.h