本文整理汇总了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();
}
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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();
}
示例6: getEntityTexture
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
@Override
protected ResourceLocation getEntityTexture(EntityHat entity)
{
return DefaultPlayerSkin.getDefaultSkinLegacy();
}
示例7: getEntityTexture
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
@Override
protected ResourceLocation getEntityTexture(EntityLatchedRenderer entity)
{
return DefaultPlayerSkin.getDefaultSkinLegacy();
}