In depth documention of Enchantments - Geolykt/EnchantmentsPlus GitHub Wiki

(Note: this page is still work in progress, it's probably not going to be finished any time soon)

Description of obscure fields:

  • Legacy ID: used only within PDC getters, can be ignored for 99.4% of server owners.
  • Thread safety: An estimate of how well the enchantment would perform if it were to be executed asynchronously.
  • Internal thread safety: An estimate of how well the internal components of an enchantment would behave if run asynchronously, server API calls are assumed to be very thread safe. - This is mostly the only thing that can be changed by developers in terms of thread safety

Template - can ignore:

  • Legacy ID:
  • Applicable tools:
  • Conflicting enchantments:
  • Maximum level:
  • Description:
  • Quirks:
  • Thread safety grade:
  • Internal thread safety:

Anthropomorphism

  • Legacy ID: 1
  • Applicable tools: Pickaxes
  • Conflicting enchantments: Pierce, Switch
  • Maximum level: 1
  • Description: Spawns blocks to protect you when right sneak clicking, and attacks entities when left clicking
  • Quirks:
    • Only entities in a 14 x 14 x 14 cube with the centre being the falling block are attacked by the falling block
    • Only cobblestone can be used
    • Only spawns up to 64 blocks (Developer note: inefficient counting)
  • Thread safety grade: medium
    • Performs entity damaging
    • Moves and spawns falling blocks
    • Performs arithmetic operations on moving objects
  • Internal thread safety: high
    • Heavily tested
    • Contains some non-thread safe fields - a race condition would have no effect on them however
    • Might perform odd behaviour if called too often

Apocalypse

  • Legacy ID: 69
  • Applicable tools: Bow
  • Conflicting enchantments: None!
  • Maximum level: 1
  • Description: Unleashes hell
  • Quirks:
    • Bypasses block protection!
  • Thread safety grade: undetermined
  • Internal thread safety: undetermined

Arborist

  • Legacy ID: 2
  • Applicable tools: Axe
  • Conflicting enchantments: None!
  • Maximum level: 3
  • Description: Drops more apples, sticks, and saplings when used on leaves
  • Quirks:
    • May drop golden apples (can be disabled via configuration) at a 15 * (level+1) * power in 10000 chance (0.3% for level 1; 0.45% for level 2)
  • Thread safety grade: medium to high
    • Spawns items
  • Internal thread safety: full
    • Only interacts with objects that should not be changed later in runtime

Bind

  • Legacy ID: 4
  • Applicable tools: All
  • Conflicting enchantments: None!
  • Maximum level: 1
  • Description: Keeps items with this enchantment in your inventory after death
  • Quirks:
    • Does not handle some plugin induced deaths well
    • May enable duplication - most servers won't allow that
  • Thread safety grade: medium to high
    • Event manipulation
    • Player inventory manipulation
  • Internal thread safety: high
    • Only interacts with objects that should not be changed later in runtime

Blaze's Curse

  • Legacy ID: 5
  • Applicable tools: Chestplate
  • Conflicting enchantments: None!
  • Maximum level: 1
  • Description: Causes the player to be unharmed in lava and fire, but damages them in water and rain
  • Quirks:
    • Fire resistance is useless
    • Also stops fireball damage (expect this to be tweaked in 3.0.0 - this is basically immunity against Blazes)
    • Damages the player if the player stands on frosted or regular ice, not on packed and blue ice however
    • The player also receives no damage on snow or waterlogged blocks (expect this to be changed in 3.0.0)
    • It is not explicitly defined whether the feet or eyes will be used to get whether the player stands in water or not, however both will not be used at the same time
    • The player will be damaged at a 3x higher rate in water than in rain
    • The damage within water is considered drowning damage
    • The damage performed by standing on ice is considered melting damage (used for Snowmans melting for example)
    • Damage performed when standing in the rain is considered custom damage
  • Thread safety grade: low
    • World I/O (pretty much not thread safe at all)
    • Damage blocking is thread safe however
  • Internal thread safety: full
    • Uses magic constants

Blizzard

  • Legacy ID: 6
  • Applicable tools: Bow
  • Conflicting enchantments: Firestorm
  • Maximum level: 3
  • Description: Spawns a blizzard where the arrow strikes freezing nearby entities
  • Quirks:
    • The area of effect is the sum of the aoe modifier an the level of the enchantment
    • The area of effect is half the length, width and height of the cube that is used similarly to the range calculation used for the Anthropomorphism enchantment
    • Only living entities are affected by the effect
    • The slowness type effect is given to every affected living entity in the affected region with the duration being 50 + 50 * level * power ticks and the intensity being level * power * 2.
    • The entities are damaged with a 0 damage attack to determine whether they are protected from the damage
  • Thread safety grade: minimal
    • World I/O
  • Internal thread safety: undetermined

Bounce

  • Legacy ID: 7
  • Applicable tools: Boots
  • Conflicting enchantments: None!
  • Maximum level: 5
  • Description: Shoots you in the air if you jump on slime blocks
  • Quirks:
    • The player is only launched if the speed is sub-0
    • The players is also only launched if it's standing on a slime block, there is a slime block below it or if there is a slime block two blocks below it and level * power is greater than 2.
    • The player is not launched if the player is sneaking, else the fall distance is set to 0.
    • The new velocity of the player after it has been launched is 0.56 * level * power.
  • Thread safety grade: minimal
    • World I/O
  • Internal thread safety:
  • Note: The enchantment seems to have been originally intended to maintain momentum on slime blocks, however it is far from that right now; unless upstream changes this, it will not be altered on our part due to it being considered work as intended for us (no bug reports so far)

Burst

  • Legacy ID: 8
  • Applicable tools: Bow
  • Conflicting enchantments: Spread
  • Maximum level: 3
  • Description: Rapidly fires arrows in series
  • Quirks:
    • The player may even shoot if the arrows vanish after interacting
    • The player may still be shooting even after it has released it's bow or when it switched to a different item
    • power * level + 1 arrows are shot every interaction
    • The arrows are shot at an interval of two ticks in between
    • The shoot bow event is
  • Thread safety grade: Medium
    • Uses tasks to perform future operations, the contents of the tasks may however not the thread safe on their own (investigation required)
    • Inventory I/O
    • Unforeseen consequences if the player logs out
  • Internal thread safety: Medium
    • Unforeseen consequences if the player logs out

Combustion

  • Legacy ID: 9
  • Applicable tools: Chestplate
  • Conflicting enchantments: None!
  • Maximum level: 4
  • Description: Lights attacking entities on fire when player is attacked
  • Quirks:
    • Even Arrow damage lits the entity
  • Thread safety grade: Low
    • It doesn't make sense to fire it in async as it's logic is very minimal
  • Internal thread safety: Full

Conversion

  • Legacy ID: 10
  • Applicable tools: Sword
  • Conflicting enchantments: None!
  • Maximum level: 4
  • Description: Converts XP to health when right clicking and sneaking
  • Quirks:
  • Consumes levels, not individual XP Points
  • Thread safety grade: HIGH
  • Race conditions could be an issue
  • Already is pretty thread safe
  • Internal thread safety: FULL
  • Race conditions could be an issue, although a weak one

Decapitation

  • Legacy ID: 11
  • Applicable tools: Sword
  • Conflicting enchantments: None!
  • Maximum level: 4
  • Description: Increases the chance for dropping the enemies head on death
  • Quirks:
  • Highest change is a 50% drop rate
  • Thread safety grade: unknown
  • Internal thread safety: Full
  • No interesting logic