Skip to content

Commit

Permalink
Remove deprecations from mapping methods (#58)
Browse files Browse the repository at this point in the history
Older versions of Forge are still open to recieve CoreMods updates
  • Loading branch information
Jonathing authored Nov 1, 2024
1 parent aa592c8 commit cfeab74
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/java/net/minecraftforge/coremod/api/ASMAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ public static LdcInsnNode buildNumberLdcInsnNode(final Number value, final Numbe
* @param name The SRG name of the method
* @return The mapped name of the method
*
* @deprecated Forge no longer uses SRG names in production
* @apiNote As of Minecraft 1.20.4, Forge no longer uses SRG names in production. While the mapping system will
* still work for sake of backwards-compatibility, you should not be using this method if you are on 1.20.4 or
* later.
*/
@Deprecated(forRemoval = true, since = "5.1")
public static String mapMethod(String name) {
return map(name, INameMappingService.Domain.METHOD);
}
Expand All @@ -155,14 +156,14 @@ public static String mapMethod(String name) {
* @param name The SRG name of the field
* @return The mapped name of the field
*
* @deprecated Forge no longer uses SRG names in production
* @apiNote As of Minecraft 1.20.4, Forge no longer uses SRG names in production. While the mapping system will
* still work for sake of backwards-compatibility, you should not be using this method if you are on 1.20.4 or
* later.
*/
@Deprecated(forRemoval = true, since = "5.1")
public static String mapField(String name) {
return map(name, INameMappingService.Domain.FIELD);
}

@Deprecated(forRemoval = true, since = "5.1")
private static String map(String name, INameMappingService.Domain domain) {
return Optional.ofNullable(Launcher.INSTANCE).
map(Launcher::environment).
Expand Down

0 comments on commit cfeab74

Please sign in to comment.