Files
MCCustomSkinLoader/Forge/source/net/minecraft/client/resources/SkinManager.java
T
ZekerZhayard 0d5538a110 Support for forge 1.14.2 (#59)
* Support for forge 1.14.2

* Delete unnecessary code.
2019-06-25 14:38:40 +08:00

60 lines
2.7 KiB
Java

package net.minecraft.client.resources;
import java.io.File;
import java.util.Map;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
import com.mojang.authlib.minecraft.MinecraftSessionService;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.versions.mcp.MCPVersion;
public class SkinManager {
static {
if (!MCPVersion.getMCVersion().startsWith("1.13")) {
try {
// Make sure that DownloadingTexture is initialized earlier than FakeSkinManager.
Class.forName("net.minecraft.client.renderer.texture.DownloadingTexture");
} catch (ClassNotFoundException e) {}
}
}
public SkinManager(TextureManager textureManagerInstance, File skinCacheDirectory, MinecraftSessionService sessionService) {
throw new RuntimeException("This method must be transformed!");
}
public ResourceLocation loadSkin(MinecraftProfileTexture profileTexture, MinecraftProfileTexture.Type textureType) {
return this.loadSkin(profileTexture, textureType, null);
}
public ResourceLocation loadSkin(MinecraftProfileTexture profileTexture, MinecraftProfileTexture.Type textureType, SkinManager.SkinAvailableCallback skinAvailableCallback) {
throw new RuntimeException("This method must be transformed!");
}
// For 1.14+
public ResourceLocation func_152789_a(MinecraftProfileTexture profileTexture, MinecraftProfileTexture.Type textureType, SkinManager.ISkinAvailableCallback skinAvailableCallback) {
return this.loadSkin(profileTexture, textureType, skinAvailableCallback);
}
public void loadProfileTextures(GameProfile profile, SkinManager.SkinAvailableCallback skinAvailableCallback, boolean requireSecure) {
throw new RuntimeException("This method must be transformed!");
}
// For 1.14+
public void func_152790_a(GameProfile profile, SkinManager.ISkinAvailableCallback skinAvailableCallback, boolean requireSecure) {
this.loadProfileTextures(profile, skinAvailableCallback, requireSecure);
}
public Map<MinecraftProfileTexture.Type, MinecraftProfileTexture> loadSkinFromCache(GameProfile profile) {
throw new RuntimeException("This method must be transformed!");
}
public interface SkinAvailableCallback {
void skinAvailable(MinecraftProfileTexture.Type typeIn, ResourceLocation location, MinecraftProfileTexture profileTexture);
}
public interface ISkinAvailableCallback extends SkinAvailableCallback {
void onSkinTextureAvailable(MinecraftProfileTexture.Type typeIn, ResourceLocation location, MinecraftProfileTexture profileTexture);
}
}