示例#1
0
 public boolean func_70289_a(EntityItem p_70289_1_) {
   if (p_70289_1_ == this) {
     return false;
   } else if (p_70289_1_.func_70089_S() && this.func_70089_S()) {
     ItemStack var2 = this.func_92014_d();
     ItemStack var3 = p_70289_1_.func_92014_d();
     if (var3.func_77973_b() != var2.func_77973_b()) {
       return false;
     } else if (var3.func_77942_o() ^ var2.func_77942_o()) {
       return false;
     } else if (var3.func_77942_o() && !var3.func_77978_p().equals(var2.func_77978_p())) {
       return false;
     } else if (var3.func_77973_b().func_77614_k() && var3.func_77960_j() != var2.func_77960_j()) {
       return false;
     } else if (var3.field_77994_a < var2.field_77994_a) {
       return p_70289_1_.func_70289_a(this);
     } else if (var3.field_77994_a + var2.field_77994_a > var3.func_77976_d()) {
       return false;
     } else {
       var3.field_77994_a += var2.field_77994_a;
       p_70289_1_.field_70293_c = Math.max(p_70289_1_.field_70293_c, this.field_70293_c);
       p_70289_1_.field_70292_b = Math.min(p_70289_1_.field_70292_b, this.field_70292_b);
       p_70289_1_.func_92013_a(var3);
       this.func_70106_y();
       return true;
     }
   } else {
     return false;
   }
 }
示例#2
0
  public String func_77667_c(ItemStack p_77667_1_) {
    int var2 = p_77667_1_.func_77960_j();
    if (var2 < 0 || var2 >= field_82807_a.length) {
      var2 = 0;
    }

    return super.func_77658_a() + "." + field_82807_a[var2];
  }
示例#3
0
 public String func_77628_j(ItemStack p_77628_1_) {
   return p_77628_1_.func_77960_j() == 3
           && p_77628_1_.func_77942_o()
           && p_77628_1_.func_77978_p().func_74764_b("SkullOwner")
       ? StatCollector.func_74837_a(
           "item.skull.player.name",
           new Object[] {p_77628_1_.func_77978_p().func_74779_i("SkullOwner")})
       : super.func_77628_j(p_77628_1_);
 }
示例#4
0
  public void func_71852_a(
      World p_71852_1_,
      int p_71852_2_,
      int p_71852_3_,
      int p_71852_4_,
      int p_71852_5_,
      int p_71852_6_) {
    TileEntityDispenser var7 =
        (TileEntityDispenser) p_71852_1_.func_72796_p(p_71852_2_, p_71852_3_, p_71852_4_);
    if (var7 != null) {
      for (int var8 = 0; var8 < var7.func_70302_i_(); ++var8) {
        ItemStack var9 = var7.func_70301_a(var8);
        if (var9 != null) {
          float var10 = this.field_72284_a.nextFloat() * 0.8F + 0.1F;
          float var11 = this.field_72284_a.nextFloat() * 0.8F + 0.1F;
          float var12 = this.field_72284_a.nextFloat() * 0.8F + 0.1F;

          while (var9.field_77994_a > 0) {
            int var13 = this.field_72284_a.nextInt(21) + 10;
            if (var13 > var9.field_77994_a) {
              var13 = var9.field_77994_a;
            }

            var9.field_77994_a -= var13;
            EntityItem var14 =
                new EntityItem(
                    p_71852_1_,
                    (double) ((float) p_71852_2_ + var10),
                    (double) ((float) p_71852_3_ + var11),
                    (double) ((float) p_71852_4_ + var12),
                    new ItemStack(var9.field_77993_c, var13, var9.func_77960_j()));
            if (var9.func_77942_o()) {
              var14
                  .func_92059_d()
                  .func_77982_d((NBTTagCompound) var9.func_77978_p().func_74737_b());
            }

            float var15 = 0.05F;
            var14.field_70159_w = (double) ((float) this.field_72284_a.nextGaussian() * var15);
            var14.field_70181_x =
                (double) ((float) this.field_72284_a.nextGaussian() * var15 + 0.2F);
            var14.field_70179_y = (double) ((float) this.field_72284_a.nextGaussian() * var15);
            p_71852_1_.func_72838_d(var14);
          }
        }
      }

      p_71852_1_.func_96440_m(p_71852_2_, p_71852_3_, p_71852_4_, p_71852_5_);
    }

    super.func_71852_a(p_71852_1_, p_71852_2_, p_71852_3_, p_71852_4_, p_71852_5_, p_71852_6_);
  }
  public ItemStack func_77659_a(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
    ItemStack var4 = new ItemStack(Items.field_151098_aY, 1, p_77659_2_.func_72841_b("map"));
    String var5 = "map_" + var4.func_77960_j();
    MapData var6 = new MapData(var5);
    p_77659_2_.func_72823_a(var5, var6);
    var6.field_76197_d = 0;
    var6.func_176054_a(p_77659_3_.field_70165_t, p_77659_3_.field_70161_v, var6.field_76197_d);
    var6.field_76200_c = (byte) p_77659_2_.field_73011_w.func_177502_q();
    var6.func_76185_a();
    --p_77659_1_.field_77994_a;
    if (p_77659_1_.field_77994_a <= 0) {
      return var4;
    } else {
      if (!p_77659_3_.field_71071_by.func_70441_a(var4.func_77946_l())) {
        p_77659_3_.func_71019_a(var4, false);
      }

      p_77659_3_.func_71029_a(StatList.field_75929_E[Item.func_150891_b(this)]);
      return p_77659_1_;
    }
  }
示例#6
0
  public void func_78441_a() {
    this.field_78451_d = this.field_78454_c;
    EntityClientPlayerMP var1 = this.field_78455_a.field_71439_g;
    ItemStack var2 = var1.field_71071_by.func_70448_g();
    boolean var3 =
        this.field_78450_g == var1.field_71071_by.field_70461_c && var2 == this.field_78453_b;
    if (this.field_78453_b == null && var2 == null) {
      var3 = true;
    }

    if (var2 != null
        && this.field_78453_b != null
        && var2 != this.field_78453_b
        && var2.field_77993_c == this.field_78453_b.field_77993_c
        && var2.func_77960_j() == this.field_78453_b.func_77960_j()) {
      this.field_78453_b = var2;
      var3 = true;
    }

    float var4 = 0.4F;
    float var5 = var3 ? 1.0F : 0.0F;
    float var6 = var5 - this.field_78454_c;
    if (var6 < -var4) {
      var6 = -var4;
    }

    if (var6 > var4) {
      var6 = var4;
    }

    this.field_78454_c += var6;
    if (this.field_78454_c < 0.1F) {
      this.field_78453_b = var2;
      this.field_78450_g = var1.field_71071_by.field_70461_c;
    }
  }
示例#7
0
  public void func_78443_a(EntityLiving p_78443_1_, ItemStack p_78443_2_, int p_78443_3_) {
    GL11.glPushMatrix();
    Block var4 = Block.field_71973_m[p_78443_2_.field_77993_c];
    if (var4 != null && RenderBlocks.func_78597_b(var4.func_71857_b())) {
      GL11.glBindTexture(3553, this.field_78455_a.field_71446_o.func_78341_b("/terrain.png"));
      this.field_78452_e.func_78600_a(var4, p_78443_2_.func_77960_j(), 1.0F);
    } else {
      if (var4 != null) {
        GL11.glBindTexture(3553, this.field_78455_a.field_71446_o.func_78341_b("/terrain.png"));
      } else {
        GL11.glBindTexture(3553, this.field_78455_a.field_71446_o.func_78341_b("/gui/items.png"));
      }

      Tessellator var5 = Tessellator.field_78398_a;
      int var6 = p_78443_1_.func_70620_b(p_78443_2_, p_78443_3_);
      float var7 = ((float) (var6 % 16 * 16) + 0.0F) / 256.0F;
      float var8 = ((float) (var6 % 16 * 16) + 15.99F) / 256.0F;
      float var9 = ((float) (var6 / 16 * 16) + 0.0F) / 256.0F;
      float var10 = ((float) (var6 / 16 * 16) + 15.99F) / 256.0F;
      float var11 = 0.0F;
      float var12 = 0.3F;
      GL11.glEnable('\u803a');
      GL11.glTranslatef(-var11, -var12, 0.0F);
      float var13 = 1.5F;
      GL11.glScalef(var13, var13, var13);
      GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);
      GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);
      func_78439_a(var5, var8, var9, var7, var10, 0.0625F);
      if (p_78443_2_ != null && p_78443_2_.func_77962_s() && p_78443_3_ == 0) {
        GL11.glDepthFunc(514);
        GL11.glDisable(2896);
        this.field_78455_a.field_71446_o.func_78342_b(
            this.field_78455_a.field_71446_o.func_78341_b("%blur%/misc/glint.png"));
        GL11.glEnable(3042);
        GL11.glBlendFunc(768, 1);
        float var14 = 0.76F;
        GL11.glColor4f(0.5F * var14, 0.25F * var14, 0.8F * var14, 1.0F);
        GL11.glMatrixMode(5890);
        GL11.glPushMatrix();
        float var15 = 0.125F;
        GL11.glScalef(var15, var15, var15);
        float var16 = (float) (Minecraft.func_71386_F() % 3000L) / 3000.0F * 8.0F;
        GL11.glTranslatef(var16, 0.0F, 0.0F);
        GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
        func_78439_a(var5, 0.0F, 0.0F, 1.0F, 1.0F, 0.0625F);
        GL11.glPopMatrix();
        GL11.glPushMatrix();
        GL11.glScalef(var15, var15, var15);
        var16 = (float) (Minecraft.func_71386_F() % 4873L) / 4873.0F * 8.0F;
        GL11.glTranslatef(-var16, 0.0F, 0.0F);
        GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
        func_78439_a(var5, 0.0F, 0.0F, 1.0F, 1.0F, 0.0625F);
        GL11.glPopMatrix();
        GL11.glMatrixMode(5888);
        GL11.glDisable(3042);
        GL11.glEnable(2896);
        GL11.glDepthFunc(515);
      }

      GL11.glDisable('\u803a');
    }

    GL11.glPopMatrix();
  }
示例#8
0
 public String func_77667_c(ItemStack p_77667_1_) {
   return super.func_77658_a()
       + "."
       + EnumDyeColor.func_176764_b(p_77667_1_.func_77960_j()).func_176762_d();
 }
示例#9
0
  public boolean func_77648_a(
      ItemStack p_77648_1_,
      EntityPlayer p_77648_2_,
      World p_77648_3_,
      int p_77648_4_,
      int p_77648_5_,
      int p_77648_6_,
      int p_77648_7_,
      float p_77648_8_,
      float p_77648_9_,
      float p_77648_10_) {
    if (p_77648_7_ == 0) {
      return false;
    } else if (!p_77648_3_.func_72803_f(p_77648_4_, p_77648_5_, p_77648_6_).func_76220_a()) {
      return false;
    } else {
      if (p_77648_7_ == 1) {
        ++p_77648_5_;
      }

      if (p_77648_7_ == 2) {
        --p_77648_6_;
      }

      if (p_77648_7_ == 3) {
        ++p_77648_6_;
      }

      if (p_77648_7_ == 4) {
        --p_77648_4_;
      }

      if (p_77648_7_ == 5) {
        ++p_77648_4_;
      }

      if (!p_77648_2_.func_82247_a(p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_1_)) {
        return false;
      } else if (!Block.field_82512_cj.func_71930_b(
          p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_)) {
        return false;
      } else {
        p_77648_3_.func_72832_d(
            p_77648_4_, p_77648_5_, p_77648_6_, Block.field_82512_cj.field_71990_ca, p_77648_7_, 2);
        int var11 = 0;
        if (p_77648_7_ == 1) {
          var11 =
              MathHelper.func_76128_c((double) (p_77648_2_.field_70177_z * 16.0F / 360.0F) + 0.5D)
                  & 15;
        }

        TileEntity var12 = p_77648_3_.func_72796_p(p_77648_4_, p_77648_5_, p_77648_6_);
        if (var12 != null && var12 instanceof TileEntitySkull) {
          String var13 = "";
          if (p_77648_1_.func_77942_o() && p_77648_1_.func_77978_p().func_74764_b("SkullOwner")) {
            var13 = p_77648_1_.func_77978_p().func_74779_i("SkullOwner");
          }

          ((TileEntitySkull) var12).func_82118_a(p_77648_1_.func_77960_j(), var13);
          ((TileEntitySkull) var12).func_82116_a(var11);
          ((BlockSkull) Block.field_82512_cj)
              .func_82529_a(
                  p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, (TileEntitySkull) var12);
        }

        --p_77648_1_.field_77994_a;
        return true;
      }
    }
  }
示例#10
0
  public void func_78443_a(EntityLivingBase p_78443_1_, ItemStack p_78443_2_, int p_78443_3_) {
    GL11.glPushMatrix();
    TextureManager var4 = this.field_78455_a.func_110434_K();
    if (p_78443_2_.func_94608_d() == 0
        && p_78443_2_.field_77993_c < Block.field_71973_m.length
        && Block.field_71973_m[p_78443_2_.field_77993_c] != null
        && RenderBlocks.func_78597_b(
            Block.field_71973_m[p_78443_2_.field_77993_c].func_71857_b())) {
      var4.func_110577_a(var4.func_130087_a(0));
      this.field_78452_e.func_78600_a(
          Block.field_71973_m[p_78443_2_.field_77993_c], p_78443_2_.func_77960_j(), 1.0F);
    } else {
      Icon var5 = p_78443_1_.func_70620_b(p_78443_2_, p_78443_3_);
      if (var5 == null) {
        GL11.glPopMatrix();
        return;
      }

      var4.func_110577_a(var4.func_130087_a(p_78443_2_.func_94608_d()));
      Tessellator var6 = Tessellator.field_78398_a;
      float var7 = var5.func_94209_e();
      float var8 = var5.func_94212_f();
      float var9 = var5.func_94206_g();
      float var10 = var5.func_94210_h();
      float var11 = 0.0F;
      float var12 = 0.3F;
      GL11.glEnable('\u803a');
      GL11.glTranslatef(-var11, -var12, 0.0F);
      float var13 = 1.5F;
      GL11.glScalef(var13, var13, var13);
      GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);
      GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);
      func_78439_a(
          var6, var8, var9, var7, var10, var5.func_94211_a(), var5.func_94216_b(), 0.0625F);
      if (p_78443_2_.func_77962_s() && p_78443_3_ == 0) {
        GL11.glDepthFunc(514);
        GL11.glDisable(2896);
        var4.func_110577_a(field_110930_b);
        GL11.glEnable(3042);
        GL11.glBlendFunc(768, 1);
        float var14 = 0.76F;
        GL11.glColor4f(0.5F * var14, 0.25F * var14, 0.8F * var14, 1.0F);
        GL11.glMatrixMode(5890);
        GL11.glPushMatrix();
        float var15 = 0.125F;
        GL11.glScalef(var15, var15, var15);
        float var16 = (float) (Minecraft.func_71386_F() % 3000L) / 3000.0F * 8.0F;
        GL11.glTranslatef(var16, 0.0F, 0.0F);
        GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
        func_78439_a(var6, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);
        GL11.glPopMatrix();
        GL11.glPushMatrix();
        GL11.glScalef(var15, var15, var15);
        var16 = (float) (Minecraft.func_71386_F() % 4873L) / 4873.0F * 8.0F;
        GL11.glTranslatef(-var16, 0.0F, 0.0F);
        GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
        func_78439_a(var6, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);
        GL11.glPopMatrix();
        GL11.glMatrixMode(5888);
        GL11.glDisable(3042);
        GL11.glEnable(2896);
        GL11.glDepthFunc(515);
      }

      GL11.glDisable('\u803a');
    }

    GL11.glPopMatrix();
  }