tiny-remapper icon indicating copy to clipboard operation
tiny-remapper copied to clipboard

Add useResolvedOwners option to swap the owner in member accesses with the resolved class

Open Player3324 opened this issue 3 years ago • 1 comments

Fixes #87 and supersedes #89 with a more extensive approach that covers fields and interface methods as well since those could suffer from the same issue. It also makes the new behavior opt in (for now)

Player3324 avatar Mar 14 '22 18:03 Player3324

Upon testing I get a different error now:

Stacktrace
java.lang.VerifyError: Bad invokespecial instruction: interface method reference is in an indirect superinterface.
Exception Details:
  Location:
    net/minecraft/world/level/ICombinedAccess.a(Lnet/minecraft/core/BlockPosition;Lnet/minecraft/world/level/block/entity/TileEntityTypes;)Ljava/util/Optional; @3: invokespecial
  Reason:
    Error exists in the bytecode
  Bytecode:
    0000000: 2a2b 2cb7 001a b0                      

	at net.minecraft.data.worldgen.features.EndFeatures.<clinit>(EndFeatures.java:18)
	at net.minecraft.data.worldgen.features.FeatureUtils.a(FeatureUtils.java:23)
	at net.minecraft.data.RegistryGeneration.a(RegistryGeneration.java:86)
	at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)
	at net.minecraft.data.RegistryGeneration.<clinit>(RegistryGeneration.java:85)
	at net.minecraft.core.IRegistry.<clinit>(IRegistry.java:291)
	at net.minecraft.server.DispenserRegistry.a(DispenserRegistry.java:67)
	at net.minecraft.server.Main.main(Main.java:106)
	at org.bukkit.craftbukkit.Main.main(Main.java:293)

we believe this is similar to what we fix for fields here https://github.com/PaperMC/paperweight/blob/489ab48d996f47d10d2e835e0f08c8716df41c5c/paperweight-lib/src/main/kotlin/tasks/FixJarForReobf.kt#L132 but we will investigate

MiniDigger avatar Mar 14 '22 20:03 MiniDigger