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; } }
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_); }
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 GuiScreenBook(EntityPlayer p_i1080_1_, ItemStack p_i1080_2_, boolean p_i1080_3_) { this.field_74169_a = p_i1080_1_; this.field_74167_b = p_i1080_2_; this.field_74168_c = p_i1080_3_; if (p_i1080_2_.func_77942_o()) { NBTTagCompound var4 = p_i1080_2_.func_77978_p(); this.field_74177_s = var4.func_74761_m("pages"); if (this.field_74177_s != null) { this.field_74177_s = (NBTTagList) this.field_74177_s.func_74737_b(); this.field_74179_q = this.field_74177_s.func_74745_c(); if (this.field_74179_q < 1) { this.field_74179_q = 1; } } } if (this.field_74177_s == null && p_i1080_3_) { this.field_74177_s = new NBTTagList("pages"); this.field_74177_s.func_74742_a(new NBTTagString("1", "")); this.field_74179_q = 1; } }
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; } } }