Make legacy skull loading configurable

This commit is contained in:
RaphiMC 2023-04-28 21:24:59 +02:00
parent 3bbe0eea98
commit 7cc21baff9

View File

@ -28,7 +28,14 @@ import net.raphimc.viaproxy.cli.options.Options;
public abstract class ViaLegacyConfigTransformer { public abstract class ViaLegacyConfigTransformer {
@CInject(method = "isLegacySkinLoading", target = @CTarget("HEAD"), cancellable = true) @CInject(method = "isLegacySkinLoading", target = @CTarget("HEAD"), cancellable = true)
private void makeGUIConfigurable(final InjectionCallback ic) { private void makeGUIConfigurable1(final InjectionCallback ic) {
if (Options.LEGACY_SKIN_LOADING != null) {
ic.setReturnValue(Options.LEGACY_SKIN_LOADING);
}
}
@CInject(method = "isLegacySkullLoading", target = @CTarget("HEAD"), cancellable = true)
private void makeGUIConfigurable2(final InjectionCallback ic) {
if (Options.LEGACY_SKIN_LOADING != null) { if (Options.LEGACY_SKIN_LOADING != null) {
ic.setReturnValue(Options.LEGACY_SKIN_LOADING); ic.setReturnValue(Options.LEGACY_SKIN_LOADING);
} }