
1.20.4 support
PukPukov opened this issue · 6 comments
@kb-1000 1.20.2 was working for me, however 1.20.4 doesn't start with:
fabric-api-0.91.1+1.20.4.jar
fabric-loader-0.15.0
no-telemetry-1.7.0.jar
It throws the 255 Exit Code with this error:
The game crashed whilst initializing game
Error: java.lang.RuntimeException: Mixin transformation of net.minecraft.class_6628 failed
Minecraft 1.20.3 seems to have changed the way telemetry is disabled in dev builds.
net.minecraft.client.session.telemetry.TelemetryManager
:
private TelemetrySender computeSender() {
if (!this.client.isTelemetryEnabledByApi()) {
return TelemetrySender.NOOP;
}
...
}
I believe the new mixin should be:
@Mixin(targets = "net.minecraft.client.session.telemetry.TelemetryManager")
@Environment(EnvType.CLIENT)
public class TelemetryManagerMixin {
@Redirect(method = "Lnet/minecraft/client/session/telemetry/TelemetryManager;computeSender", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/MinecraftClient;isTelemetryEnabledByApi()Z"), remap = true)
private boolean disableTelemetrySession(MinecraftClient instance) {
return false;
}
}
I am not quite sure how to integrate this into the current system with the pre and post mixins, so leaving this as a comment instead of a PR for @kb-1000
The pre/post mixin split right now is because mojmap changed the package of TelemetryManager in 1.19.3, which breaks binary compatibility on Forge so I need a second mixin class to make a separate refmap entry.
The new change doesn't need a new mixin class, just an additional injector in the current mixin class, and a group to ensure one of them injects successfully. I'm working on that rn.
Is this getting a release tag on git or a publishing on modrinth etc? For now it can be installed from the workflow build: https://github.com/kb-1000/no-telemetry/actions/runs/7172504788