aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/mixin/PlayerSkinProviderMixin.java
blob: 04761329eb38a44cf73f42826cc9c0c1c6b3d4b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package de.hysky.skyblocker.mixin;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import com.llamalad7.mixinextras.sugar.Local;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.minecraft.MinecraftProfileTextures;
import com.mojang.authlib.minecraft.MinecraftSessionService;

import de.hysky.skyblocker.utils.Utils;

@Mixin(targets = "net.minecraft.client.texture.PlayerSkinProvider$1")
public class PlayerSkinProviderMixin {

	//TODO This may not be needed anymore, will need to check
	/*@ModifyReturnValue(method = "method_52867", at = @At("RETURN"))
	private static MinecraftProfileTextures skyblocker$fixTexturesThatHadAnInvalidSignature(MinecraftProfileTextures texture, @Local MinecraftSessionService sessionService, @Local GameProfile profile) {
		if (Utils.isOnHypixel() && texture == MinecraftProfileTextures.EMPTY) {
			try {
				return MinecraftProfileTextures.fromMap(sessionService.getTextures(profile, false), false);
			} catch (Throwable t) {
				return MinecraftProfileTextures.EMPTY;
			}
		}

		return texture;
	}*/
}