Java 类net.minecraft.client.resources.DefaultPlayerSkin 实例源码

项目:DecompiledMinecraft    文件:TeleportToTeam.java   
public TeamSelectionObject(ScorePlayerTeam p_i45492_2_)
{
    this.field_178676_b = p_i45492_2_;
    this.field_178675_d = Lists.<NetworkPlayerInfo>newArrayList();

    for (String s : p_i45492_2_.getMembershipCollection())
    {
        NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getNetHandler().getPlayerInfo(s);

        if (networkplayerinfo != null)
        {
            this.field_178675_d.add(networkplayerinfo);
        }
    }

    if (!this.field_178675_d.isEmpty())
    {
        String s1 = ((NetworkPlayerInfo)this.field_178675_d.get((new Random()).nextInt(this.field_178675_d.size()))).getGameProfile().getName();
        this.field_178677_c = AbstractClientPlayer.getLocationSkin(s1);
        AbstractClientPlayer.getDownloadImageSkin(this.field_178677_c, s1);
    }
    else
    {
        this.field_178677_c = DefaultPlayerSkin.getDefaultSkinLegacy();
    }
}
项目:BaseClient    文件:TeleportToTeam.java   
public TeamSelectionObject(ScorePlayerTeam p_i45492_2_)
{
    this.field_178676_b = p_i45492_2_;
    this.field_178675_d = Lists.<NetworkPlayerInfo>newArrayList();

    for (String s : p_i45492_2_.getMembershipCollection())
    {
        NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getNetHandler().getPlayerInfo(s);

        if (networkplayerinfo != null)
        {
            this.field_178675_d.add(networkplayerinfo);
        }
    }

    if (!this.field_178675_d.isEmpty())
    {
        String s1 = ((NetworkPlayerInfo)this.field_178675_d.get((new Random()).nextInt(this.field_178675_d.size()))).getGameProfile().getName();
        this.field_178677_c = AbstractClientPlayer.getLocationSkin(s1);
        AbstractClientPlayer.getDownloadImageSkin(this.field_178677_c, s1);
    }
    else
    {
        this.field_178677_c = DefaultPlayerSkin.getDefaultSkinLegacy();
    }
}
项目:BaseClient    文件:TeleportToTeam.java   
public TeamSelectionObject(ScorePlayerTeam p_i45492_2_)
{
    this.field_178676_b = p_i45492_2_;
    this.field_178675_d = Lists.<NetworkPlayerInfo>newArrayList();

    for (String s : p_i45492_2_.getMembershipCollection())
    {
        NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getNetHandler().getPlayerInfo(s);

        if (networkplayerinfo != null)
        {
            this.field_178675_d.add(networkplayerinfo);
        }
    }

    if (!this.field_178675_d.isEmpty())
    {
        String s1 = ((NetworkPlayerInfo)this.field_178675_d.get((new Random()).nextInt(this.field_178675_d.size()))).getGameProfile().getName();
        this.field_178677_c = AbstractClientPlayer.getLocationSkin(s1);
        AbstractClientPlayer.getDownloadImageSkin(this.field_178677_c, s1);
    }
    else
    {
        this.field_178677_c = DefaultPlayerSkin.getDefaultSkinLegacy();
    }
}
项目:Backmemed    文件:TeleportToTeam.java   
public TeamSelectionObject(ScorePlayerTeam p_i45492_2_)
{
    this.team = p_i45492_2_;
    this.players = Lists.<NetworkPlayerInfo>newArrayList();

    for (String s : p_i45492_2_.getMembershipCollection())
    {
        NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getConnection().getPlayerInfo(s);

        if (networkplayerinfo != null)
        {
            this.players.add(networkplayerinfo);
        }
    }

    if (this.players.isEmpty())
    {
        this.location = DefaultPlayerSkin.getDefaultSkinLegacy();
    }
    else
    {
        String s1 = ((NetworkPlayerInfo)this.players.get((new Random()).nextInt(this.players.size()))).getGameProfile().getName();
        this.location = AbstractClientPlayer.getLocationSkin(s1);
        AbstractClientPlayer.getDownloadImageSkin(this.location, s1);
    }
}
项目:CustomWorldGen    文件:TeleportToTeam.java   
public TeamSelectionObject(ScorePlayerTeam p_i45492_2_)
{
    this.team = p_i45492_2_;
    this.players = Lists.<NetworkPlayerInfo>newArrayList();

    for (String s : p_i45492_2_.getMembershipCollection())
    {
        NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getConnection().getPlayerInfo(s);

        if (networkplayerinfo != null)
        {
            this.players.add(networkplayerinfo);
        }
    }

    if (this.players.isEmpty())
    {
        this.location = DefaultPlayerSkin.getDefaultSkinLegacy();
    }
    else
    {
        String s1 = ((NetworkPlayerInfo)this.players.get((new Random()).nextInt(this.players.size()))).getGameProfile().getName();
        this.location = AbstractClientPlayer.getLocationSkin(s1);
        AbstractClientPlayer.getDownloadImageSkin(this.location, s1);
    }
}
项目:metamorph    文件:PlayerMorph.java   
/**
 * Get this player's skin 
 */
@Override
public ResourceLocation getLocationSkin()
{
    ResourceLocation resourcelocation = DefaultPlayerSkin.getDefaultSkinLegacy();

    if (profile != null)
    {
        Minecraft minecraft = Minecraft.getMinecraft();
        Map<Type, MinecraftProfileTexture> map = minecraft.getSkinManager().loadSkinFromCache(profile);

        if (map.containsKey(Type.SKIN))
        {
            resourcelocation = minecraft.getSkinManager().loadSkin((MinecraftProfileTexture) map.get(Type.SKIN), Type.SKIN);
        }
        else
        {
            UUID uuid = EntityPlayer.getUUID(profile);
            resourcelocation = DefaultPlayerSkin.getDefaultSkin(uuid);
        }
    }

    return resourcelocation;
}
项目:ExpandedRailsMod    文件:TeleportToTeam.java   
public TeamSelectionObject(ScorePlayerTeam p_i45492_2_)
{
    this.team = p_i45492_2_;
    this.players = Lists.<NetworkPlayerInfo>newArrayList();

    for (String s : p_i45492_2_.getMembershipCollection())
    {
        NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getConnection().getPlayerInfo(s);

        if (networkplayerinfo != null)
        {
            this.players.add(networkplayerinfo);
        }
    }

    if (this.players.isEmpty())
    {
        this.location = DefaultPlayerSkin.getDefaultSkinLegacy();
    }
    else
    {
        String s1 = ((NetworkPlayerInfo)this.players.get((new Random()).nextInt(this.players.size()))).getGameProfile().getName();
        this.location = AbstractClientPlayer.getLocationSkin(s1);
        AbstractClientPlayer.getDownloadImageSkin(this.location, s1);
    }
}
项目:OpenBlocks    文件:EntityMiniMe.java   
@SideOnly(Side.CLIENT)
public ResourceLocation getSkinResourceLocation() {
    if (owner != null) {
        final SkinManager manager = Minecraft.getMinecraft().getSkinManager();
        Map<Type, MinecraftProfileTexture> map = manager.loadSkinFromCache(owner);

        if (map.containsKey(Type.SKIN)) {
            final MinecraftProfileTexture skin = map.get(Type.SKIN);
            return manager.loadSkin(skin, Type.SKIN);
        } else {
            UUID uuid = EntityPlayer.getUUID(owner);
            return DefaultPlayerSkin.getDefaultSkin(uuid);
        }
    }

    return null;
}
项目:DecompiledMinecraft    文件:RealmsScreen.java   
public static void bindFace(String p_bindFace_0_, String p_bindFace_1_)
{
    ResourceLocation resourcelocation = AbstractClientPlayer.getLocationSkin(p_bindFace_1_);

    if (resourcelocation == null)
    {
        resourcelocation = DefaultPlayerSkin.getDefaultSkin(UUIDTypeAdapter.fromString(p_bindFace_0_));
    }

    AbstractClientPlayer.getDownloadImageSkin(resourcelocation, p_bindFace_1_);
    Minecraft.getMinecraft().getTextureManager().bindTexture(resourcelocation);
}
项目:DecompiledMinecraft    文件:NetworkPlayerInfo.java   
public ResourceLocation getLocationSkin()
{
    if (this.locationSkin == null)
    {
        this.loadPlayerTextures();
    }

    return (ResourceLocation)Objects.firstNonNull(this.locationSkin, DefaultPlayerSkin.getDefaultSkin(this.gameProfile.getId()));
}
项目:BaseClient    文件:RealmsScreen.java   
public static void bindFace(String p_bindFace_0_, String p_bindFace_1_)
{
    ResourceLocation resourcelocation = AbstractClientPlayer.getLocationSkin(p_bindFace_1_);

    if (resourcelocation == null)
    {
        resourcelocation = DefaultPlayerSkin.getDefaultSkin(UUIDTypeAdapter.fromString(p_bindFace_0_));
    }

    AbstractClientPlayer.getDownloadImageSkin(resourcelocation, p_bindFace_1_);
    Minecraft.getMinecraft().getTextureManager().bindTexture(resourcelocation);
}
项目:BaseClient    文件:NetworkPlayerInfo.java   
public ResourceLocation getLocationSkin()
{
    if (this.locationSkin == null)
    {
        this.loadPlayerTextures();
    }

    return (ResourceLocation)Objects.firstNonNull(this.locationSkin, DefaultPlayerSkin.getDefaultSkin(this.gameProfile.getId()));
}
项目:BaseClient    文件:RealmsScreen.java   
public static void bindFace(String p_bindFace_0_, String p_bindFace_1_)
{
    ResourceLocation resourcelocation = AbstractClientPlayer.getLocationSkin(p_bindFace_1_);

    if (resourcelocation == null)
    {
        resourcelocation = DefaultPlayerSkin.getDefaultSkin(UUIDTypeAdapter.fromString(p_bindFace_0_));
    }

    AbstractClientPlayer.getDownloadImageSkin(resourcelocation, p_bindFace_1_);
    Minecraft.getMinecraft().getTextureManager().bindTexture(resourcelocation);
}
项目:BaseClient    文件:NetworkPlayerInfo.java   
public ResourceLocation getLocationSkin()
{
    if (this.locationSkin == null)
    {
        this.loadPlayerTextures();
    }

    return (ResourceLocation)Objects.firstNonNull(this.locationSkin, DefaultPlayerSkin.getDefaultSkin(this.gameProfile.getId()));
}
项目:Backmemed    文件:RealmsScreen.java   
public static void bindFace(String p_bindFace_0_, String p_bindFace_1_)
{
    ResourceLocation resourcelocation = AbstractClientPlayer.getLocationSkin(p_bindFace_1_);

    if (resourcelocation == null)
    {
        resourcelocation = DefaultPlayerSkin.getDefaultSkin(UUIDTypeAdapter.fromString(p_bindFace_0_));
    }

    AbstractClientPlayer.getDownloadImageSkin(resourcelocation, p_bindFace_1_);
    Minecraft.getMinecraft().getTextureManager().bindTexture(resourcelocation);
}
项目:Mods    文件:RenderPlayerDisguised.java   
@Override
public ResourceLocation getEntityTexture(final AbstractClientPlayer entity) {

    return entity.getCapability(TF2weapons.WEAPONS_CAP, null).skinDisguise != null
            ? entity.getCapability(TF2weapons.WEAPONS_CAP, null).skinDisguise
            : DefaultPlayerSkin.getDefaultSkin(entity.getUniqueID());
}
项目:CustomWorldGen    文件:RealmsScreen.java   
public static void bindFace(String p_bindFace_0_, String p_bindFace_1_)
{
    ResourceLocation resourcelocation = AbstractClientPlayer.getLocationSkin(p_bindFace_1_);

    if (resourcelocation == null)
    {
        resourcelocation = DefaultPlayerSkin.getDefaultSkin(UUIDTypeAdapter.fromString(p_bindFace_0_));
    }

    AbstractClientPlayer.getDownloadImageSkin(resourcelocation, p_bindFace_1_);
    Minecraft.getMinecraft().getTextureManager().bindTexture(resourcelocation);
}
项目:MineLittlePony    文件:HDSkinManager.java   
private void loadTexture(GameProfile profile, final Type type, final SkinAvailableCallback callback) {
    if (profile.getId() != null) {
        Map<Type, MinecraftProfileTexture> data = getProfileData(profile);
        final MinecraftProfileTexture texture = data.get(type);

        String skinDir = type.toString().toLowerCase() + "s/";
        final ResourceLocation skin = new ResourceLocation("hdskins", skinDir + texture.getHash());
        File file2 = new File(LiteLoader.getAssetsDirectory(), "hd/" + skinDir + texture.getHash().substring(0, 2) + "/" + texture.getHash());

        final IImageBuffer imagebufferdownload = type == Type.SKIN ? new ImageBufferDownloadHD() : null;

        ITextureObject texObject = new ThreadDownloadImageETag(file2, texture.getUrl(),
                DefaultPlayerSkin.getDefaultSkinLegacy(),
                new IImageBuffer() {
                    @Nonnull
                    @Override
                    public BufferedImage parseUserSkin(@Nonnull BufferedImage image) {
                        BufferedImage image1 = image;
                        if (imagebufferdownload != null) {
                            image1 = imagebufferdownload.parseUserSkin(image);
                        }
                        return image1 == null ? image : image1;
                    }

                    @Override
                    public void skinAvailable() {
                        if (imagebufferdownload != null) {
                            imagebufferdownload.skinAvailable();
                        }
                        callback.skinAvailable(type, skin, texture);
                    }
                });

        // schedule texture loading on the main thread.
        TextureLoader.loadTexture(skin, texObject);
    }
}
项目:Ice    文件:DeathMarkerRenderer.java   
@Override
public void renderTileEntityAt(final DeathMarkerTileEntity ice, final double x, final double y, final double z, final float partialTicks, final int destroyStage) {
    ResourceLocation texture = DefaultPlayerSkin.getDefaultSkin(new UUID(0, 0));

    final GameProfile owner = ice.getOwner();

    if (owner == null) {
        Ice.getProxy().getLogger().warn("Rendering death marker with no owner at %d,%d,%d!", x, y, z);
    } else {
        final Map<Type, MinecraftProfileTexture> profileTextures = this.skinManager.loadSkinFromCache(owner);

        if (profileTextures.containsKey(Type.SKIN)) {
            texture = this.skinManager.loadSkin(profileTextures.get(Type.SKIN), Type.SKIN);
        } else {
            texture = DefaultPlayerSkin.getDefaultSkin(owner.getId());
        }
    }

    this.bindTexture(texture);

    GL11.glPushMatrix();

    final float age = ice.getAge() + partialTicks;
    final double bobHeight = 0.5 + Math.sin(age * Math.PI / 50) / 4;

    GL11.glDisable(GL11.GL_CULL_FACE);
    GL11.glTranslated(x + 0.5, y + bobHeight, z + 0.5);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glScaled(-1, -1, 1);
    GL11.glEnable(GL11.GL_ALPHA_TEST);
    this.model.render(null, 0, 0, 0, 3 * age, 0, 0.0625f);

    GL11.glPopMatrix();
}
项目:LootableBodies    文件:CorpseRenderer.java   
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 *
 * @param entity The entity to be rendered
 */
@Override
protected ResourceLocation getEntityTexture(EntityLootableBody entity) {
    if(LootableBodies.useLocalSkin) return localSkin;

    GameProfile profile = entity.getGameProfile();
    if (profile != null && profile.getId() != null) {
        return getSkin(profile);
    }

    return DefaultPlayerSkin.getDefaultSkinLegacy();
}
项目:LootableBodies    文件:CorpseRenderer.java   
public static ResourceLocation getSkin(GameProfile profile) {
    final Minecraft minecraft = Minecraft.getMinecraft();
    final Map loadSkinFromCache = minecraft.getSkinManager().loadSkinFromCache(profile); // returned map may or may not be typed
    if (loadSkinFromCache.containsKey(MinecraftProfileTexture.Type.SKIN)) {
        ResourceLocation skin = minecraft.getSkinManager().loadSkin((MinecraftProfileTexture) loadSkinFromCache.get(MinecraftProfileTexture.Type.SKIN), MinecraftProfileTexture.Type.SKIN);
        return skin;
    } else {
        return DefaultPlayerSkin.getDefaultSkin(profile.getId());
    }
}
项目:DrCyanos_Lootable-Bodies    文件:CorpseRenderer.java   
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 *
 * @param entity The entity to be rendered
 */
@Override
protected ResourceLocation getEntityTexture(EntityLootableBody entity) {
    if(LootableBodies.useLocalSkin) return localSkin;

    GameProfile profile = entity.getGameProfile();
    if (profile != null && profile.getId() != null) {
        return getSkin(profile);
    }

    return DefaultPlayerSkin.getDefaultSkinLegacy();
}
项目:DrCyanos_Lootable-Bodies    文件:CorpseRenderer.java   
public static ResourceLocation getSkin(GameProfile profile) {
    final Minecraft minecraft = Minecraft.getMinecraft();
    final Map loadSkinFromCache = minecraft.getSkinManager().loadSkinFromCache(profile); // returned map may or may not be typed
    if (loadSkinFromCache.containsKey(MinecraftProfileTexture.Type.SKIN)) {
        ResourceLocation skin = minecraft.getSkinManager().loadSkin((MinecraftProfileTexture) loadSkinFromCache.get(MinecraftProfileTexture.Type.SKIN), MinecraftProfileTexture.Type.SKIN);
        return skin;
    } else {
        return DefaultPlayerSkin.getDefaultSkin(profile.getId());
    }
}
项目:DecompiledMinecraft    文件:AbstractClientPlayer.java   
/**
 * Returns true if the player instance has an associated skin.
 */
public ResourceLocation getLocationSkin()
{
    NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
    return networkplayerinfo == null ? DefaultPlayerSkin.getDefaultSkin(this.getUniqueID()) : networkplayerinfo.getLocationSkin();
}
项目:DecompiledMinecraft    文件:AbstractClientPlayer.java   
public String getSkinType()
{
    NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
    return networkplayerinfo == null ? DefaultPlayerSkin.getSkinType(this.getUniqueID()) : networkplayerinfo.getSkinType();
}
项目:DecompiledMinecraft    文件:NetworkPlayerInfo.java   
public String getSkinType()
{
    return this.skinType == null ? DefaultPlayerSkin.getSkinType(this.gameProfile.getId()) : this.skinType;
}
项目:BaseClient    文件:AbstractClientPlayer.java   
/**
 * Returns true if the player instance has an associated skin.
 */
public ResourceLocation getLocationSkin()
{
    NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
    return networkplayerinfo == null ? DefaultPlayerSkin.getDefaultSkin(this.getUniqueID()) : networkplayerinfo.getLocationSkin();
}
项目:BaseClient    文件:AbstractClientPlayer.java   
public String getSkinType()
{
    NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
    return networkplayerinfo == null ? DefaultPlayerSkin.getSkinType(this.getUniqueID()) : networkplayerinfo.getSkinType();
}
项目:BaseClient    文件:NetworkPlayerInfo.java   
public String getSkinType()
{
    return this.skinType == null ? DefaultPlayerSkin.getSkinType(this.gameProfile.getId()) : this.skinType;
}
项目:BaseClient    文件:AbstractClientPlayer.java   
/**
 * Returns true if the player instance has an associated skin.
 */
public ResourceLocation getLocationSkin()
{
    NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
    return networkplayerinfo == null ? DefaultPlayerSkin.getDefaultSkin(this.getUniqueID()) : networkplayerinfo.getLocationSkin();
}
项目:BaseClient    文件:AbstractClientPlayer.java   
public String getSkinType()
{
    NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
    return networkplayerinfo == null ? DefaultPlayerSkin.getSkinType(this.getUniqueID()) : networkplayerinfo.getSkinType();
}
项目:BaseClient    文件:NetworkPlayerInfo.java   
public String getSkinType()
{
    return this.skinType == null ? DefaultPlayerSkin.getSkinType(this.gameProfile.getId()) : this.skinType;
}
项目:CapesAPI-ClientImplementation    文件:AbstractClientPlayer.java   
/**
 * Returns true if the player instance has an associated skin.
 */
public ResourceLocation getLocationSkin() {
  NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
  return networkplayerinfo == null ? DefaultPlayerSkin.getDefaultSkin(this.getUniqueID()) : networkplayerinfo.getLocationSkin();
}
项目:CapesAPI-ClientImplementation    文件:AbstractClientPlayer.java   
public String getSkinType() {
  NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
  return networkplayerinfo == null ? DefaultPlayerSkin.getSkinType(this.getUniqueID()) : networkplayerinfo.getSkinType();
}
项目:Backmemed    文件:AbstractClientPlayer.java   
/**
 * Returns true if the player instance has an associated skin.
 */
public ResourceLocation getLocationSkin()
{
    NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
    return networkplayerinfo == null ? DefaultPlayerSkin.getDefaultSkin(this.getUniqueID()) : networkplayerinfo.getLocationSkin();
}
项目:Backmemed    文件:AbstractClientPlayer.java   
public String getSkinType()
{
    NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
    return networkplayerinfo == null ? DefaultPlayerSkin.getSkinType(this.getUniqueID()) : networkplayerinfo.getSkinType();
}
项目:Backmemed    文件:NetworkPlayerInfo.java   
public String getSkinType()
{
    return this.skinType == null ? DefaultPlayerSkin.getSkinType(this.gameProfile.getId()) : this.skinType;
}
项目:Backmemed    文件:NetworkPlayerInfo.java   
public ResourceLocation getLocationSkin()
{
    this.loadPlayerTextures();
    return (ResourceLocation)Objects.firstNonNull(this.playerTextures.get(Type.SKIN), DefaultPlayerSkin.getDefaultSkin(this.gameProfile.getId()));
}
项目:CustomWorldGen    文件:AbstractClientPlayer.java   
/**
 * Returns true if the player instance has an associated skin.
 */
public ResourceLocation getLocationSkin()
{
    NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
    return networkplayerinfo == null ? DefaultPlayerSkin.getDefaultSkin(this.getUniqueID()) : networkplayerinfo.getLocationSkin();
}
项目:CustomWorldGen    文件:AbstractClientPlayer.java   
public String getSkinType()
{
    NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
    return networkplayerinfo == null ? DefaultPlayerSkin.getSkinType(this.getUniqueID()) : networkplayerinfo.getSkinType();
}