Esempio n. 1
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_) {
   TileEntityChest tileentitychest =
       (TileEntityChest) p_71852_1_.func_72796_p(p_71852_2_, p_71852_3_, p_71852_4_);
   if (tileentitychest != null) {
     for (int i = 0; i < tileentitychest.func_70302_i_(); i++) {
       ItemStack itemstack = tileentitychest.func_70301_a(i);
       if (itemstack == null) {
         continue;
       }
       float f = field_72293_a.nextFloat() * 0.8F + 0.1F;
       float f1 = field_72293_a.nextFloat() * 0.8F + 0.1F;
       float f2 = field_72293_a.nextFloat() * 0.8F + 0.1F;
       while (itemstack.field_77994_a > 0) {
         int j = field_72293_a.nextInt(21) + 10;
         if (j > itemstack.field_77994_a) {
           j = itemstack.field_77994_a;
         }
         itemstack.field_77994_a -= j;
         EntityItem entityitem =
             new EntityItem(
                 p_71852_1_,
                 (float) p_71852_2_ + f,
                 (float) p_71852_3_ + f1,
                 (float) p_71852_4_ + f2,
                 new ItemStack(itemstack.field_77993_c, j, itemstack.func_77960_j()));
         float f3 = 0.05F;
         entityitem.field_70159_w = (float) field_72293_a.nextGaussian() * f3;
         entityitem.field_70181_x = (float) field_72293_a.nextGaussian() * f3 + 0.2F;
         entityitem.field_70179_y = (float) field_72293_a.nextGaussian() * f3;
         if (itemstack.func_77942_o()) {
           entityitem.field_70294_a.func_77982_d(
               (NBTTagCompound) itemstack.func_77978_p().func_74737_b());
         }
         p_71852_1_.func_72838_d(entityitem);
       }
     }
   }
   super.func_71852_a(p_71852_1_, p_71852_2_, p_71852_3_, p_71852_4_, p_71852_5_, p_71852_6_);
 }