本文整理汇总了Java中net.minecraft.client.entity.AbstractClientPlayer.locationStevePng方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractClientPlayer.locationStevePng方法的具体用法?Java AbstractClientPlayer.locationStevePng怎么用?Java AbstractClientPlayer.locationStevePng使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.entity.AbstractClientPlayer
的用法示例。
在下文中一共展示了AbstractClientPlayer.locationStevePng方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderSkull
import net.minecraft.client.entity.AbstractClientPlayer; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void renderSkull(float x, float y, float z, int meta, float rotation, int type, GameProfile profile) {
ModelHead model = model1;
switch (type) {
case 0:
default:
bindTexture(skeleton_texture);
break;
case 1:
bindTexture(wither_skeleton_texture);
break;
case 2:
bindTexture(zombie_texture);
model = model2;
break;
case 3:
ResourceLocation texture = AbstractClientPlayer.locationStevePng;
if (profile != null) {
Minecraft minecraft = Minecraft.getMinecraft();
Map<Type, MinecraftProfileTexture> map = minecraft.func_152342_ad().func_152788_a(profile);
if (map.containsKey(Type.SKIN))
texture = minecraft.func_152342_ad().func_152792_a(map.get(Type.SKIN), Type.SKIN);
}
bindTexture(texture);
break;
case 4:
bindTexture(creeper_texture);
}
OpenGLHelper.pushMatrix();
OpenGLHelper.disableCull();
if (meta != 1)
switch (meta) {
case 2:
OpenGLHelper.translate(x + 0.5F, y + 0.25F, z + 0.74F);
break;
case 3:
OpenGLHelper.translate(x + 0.5F, y + 0.25F, z + 0.26F);
rotation = 180.0F;
break;
case 4:
OpenGLHelper.translate(x + 0.74F, y + 0.25F, z + 0.5F);
rotation = 270.0F;
break;
case 5:
default:
OpenGLHelper.translate(x + 0.26F, y + 0.25F, z + 0.5F);
rotation = 90.0F;
}
else
GL11.glTranslatef(x + 0.5F, y, z + 0.5F);
OpenGLHelper.enableRescaleNormal();
OpenGLHelper.scale(-1.0F, -1.0F, 1.0F);
OpenGLHelper.enableAlpha();
model.render(rotation);
OpenGLHelper.popMatrix();
}