Skip to content

Instantly share code, notes, and snippets.

@Jonathing
Last active November 8, 2024 03:31
Show Gist options
  • Save Jonathing/905d142447ecef670526ae27243adbba to your computer and use it in GitHub Desktop.
Save Jonathing/905d142447ecef670526ae27243adbba to your computer and use it in GitHub Desktop.
CoreMods 5.1.13 Changelog

NOTE: This CoreMods has since been update to 5.2, and this changelog is out of date! Go here for the new changelog: https://gist.github.com/Jonathing/c3ad28b2a048ac839a7baba5417ee870

CoreMods 5.1.13

CoreMods has just recieved a slew of new features, most of which are aimed at enhancing the usage of ASMAPI within the sandbox. Additionally, a handful of bugs, some which have been present for several years, have finally been fixed.

Here is the changelog since 5.0.1. Note that some of these changes have already been implemented in newer versions of Forge that bundle CoreMods 5.1.6.

New:

  • Updated ASM to 9.7.1 for Java 24 support. (#47)
  • Updated getMethodNode to use the latest API, Opcodes.ASM9. (#49)
  • Renamed appendMethodCall to injectMethodCall. The former still exists for compatibility. (#54)
  • Added MethodType.DYNAMIC. (#44)
  • Added NumberType, an enum which allows you to cast numbers into a specific type to be fed as values for LDC instruction nodes, field nodes, etc. (#51, #54)
    • Added castNumber, a method which casts a number into a number type.
    • Added buildNumberLdcInsnNode, a method which returns an LDC instruction node with a number value casted to a number type. Fixes #42.
  • Added a new insertInsnList method which accepts an AbstractInsnNode as opposed to the components of a MethodInsnNode. (#54)
    • This allows for you to use ASMAPI to insert instruction lists using ASMAPI's InsertMode, reducing the need to interface with the method node's instruction list directly.
  • Added InsnType, an enum which allows you to search for instructions of a specific instruction type. These types mirror those found in AbstractInsnNode. (#49)
    • Several helper methods such as findFirstInstruction have been given an additional version with an InsnType parameter. This can be especially useful for looking for specific instructions that do not use Opcodes (such as line number instructions).
  • Added insnToString, a method which turns an instruction node into a String representation. (#49)
  • Added insnListToString, a method which turns an instruction list into a String representation. (#49)
  • Added ldcInsnClassToString, a method which gets the object class of the LDC constant as a String representation. Fixes #30. (#51)

Fixed:

  • ASMAPI is now coated in JavaDocs, addressing its former lack of documentation. (#48)
  • Fixed dependency issues when attempting to depend on CoreMods as a project. (#37)
  • Fixed getSystemPropertyFlag prepending "coremods." to the start of the requested property to check for. Fixes #31. (#41, #45)
  • Fixed findFirstInstructionBefore ignoring the start index. Fixes #35. (#50)
@Jonathing
Copy link
Author

As of right now, Minecraft Forge for 1.21.1 has included these changes, with 1.21.3 queued up for merge. I have made PRs to update CoreMods all the way back to Minecraft Forge for 1.18.2, but it may take some time given the discrepancies found in the older buildscripts when it comes to dealing with transitive dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment