當前位置: 首頁>>代碼示例>>Java>>正文


Java AbstractClientPlayer.locationStevePng方法代碼示例

本文整理匯總了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();
}
 
開發者ID:jm-organization,項目名稱:connor41-etfuturum2,代碼行數:61,代碼來源:TileEntityFancySkullRenderer.java


注:本文中的net.minecraft.client.entity.AbstractClientPlayer.locationStevePng方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。