import net.minecraft.client.renderer.texture.TextureCompass; //导入依赖的package包/类
private void func_82402_b(EntityItemFrame p_82402_1_) {
ItemStack var2 = p_82402_1_.func_82335_i();
if(var2 != null) {
EntityItem var3 = new EntityItem(p_82402_1_.field_70170_p, 0.0D, 0.0D, 0.0D, var2);
var3.func_92059_d().field_77994_a = 1;
var3.field_70290_d = 0.0F;
GL11.glPushMatrix();
GL11.glTranslatef(-0.453125F * (float)Direction.field_71583_a[p_82402_1_.field_82332_a], -0.18F, -0.453125F * (float)Direction.field_71581_b[p_82402_1_.field_82332_a]);
GL11.glRotatef(180.0F + p_82402_1_.field_70177_z, 0.0F, 1.0F, 0.0F);
GL11.glRotatef((float)(-90 * p_82402_1_.func_82333_j()), 0.0F, 0.0F, 1.0F);
switch(p_82402_1_.func_82333_j()) {
case 1:
GL11.glTranslatef(-0.16F, -0.16F, 0.0F);
break;
case 2:
GL11.glTranslatef(0.0F, -0.32F, 0.0F);
break;
case 3:
GL11.glTranslatef(0.16F, -0.16F, 0.0F);
}
if(var3.func_92059_d().func_77973_b() == Item.field_77744_bd) {
this.field_76990_c.field_78724_e.func_110577_a(field_110789_a);
Tessellator var4 = Tessellator.field_78398_a;
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
GL11.glScalef(0.00390625F, 0.00390625F, 0.00390625F);
GL11.glTranslatef(-65.0F, -107.0F, -3.0F);
GL11.glNormal3f(0.0F, 0.0F, -1.0F);
var4.func_78382_b();
byte var5 = 7;
var4.func_78374_a((double)(0 - var5), (double)(128 + var5), 0.0D, 0.0D, 1.0D);
var4.func_78374_a((double)(128 + var5), (double)(128 + var5), 0.0D, 1.0D, 1.0D);
var4.func_78374_a((double)(128 + var5), (double)(0 - var5), 0.0D, 1.0D, 0.0D);
var4.func_78374_a((double)(0 - var5), (double)(0 - var5), 0.0D, 0.0D, 0.0D);
var4.func_78381_a();
MapData var6 = Item.field_77744_bd.func_77873_a(var3.func_92059_d(), p_82402_1_.field_70170_p);
GL11.glTranslatef(0.0F, 0.0F, -1.0F);
if(var6 != null) {
this.field_76990_c.field_78721_f.field_78449_f.func_78319_a((EntityPlayer)null, this.field_76990_c.field_78724_e, var6);
}
} else {
if(var3.func_92059_d().func_77973_b() == Item.field_77750_aQ) {
TextureManager var11 = Minecraft.func_71410_x().func_110434_K();
var11.func_110577_a(TextureMap.field_110576_c);
TextureAtlasSprite var13 = ((TextureMap)var11.func_110581_b(TextureMap.field_110576_c)).func_110572_b(Item.field_77750_aQ.func_77650_f(var3.func_92059_d()).func_94215_i());
if(var13 instanceof TextureCompass) {
TextureCompass var14 = (TextureCompass)var13;
double var7 = var14.field_94244_i;
double var9 = var14.field_94242_j;
var14.field_94244_i = 0.0D;
var14.field_94242_j = 0.0D;
var14.func_94241_a(p_82402_1_.field_70170_p, p_82402_1_.field_70165_t, p_82402_1_.field_70161_v, (double)MathHelper.func_76142_g((float)(180 + p_82402_1_.field_82332_a * 90)), false, true);
var14.field_94244_i = var7;
var14.field_94242_j = var9;
}
}
RenderItem.field_82407_g = true;
RenderManager.field_78727_a.func_78719_a(var3, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
RenderItem.field_82407_g = false;
if(var3.func_92059_d().func_77973_b() == Item.field_77750_aQ) {
TextureAtlasSprite var12 = ((TextureMap)Minecraft.func_71410_x().func_110434_K().func_110581_b(TextureMap.field_110576_c)).func_110572_b(Item.field_77750_aQ.func_77650_f(var3.func_92059_d()).func_94215_i());
if(var12.func_110970_k() > 0) {
var12.func_94219_l();
}
}
}
GL11.glPopMatrix();
}
}
请发表评论