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 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.
- Updated ASM to 9.7.1 for Java 24 support. (#47)
- Updated
getMethodNode
to use the latest API,Opcodes.ASM9
. (#49) - Renamed
appendMethodCall
toinjectMethodCall
. 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
- Added a new
insertInsnList
method which accepts anAbstractInsnNode
as opposed to the components of aMethodInsnNode
. (#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 inAbstractInsnNode
. (#49)- Several helper methods such as
findFirstInstruction
have been given an additional version with anInsnType
parameter. This can be especially useful for looking for specific instructions that do not use Opcodes (such as line number instructions).
- Several helper methods such as
- 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)
- 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)
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.