コード例 #1
0
 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);
     }
   }
 }
コード例 #2
0
 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);
       }
     }
   }
 }