-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lack of partial signature remapping #126
Comments
This seems to also affect targets that have a method that shouldn't be remapped on a class that should. For example I ran into a problem using the mixin extension to remap a mixin that looks like this: package com.example.mixin;
import net.minecraft.nbt.NbtList;
import net.minecraft.world.tick.ChunkTickScheduler;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.function.Function;
@Mixin(ChunkTickScheduler.class)
public class ChunkTickSchedulerMixin {
@Inject(
method = "toNbt",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/nbt/NbtList;add(Ljava/lang/Object;)Z"
)
)
private void notProperlyRemapped(long time, Function<Object, String> typeToNameFunction, CallbackInfoReturnable<NbtList> cir) {
// The target descriptor in the @At is not properly remapped and this @Inject fails outside dev
}
} The package com.example.mixin;
import java.util.function.Function;
import net.minecraft.class_6755;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin({class_6755.class})
public class ChunkTickSchedulerMixin {
@Inject(
method = {"method_39365(JLjava/util/function/Function;)Lnet/minecraft/class_2499;"},
at = {@At(
value = "INVOKE",
target = "Lnet/minecraft/nbt/NbtList;add(Ljava/lang/Object;)Z"
)}
)
private void notProperlyRemapped(long time, Function typeToNameFunction, CallbackInfoReturnable cir) {
}
} Notice how the To reproduce the bug I made a new loom project using |
In prior versions of loom, or with
useLegacyMixinAp = true
, signatures which did not exist in the minecraft version being compiled against could still be written partially with named, partially with intermediary mappings. Example:https://github.com/RedLime/SleepBackground/blob/31fcebfba49dd36d9edfa2d53981febcbcecaef8/src/main/java/com/redlimerl/sleepbackground/mixin/MixinMinecraftClient.java#L41-L43. With
useLegacyMixinAp = false
, one has to manually remap the entire signature if it does not exist in the compile target jar, since the named parts of the signature are not remapped (I verified this with vineflower).The text was updated successfully, but these errors were encountered: