Details
-
Bug
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Done
-
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
Description
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)))