当前位置: 首页>>代码示例>>Java>>正文


Java DefaultPlayerSkin.getDefaultSkinLegacy方法代码示例

本文整理汇总了Java中net.minecraft.client.resources.DefaultPlayerSkin.getDefaultSkinLegacy方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultPlayerSkin.getDefaultSkinLegacy方法的具体用法?Java DefaultPlayerSkin.getDefaultSkinLegacy怎么用?Java DefaultPlayerSkin.getDefaultSkinLegacy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.resources.DefaultPlayerSkin的用法示例。


在下文中一共展示了DefaultPlayerSkin.getDefaultSkinLegacy方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: TeamSelectionObject

import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
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();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:27,代码来源:TeleportToTeam.java

示例2: TeamSelectionObject

import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
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);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:27,代码来源:TeleportToTeam.java

示例3: getLocationSkin

import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:mchorse,项目名称:metamorph,代码行数:27,代码来源:PlayerMorph.java

示例4: loadTexture

import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
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);
    }
}
 
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:38,代码来源:HDSkinManager.java

示例5: getEntityTexture

import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
/**
 * 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();
}
 
开发者ID:MinecraftModDevelopmentMods,项目名称:LootableBodies,代码行数:17,代码来源:CorpseRenderer.java

示例6: getEntityTexture

import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
@Override
protected ResourceLocation getEntityTexture(EntityHat entity)
{
    return DefaultPlayerSkin.getDefaultSkinLegacy();
}
 
开发者ID:iChun,项目名称:Hats,代码行数:6,代码来源:RenderHat.java

示例7: getEntityTexture

import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
@Override
protected ResourceLocation getEntityTexture(EntityLatchedRenderer entity)
{
    return DefaultPlayerSkin.getDefaultSkinLegacy();
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:6,代码来源:RenderLatchedRenderer.java


注:本文中的net.minecraft.client.resources.DefaultPlayerSkin.getDefaultSkinLegacy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。