Java Edition:Level 0 Enchantment

Sharpness_0_Diamond_Sword.png
Command Block.png
Warning: Commands 
This feature requires commands that are normally behind the commands toggle, which may be dangerous. Perform at your own risk.

From 18w06a to 18w07c (1.13 snapshots), the /enchant command was available in survival, regardless of commands being enabled.[1] This allowed for the creation of items with level 0 enchantments due to an incorrect level check.[2]

Level 0 enchantments were changed to be deleted when loaded in 24w33a (a 1.21.2 snapshot) or above to fix a crash bug.[3]

Obtaining

The command has the following syntax: /enchant <target(s)> <enchantment> [<level>] (e.g. /enchant @s sharpness 0). All targets must be players, the enchantment a valid post-flattening ID (i.e. not a number), and the level must be between 0 and the highest legitimate level available for the selected enchantment (inclusive). If the level is not specified, it will default to 1. The command will then run a check against all targets for the following:

  • They have an item in their main hand
  • The item supports the enchantment normally as if applied by an anvil (also checks for conflicting enchantments)
  • The enchantment is not already applied

If all checks succeed, the enchantment is applied.

Combos

See also

References

  1. MC-124948. bugs.mojang.com.
  2. MC-125364. bugs.mojang.com.
  3. MC-273555. bugs.mojang.com. Private issue. Archived.