Minecraft
  1. Minecraft
  2. MC-99900

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.10.2, Minecraft 16w32b, Minecraft 16w33a
    • Fix Version/s: Minecraft 16w41a
    • Security Level: Minecraft - Public (Viewable by everyone)
    • Labels:
      None
    • Environment:

      MCP924; present when obfuscated

    • Confirmation Status:
      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).

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            [Mojang] Agnes Larsson
            Reporter:
            [Helper] Pokechu22
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: