本文整理汇总了Java中net.minecraft.client.resources.DefaultPlayerSkin.getDefaultSkin方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultPlayerSkin.getDefaultSkin方法的具体用法?Java DefaultPlayerSkin.getDefaultSkin怎么用?Java DefaultPlayerSkin.getDefaultSkin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.resources.DefaultPlayerSkin
的用法示例。
在下文中一共展示了DefaultPlayerSkin.getDefaultSkin方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSkinResourceLocation
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
@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;
}
示例2: 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;
}
示例3: bindFace
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
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);
}
示例4: getEntityTexture
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
@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());
}
示例5: renderTileEntityAt
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
@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();
}
示例6: getSkin
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
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());
}
}
示例7: getLocationSkin
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
/**
* 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();
}
示例8: getLocationSkin
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
/**
* 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();
}
示例9: getSkinTexture
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
public ResourceLocation getSkinTexture() {
return this.remoteSkin ? (this.remoteSkinTexture != null ? this.remoteSkinResource
: DefaultPlayerSkin.getDefaultSkin(entityUniqueID)) : this.localSkinResource;
}
示例10: doRenderLayer
import net.minecraft.client.resources.DefaultPlayerSkin; //导入方法依赖的package包/类
@Override
public void doRenderLayer(EntityEvilSheep entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
if (!entitylivingbaseIn.isInvisible())
{
if(entitylivingbaseIn.getKilledPlayerUUID() != null && entitylivingbaseIn.getKilledPlayerName() != null && entitylivingbaseIn.getKilledPlayerName().length() > 0){
setupModelStuff();
GameProfile gameProfile = new GameProfile(entitylivingbaseIn.getKilledPlayerUUID(), entitylivingbaseIn.getKilledPlayerName());
ResourceLocation resourcelocation = DefaultPlayerSkin.getDefaultSkin(entitylivingbaseIn.getKilledPlayerUUID());
Minecraft minecraft = Minecraft.getMinecraft();
// Check if we have loaded the (texturized) profile before, otherwise we load it and cache it.
if(!checkedProfiles.containsKey(gameProfile)) {
Property property = (Property) Iterables.getFirst(gameProfile.getProperties().get("textures"), (Object) null);
if (property == null) {
// The game profile enchanced with texture information.
GameProfile newGameProfile = Minecraft.getMinecraft().getSessionService().fillProfileProperties(gameProfile, true);
checkedProfiles.put(gameProfile, newGameProfile);
}
} else {
Map map = minecraft.getSkinManager().loadSkinFromCache(checkedProfiles.get(gameProfile));
if (map.containsKey(MinecraftProfileTexture.Type.SKIN))
resourcelocation = minecraft.getSkinManager().loadSkin((MinecraftProfileTexture) map.get(MinecraftProfileTexture.Type.SKIN), MinecraftProfileTexture.Type.SKIN);
}
sheepRenderer.bindTexture(resourcelocation);
}else {
resetModelStuff();
sheepRenderer.bindTexture(TEXTURE);
}
if (entitylivingbaseIn.hasCustomName() && "jeb_".equals(entitylivingbaseIn.getCustomNameTag()))
{
int i = entitylivingbaseIn.ticksExisted / 25 + entitylivingbaseIn.getEntityId();
int j = EnumDyeColor.values().length;
int k = i % j;
int l = (i + 1) % j;
float f = (entitylivingbaseIn.ticksExisted % 25 + partialTicks) / 25.0F;
float[] afloat1 = EntitySheep.getDyeRgb(EnumDyeColor.byMetadata(k));
float[] afloat2 = EntitySheep.getDyeRgb(EnumDyeColor.byMetadata(l));
GlStateManager.color(afloat1[0] * (1.0F - f) + afloat2[0] * f, afloat1[1] * (1.0F - f) + afloat2[1] * f, afloat1[2] * (1.0F - f) + afloat2[2] * f);
}
sheepModel.setModelAttributes(sheepRenderer.getMainModel());
sheepModel.setLivingAnimations(entitylivingbaseIn, p_177141_2_, p_177141_3_, partialTicks);
sheepModel.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
}
}