Skip to content

Conversation

@HaHaWTH
Copy link
Contributor

@HaHaWTH HaHaWTH commented Jun 19, 2025

Currently asm-utils only adds the rewrite rule for Class.forName(String), this pull request adds rewrite rules for Class.forName(String, boolean, ClassLoader) and Class.forName(Module, String).

These rewrites are existed in AbstractDefaultRulesReflectionProxy but rules are not added yet.

Tested on Paper 1.21.5 with following code:

Class<?> dataWatcherClazz = Class.forName("net.minecraft.network.syncher.DataWatcher", false, getClassLoader());
logger.info(dataWatcherClazz.getName());
  • Before this PR: ClassNotFoundException is thrown
  • After: Correctly remapped to net.minecraft.network.syncher.SynchedEntityData

@Machine-Maker Machine-Maker merged commit 5789486 into PaperMC:main Jun 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants