Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-99900

Enchantments boostrap class has the wrong error message when called before bootstrap

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.10.2, Minecraft 16w32b, Minecraft 16w33a
    • Minecraft 16w41a
    • None
    • MCP924; present when obfuscated
    • Unconfirmed

    Description

      This is a minor thing but it may cause issues within other crashes. When a registry is accessed before the bootstrap has finished, it throws an exception, but for the Enchantments registry, the exception has the wrong name: it refers to itself as MobEffects. The MobEffects registry (which contains potion effects) properly refers to itself as MobEffects.

      This doesn't cause any issues within the game itself, but may cause confusion if this error state ever does occur.

      I can be sure that it is actually the Enchantments registry since A) it's a list of enchantments and B) its other error message is "Invalid Enchantment requested".

      The fix is trivial: Just change

      throw new RuntimeException("Accessed MobEffects before Bootstrap!");
      

      to

      throw new RuntimeException("Accessed Enchantments before Bootstrap!");
      

      on line 45 of the enchantment registry (in MCP, net.minecraft.init.Enchantments; in 1.9 and 1.9.1-pre3 obfuscation in agq).

      Attachments

        Activity

          People

            FruBasilicum [Mojang] Agnes Larsson
            pokechu22 [Mod] Pokechu22
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: