Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6626

Mojang-Mapped MappedRegistry#byId not mapped to RegistryMaterials#fromId

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • None
    • Windows 10
      Java 16

    • This server is running CraftBukkit version 3172-Spigot-610a8c0-99561c2 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
    • Yes

      When using Mojang's mappings for Registry, the byId(int) method is not mapped to fromId(int) when using SpecialSource.

      Here's the original line of code, using Mojang's Mappings:

      Registry.ENCHANTMENT.getKey(Registry.ENCHANTMENT.byId(id))
      


      Here's the decompiled actual version (After re-mapping to Spigot):

      IRegistry.X.getKey(IRegistry.X.byId(id)))
      


      Here's what's expected:

      IRegistry.X.getKey(IRegistry.X.fromId(id)))
      

       

            Unassigned Unassigned
            Dessie Dessie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: