public int func_94328_b_( World p_94328_1_, int p_94328_2_, int p_94328_3_, int p_94328_4_, int p_94328_5_) { ItemStack var6 = ((TileEntityRecordPlayer) p_94328_1_.func_72796_p(p_94328_2_, p_94328_3_, p_94328_4_)) .func_96097_a(); return var6 == null ? 0 : var6.field_77993_c + 1 - Item.field_77819_bI.field_77779_bT; }
public boolean func_76484_a( World p_76484_1_, Random p_76484_2_, int p_76484_3_, int p_76484_4_, int p_76484_5_) { int var12; for (boolean var6 = false; ((var12 = p_76484_1_.func_72798_a(p_76484_3_, p_76484_4_, p_76484_5_)) == 0 || var12 == Block.field_71952_K.field_71990_ca) && p_76484_4_ > 1; --p_76484_4_) {; } if (p_76484_4_ < 1) { return false; } else { ++p_76484_4_; for (int var7 = 0; var7 < 4; ++var7) { int var8 = p_76484_3_ + p_76484_2_.nextInt(4) - p_76484_2_.nextInt(4); int var9 = p_76484_4_ + p_76484_2_.nextInt(3) - p_76484_2_.nextInt(3); int var10 = p_76484_5_ + p_76484_2_.nextInt(4) - p_76484_2_.nextInt(4); if (p_76484_1_.func_72799_c(var8, var9, var10) && p_76484_1_.func_72797_t(var8, var9 - 1, var10)) { p_76484_1_.func_72832_d(var8, var9, var10, Block.field_72077_au.field_71990_ca, 0, 2); TileEntityChest var11 = (TileEntityChest) p_76484_1_.func_72796_p(var8, var9, var10); if (var11 != null && var11 != null) { WeightedRandomChestContent.func_76293_a( p_76484_2_, this.field_76546_a, var11, this.field_76545_b); } if (p_76484_1_.func_72799_c(var8 - 1, var9, var10) && p_76484_1_.func_72797_t(var8 - 1, var9 - 1, var10)) { p_76484_1_.func_72832_d( var8 - 1, var9, var10, Block.field_72069_aq.field_71990_ca, 0, 2); } if (p_76484_1_.func_72799_c(var8 + 1, var9, var10) && p_76484_1_.func_72797_t(var8 - 1, var9 - 1, var10)) { p_76484_1_.func_72832_d( var8 + 1, var9, var10, Block.field_72069_aq.field_71990_ca, 0, 2); } if (p_76484_1_.func_72799_c(var8, var9, var10 - 1) && p_76484_1_.func_72797_t(var8 - 1, var9 - 1, var10)) { p_76484_1_.func_72832_d( var8, var9, var10 - 1, Block.field_72069_aq.field_71990_ca, 0, 2); } if (p_76484_1_.func_72799_c(var8, var9, var10 + 1) && p_76484_1_.func_72797_t(var8 - 1, var9 - 1, var10)) { p_76484_1_.func_72832_d( var8, var9, var10 + 1, Block.field_72069_aq.field_71990_ca, 0, 2); } return true; } } return false; } }
public void func_71863_a( World p_71863_1_, int p_71863_2_, int p_71863_3_, int p_71863_4_, int p_71863_5_) { super.func_71863_a(p_71863_1_, p_71863_2_, p_71863_3_, p_71863_4_, p_71863_5_); TileEntityChest var6 = (TileEntityChest) p_71863_1_.func_72796_p(p_71863_2_, p_71863_3_, p_71863_4_); if (var6 != null) { var6.func_70321_h(); } }
public void func_85106_a( World p_85106_1_, int p_85106_2_, int p_85106_3_, int p_85106_4_, ItemStack p_85106_5_) { if (!p_85106_1_.field_72995_K) { TileEntityRecordPlayer var6 = (TileEntityRecordPlayer) p_85106_1_.func_72796_p(p_85106_2_, p_85106_3_, p_85106_4_); if (var6 != null) { var6.func_96098_a(p_85106_5_.func_77946_l()); p_85106_1_.func_72921_c(p_85106_2_, p_85106_3_, p_85106_4_, 1, 2); } } }
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_) { TileEntityChest var7 = (TileEntityChest) 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_72293_a.nextFloat() * 0.8F + 0.1F; float var11 = this.field_72293_a.nextFloat() * 0.8F + 0.1F; EntityItem var14; for (float var12 = this.field_72293_a.nextFloat() * 0.8F + 0.1F; var9.field_77994_a > 0; p_71852_1_.func_72838_d(var14)) { int var13 = this.field_72293_a.nextInt(21) + 10; if (var13 > var9.field_77994_a) { var13 = var9.field_77994_a; } var9.field_77994_a -= var13; 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())); float var15 = 0.05F; var14.field_70159_w = (double) ((float) this.field_72293_a.nextGaussian() * var15); var14.field_70181_x = (double) ((float) this.field_72293_a.nextGaussian() * var15 + 0.2F); var14.field_70179_y = (double) ((float) this.field_72293_a.nextGaussian() * var15); if (var9.func_77942_o()) { var14 .func_92059_d() .func_77982_d((NBTTagCompound) var9.func_77978_p().func_74737_b()); } } } } } super.func_71852_a(p_71852_1_, p_71852_2_, p_71852_3_, p_71852_4_, p_71852_5_, p_71852_6_); }
private boolean func_75398_a(World p_75398_1_, int p_75398_2_, int p_75398_3_, int p_75398_4_) { int var5 = p_75398_1_.func_72798_a(p_75398_2_, p_75398_3_, p_75398_4_); int var6 = p_75398_1_.func_72805_g(p_75398_2_, p_75398_3_, p_75398_4_); if (var5 == Block.field_72077_au.field_71990_ca) { TileEntityChest var7 = (TileEntityChest) p_75398_1_.func_72796_p(p_75398_2_, p_75398_3_, p_75398_4_); if (var7.field_70427_h < 1) { return true; } } else { if (var5 == Block.field_72052_aC.field_71990_ca) { return true; } if (var5 == Block.field_71959_S.field_71990_ca && !BlockBed.func_72229_a_(var6)) { return true; } } return false; }
public void func_72276_j_(World p_72276_1_, int p_72276_2_, int p_72276_3_, int p_72276_4_) { if (!p_72276_1_.field_72995_K) { TileEntityRecordPlayer var5 = (TileEntityRecordPlayer) p_72276_1_.func_72796_p(p_72276_2_, p_72276_3_, p_72276_4_); if (var5 != null) { ItemStack var6 = var5.func_96097_a(); if (var6 != null) { p_72276_1_.func_72926_e(1005, p_72276_2_, p_72276_3_, p_72276_4_, 0); p_72276_1_.func_72934_a((String) null, p_72276_2_, p_72276_3_, p_72276_4_); var5.func_96098_a((ItemStack) null); p_72276_1_.func_72921_c(p_72276_2_, p_72276_3_, p_72276_4_, 0, 2); float var7 = 0.7F; double var8 = (double) (p_72276_1_.field_73012_v.nextFloat() * var7) + (double) (1.0F - var7) * 0.5D; double var10 = (double) (p_72276_1_.field_73012_v.nextFloat() * var7) + (double) (1.0F - var7) * 0.2D + 0.6D; double var12 = (double) (p_72276_1_.field_73012_v.nextFloat() * var7) + (double) (1.0F - var7) * 0.5D; ItemStack var14 = var6.func_77946_l(); EntityItem var15 = new EntityItem( p_72276_1_, (double) p_72276_2_ + var8, (double) p_72276_3_ + var10, (double) p_72276_4_ + var12, var14); var15.field_70293_c = 10; p_72276_1_.func_72838_d(var15); } } } }
public void func_71860_a( World p_71860_1_, int p_71860_2_, int p_71860_3_, int p_71860_4_, EntityLiving p_71860_5_, ItemStack p_71860_6_) { int var7 = p_71860_1_.func_72798_a(p_71860_2_, p_71860_3_, p_71860_4_ - 1); int var8 = p_71860_1_.func_72798_a(p_71860_2_, p_71860_3_, p_71860_4_ + 1); int var9 = p_71860_1_.func_72798_a(p_71860_2_ - 1, p_71860_3_, p_71860_4_); int var10 = p_71860_1_.func_72798_a(p_71860_2_ + 1, p_71860_3_, p_71860_4_); byte var11 = 0; int var12 = MathHelper.func_76128_c((double) (p_71860_5_.field_70177_z * 4.0F / 360.0F) + 0.5D) & 3; if (var12 == 0) { var11 = 2; } if (var12 == 1) { var11 = 5; } if (var12 == 2) { var11 = 3; } if (var12 == 3) { var11 = 4; } if (var7 != this.field_71990_ca && var8 != this.field_71990_ca && var9 != this.field_71990_ca && var10 != this.field_71990_ca) { p_71860_1_.func_72921_c(p_71860_2_, p_71860_3_, p_71860_4_, var11, 3); } else { if ((var7 == this.field_71990_ca || var8 == this.field_71990_ca) && (var11 == 4 || var11 == 5)) { if (var7 == this.field_71990_ca) { p_71860_1_.func_72921_c(p_71860_2_, p_71860_3_, p_71860_4_ - 1, var11, 3); } else { p_71860_1_.func_72921_c(p_71860_2_, p_71860_3_, p_71860_4_ + 1, var11, 3); } p_71860_1_.func_72921_c(p_71860_2_, p_71860_3_, p_71860_4_, var11, 3); } if ((var9 == this.field_71990_ca || var10 == this.field_71990_ca) && (var11 == 2 || var11 == 3)) { if (var9 == this.field_71990_ca) { p_71860_1_.func_72921_c(p_71860_2_ - 1, p_71860_3_, p_71860_4_, var11, 3); } else { p_71860_1_.func_72921_c(p_71860_2_ + 1, p_71860_3_, p_71860_4_, var11, 3); } p_71860_1_.func_72921_c(p_71860_2_, p_71860_3_, p_71860_4_, var11, 3); } } if (p_71860_6_.func_82837_s()) { ((TileEntityChest) p_71860_1_.func_72796_p(p_71860_2_, p_71860_3_, p_71860_4_)) .func_94043_a(p_71860_6_.func_82833_r()); } }
public IInventory func_94442_h_( World p_94442_1_, int p_94442_2_, int p_94442_3_, int p_94442_4_) { Object var5 = (TileEntityChest) p_94442_1_.func_72796_p(p_94442_2_, p_94442_3_, p_94442_4_); if (var5 == null) { return null; } else if (p_94442_1_.func_72809_s(p_94442_2_, p_94442_3_ + 1, p_94442_4_)) { return null; } else if (func_72292_n(p_94442_1_, p_94442_2_, p_94442_3_, p_94442_4_)) { return null; } else if (p_94442_1_.func_72798_a(p_94442_2_ - 1, p_94442_3_, p_94442_4_) == this.field_71990_ca && (p_94442_1_.func_72809_s(p_94442_2_ - 1, p_94442_3_ + 1, p_94442_4_) || func_72292_n(p_94442_1_, p_94442_2_ - 1, p_94442_3_, p_94442_4_))) { return null; } else if (p_94442_1_.func_72798_a(p_94442_2_ + 1, p_94442_3_, p_94442_4_) == this.field_71990_ca && (p_94442_1_.func_72809_s(p_94442_2_ + 1, p_94442_3_ + 1, p_94442_4_) || func_72292_n(p_94442_1_, p_94442_2_ + 1, p_94442_3_, p_94442_4_))) { return null; } else if (p_94442_1_.func_72798_a(p_94442_2_, p_94442_3_, p_94442_4_ - 1) == this.field_71990_ca && (p_94442_1_.func_72809_s(p_94442_2_, p_94442_3_ + 1, p_94442_4_ - 1) || func_72292_n(p_94442_1_, p_94442_2_, p_94442_3_, p_94442_4_ - 1))) { return null; } else if (p_94442_1_.func_72798_a(p_94442_2_, p_94442_3_, p_94442_4_ + 1) == this.field_71990_ca && (p_94442_1_.func_72809_s(p_94442_2_, p_94442_3_ + 1, p_94442_4_ + 1) || func_72292_n(p_94442_1_, p_94442_2_, p_94442_3_, p_94442_4_ + 1))) { return null; } else { if (p_94442_1_.func_72798_a(p_94442_2_ - 1, p_94442_3_, p_94442_4_) == this.field_71990_ca) { var5 = new InventoryLargeChest( "container.chestDouble", (TileEntityChest) p_94442_1_.func_72796_p(p_94442_2_ - 1, p_94442_3_, p_94442_4_), (IInventory) var5); } if (p_94442_1_.func_72798_a(p_94442_2_ + 1, p_94442_3_, p_94442_4_) == this.field_71990_ca) { var5 = new InventoryLargeChest( "container.chestDouble", (IInventory) var5, (TileEntityChest) p_94442_1_.func_72796_p(p_94442_2_ + 1, p_94442_3_, p_94442_4_)); } if (p_94442_1_.func_72798_a(p_94442_2_, p_94442_3_, p_94442_4_ - 1) == this.field_71990_ca) { var5 = new InventoryLargeChest( "container.chestDouble", (TileEntityChest) p_94442_1_.func_72796_p(p_94442_2_, p_94442_3_, p_94442_4_ - 1), (IInventory) var5); } if (p_94442_1_.func_72798_a(p_94442_2_, p_94442_3_, p_94442_4_ + 1) == this.field_71990_ca) { var5 = new InventoryLargeChest( "container.chestDouble", (IInventory) var5, (TileEntityChest) p_94442_1_.func_72796_p(p_94442_2_, p_94442_3_, p_94442_4_ + 1)); } return (IInventory) var5; } }