Mojira Archive
MCPE-180331

"minecraft:enchantable" component value uses a modulus formula

According to the [official docs|https://learn.microsoft.com/en-us/minecraft/creator/reference/content/itemreference/examples/itemcomponents/minecraft_enchantable?view=minecraft-bedrock-stable] the "minecraft:enchantable" component supports an integer type. However, upon further testing, it seems that it uses the following formula:

value = value % 256

rather than using the actual value.

Reproduce:

  • Download the attached pack below(As of 27/08/2024, I have attached an updated version to keep the item format and min engine version to 1.21.30)
  • Import the pack into Preview 1.21.30.34
  • Give yourself the following items:
    • mojira:enchantable_0
    • mojira:enchantable_1
    • mojira:enchantable_255
    • mojira:enchantable_256
    • mojira:enchantable_257
    • mojira:enchantable_511
  • Open your inventory and hover over the items

Expected Result:

  • mojira:enchantable_0 should not be enchantable
  • mojira:enchantable_1 should be enchantable, low enchants
  • mojira:enchantable_255 should be enchantable, high enchants
  • mojira:enchantable_256 should be enchantable, high enchants
  • mojira:enchantable_257 should be enchantable, high enchants
  • mojira:enchantable_511 should be enchantable, high enchants

Actual Result:

  • mojira:enchantable_0 is not enchantable
  • mojira:enchantable_1 is enchantable, low enchants
  • mojira:enchantable_255 is enchantable, high enchants
  • mojira:enchantable_256 is not enchantable
  • mojira:enchantable_257 is enchantable, low enchants
  • mojira:enchantable_511 is enchantable, high enchants

Unresolved

SmokeyStack

2024-04-04, 09:26 PM

2024-08-28, 06:59 AM

2

1

Confirmed

1234884

1.21.0.20 Preview

-