當前位置: 首頁>>代碼示例>>Java>>正文


Java BlockDispenser.func_100009_j_方法代碼示例

本文整理匯總了Java中net.minecraft.block.BlockDispenser.func_100009_j_方法的典型用法代碼示例。如果您正苦於以下問題:Java BlockDispenser.func_100009_j_方法的具體用法?Java BlockDispenser.func_100009_j_怎麽用?Java BlockDispenser.func_100009_j_使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.block.BlockDispenser的用法示例。


在下文中一共展示了BlockDispenser.func_100009_j_方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
protected ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   int var4 = p_82487_1_.func_82623_d() + var3.func_82601_c();
   int var5 = p_82487_1_.func_82622_e() + var3.func_96559_d();
   int var6 = p_82487_1_.func_82621_f() + var3.func_82599_e();
   AxisAlignedBB var7 = AxisAlignedBB.func_72332_a().func_72299_a((double)var4, (double)var5, (double)var6, (double)(var4 + 1), (double)(var5 + 1), (double)(var6 + 1));
   List var8 = p_82487_1_.func_82618_k().func_82733_a(EntityLivingBase.class, var7, new EntitySelectorArmoredMob(p_82487_2_));
   if(var8.size() > 0) {
      EntityLivingBase var9 = (EntityLivingBase)var8.get(0);
      int var10 = var9 instanceof EntityPlayer?1:0;
      int var11 = EntityLiving.func_82159_b(p_82487_2_);
      ItemStack var12 = p_82487_2_.func_77946_l();
      var12.field_77994_a = 1;
      var9.func_70062_b(var11 - var10, var12);
      if(var9 instanceof EntityLiving) {
         ((EntityLiving)var9).func_96120_a(var11, 2.0F);
      }

      --p_82487_2_.field_77994_a;
      return p_82487_2_;
   } else {
      return super.func_82487_b(p_82487_1_, p_82487_2_);
   }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:25,代碼來源:BehaviorDispenseArmor.java

示例2: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
protected ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   if(p_82487_2_.func_77960_j() == 15) {
      EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
      World var4 = p_82487_1_.func_82618_k();
      int var5 = p_82487_1_.func_82623_d() + var3.func_82601_c();
      int var6 = p_82487_1_.func_82622_e() + var3.func_96559_d();
      int var7 = p_82487_1_.func_82621_f() + var3.func_82599_e();
      if(ItemDye.func_96604_a(p_82487_2_, var4, var5, var6, var7)) {
         if(!var4.field_72995_K) {
            var4.func_72926_e(2005, var5, var6, var7, 0);
         }
      } else {
         this.field_96461_b = false;
      }

      return p_82487_2_;
   } else {
      return super.func_82487_b(p_82487_1_, p_82487_2_);
   }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:21,代碼來源:DispenserBehaviorDye.java

示例3: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   World var4 = p_82487_1_.func_82618_k();
   double var5 = p_82487_1_.func_82615_a() + (double)((float)var3.func_82601_c() * 1.125F);
   double var7 = p_82487_1_.func_82617_b() + (double)((float)var3.func_96559_d() * 1.125F);
   double var9 = p_82487_1_.func_82616_c() + (double)((float)var3.func_82599_e() * 1.125F);
   int var11 = p_82487_1_.func_82623_d() + var3.func_82601_c();
   int var12 = p_82487_1_.func_82622_e() + var3.func_96559_d();
   int var13 = p_82487_1_.func_82621_f() + var3.func_82599_e();
   Material var14 = var4.func_72803_f(var11, var12, var13);
   double var15;
   if(Material.field_76244_g.equals(var14)) {
      var15 = 1.0D;
   } else {
      if(!Material.field_76249_a.equals(var14) || !Material.field_76244_g.equals(var4.func_72803_f(var11, var12 - 1, var13))) {
         return this.field_96464_b.func_82482_a(p_82487_1_, p_82487_2_);
      }

      var15 = 0.0D;
   }

   EntityBoat var17 = new EntityBoat(var4, var5, var7 + var15, var9);
   var4.func_72838_d(var17);
   p_82487_2_.func_77979_a(1);
   return p_82487_2_;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:27,代碼來源:DispenserBehaviorBoat.java

示例4: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
protected ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   World var4 = p_82487_1_.func_82618_k();
   int var5 = p_82487_1_.func_82623_d() + var3.func_82601_c();
   int var6 = p_82487_1_.func_82622_e() + var3.func_96559_d();
   int var7 = p_82487_1_.func_82621_f() + var3.func_82599_e();
   if(var4.func_72799_c(var5, var6, var7)) {
      var4.func_94575_c(var5, var6, var7, Block.field_72067_ar.field_71990_ca);
      if(p_82487_2_.func_96631_a(1, var4.field_73012_v)) {
         p_82487_2_.field_77994_a = 0;
      }
   } else if(var4.func_72798_a(var5, var6, var7) == Block.field_72091_am.field_71990_ca) {
      Block.field_72091_am.func_71898_d(var4, var5, var6, var7, 1);
      var4.func_94571_i(var5, var6, var7);
   } else {
      this.field_96466_b = false;
   }

   return p_82487_2_;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:21,代碼來源:DispenserBehaviorFire.java

示例5: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   World var4 = p_82487_1_.func_82618_k();
   double var5 = p_82487_1_.func_82615_a() + (double)((float)var3.func_82601_c() * 1.125F);
   double var7 = p_82487_1_.func_82617_b() + (double)((float)var3.func_96559_d() * 1.125F);
   double var9 = p_82487_1_.func_82616_c() + (double)((float)var3.func_82599_e() * 1.125F);
   int var11 = p_82487_1_.func_82623_d() + var3.func_82601_c();
   int var12 = p_82487_1_.func_82622_e() + var3.func_96559_d();
   int var13 = p_82487_1_.func_82621_f() + var3.func_82599_e();
   int var14 = var4.func_72798_a(var11, var12, var13);
   double var15;
   if(BlockRailBase.func_72184_d(var14)) {
      var15 = 0.0D;
   } else {
      if(var14 != 0 || !BlockRailBase.func_72184_d(var4.func_72798_a(var11, var12 - 1, var13))) {
         return this.field_96465_b.func_82482_a(p_82487_1_, p_82487_2_);
      }

      var15 = -1.0D;
   }

   EntityMinecart var17 = EntityMinecart.func_94090_a(var4, var5, var7 + var15, var9, ((ItemMinecart)p_82487_2_.func_77973_b()).field_77841_a);
   if(p_82487_2_.func_82837_s()) {
      var17.func_96094_a(p_82487_2_.func_82833_r());
   }

   var4.func_72838_d(var17);
   p_82487_2_.func_77979_a(1);
   return p_82487_2_;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:31,代碼來源:BehaviorDispenseMinecart.java

示例6: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
protected ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   World var4 = p_82487_1_.func_82618_k();
   int var5 = p_82487_1_.func_82623_d() + var3.func_82601_c();
   int var6 = p_82487_1_.func_82622_e() + var3.func_96559_d();
   int var7 = p_82487_1_.func_82621_f() + var3.func_82599_e();
   EntityTNTPrimed var8 = new EntityTNTPrimed(var4, (double)((float)var5 + 0.5F), (double)((float)var6 + 0.5F), (double)((float)var7 + 0.5F), (EntityLivingBase)null);
   var4.func_72838_d(var8);
   --p_82487_2_.field_77994_a;
   return p_82487_2_;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:12,代碼來源:DispenserBehaviorTNT.java

示例7: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   World var4 = p_82487_1_.func_82618_k();
   int var5 = p_82487_1_.func_82623_d() + var3.func_82601_c();
   int var6 = p_82487_1_.func_82622_e() + var3.func_96559_d();
   int var7 = p_82487_1_.func_82621_f() + var3.func_82599_e();
   Material var8 = var4.func_72803_f(var5, var6, var7);
   int var9 = var4.func_72805_g(var5, var6, var7);
   Item var10;
   if(Material.field_76244_g.equals(var8) && var9 == 0) {
      var10 = Item.field_77786_ax;
   } else {
      if(!Material.field_76256_h.equals(var8) || var9 != 0) {
         return super.func_82487_b(p_82487_1_, p_82487_2_);
      }

      var10 = Item.field_77775_ay;
   }

   var4.func_94571_i(var5, var6, var7);
   if(--p_82487_2_.field_77994_a == 0) {
      p_82487_2_.field_77993_c = var10.field_77779_bT;
      p_82487_2_.field_77994_a = 1;
   } else if(((TileEntityDispenser)p_82487_1_.func_82619_j()).func_70360_a(new ItemStack(var10)) < 0) {
      this.field_96460_b.func_82482_a(p_82487_1_, new ItemStack(var10));
   }

   return p_82487_2_;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:30,代碼來源:DispenserBehaviorEmptyBucket.java

示例8: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   World var3 = p_82487_1_.func_82618_k();
   IPosition var4 = BlockDispenser.func_82525_a(p_82487_1_);
   EnumFacing var5 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   IProjectile var6 = this.func_82499_a(var3, var4);
   var6.func_70186_c((double)var5.func_82601_c(), (double)((float)var5.func_96559_d() + 0.1F), (double)var5.func_82599_e(), this.func_82500_b(), this.func_82498_a());
   var3.func_72838_d((Entity)var6);
   p_82487_2_.func_77979_a(1);
   return p_82487_2_;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:11,代碼來源:BehaviorProjectileDispense.java

示例9: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
protected ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   IPosition var4 = BlockDispenser.func_82525_a(p_82487_1_);
   ItemStack var5 = p_82487_2_.func_77979_a(1);
   func_82486_a(p_82487_1_.func_82618_k(), var5, 6, var3, var4);
   return p_82487_2_;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:8,代碼來源:BehaviorDefaultDispenseItem.java

示例10: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   IPosition var4 = BlockDispenser.func_82525_a(p_82487_1_);
   double var5 = var4.func_82615_a() + (double)((float)var3.func_82601_c() * 0.3F);
   double var7 = var4.func_82617_b() + (double)((float)var3.func_82601_c() * 0.3F);
   double var9 = var4.func_82616_c() + (double)((float)var3.func_82599_e() * 0.3F);
   World var11 = p_82487_1_.func_82618_k();
   Random var12 = var11.field_73012_v;
   double var13 = var12.nextGaussian() * 0.05D + (double)var3.func_82601_c();
   double var15 = var12.nextGaussian() * 0.05D + (double)var3.func_96559_d();
   double var17 = var12.nextGaussian() * 0.05D + (double)var3.func_82599_e();
   var11.func_72838_d(new EntitySmallFireball(var11, var5, var7, var9, var13, var15, var17));
   p_82487_2_.func_77979_a(1);
   return p_82487_2_;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:16,代碼來源:DispenserBehaviorFireball.java

示例11: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   double var4 = p_82487_1_.func_82615_a() + (double)var3.func_82601_c();
   double var6 = (double)((float)p_82487_1_.func_82622_e() + 0.2F);
   double var8 = p_82487_1_.func_82616_c() + (double)var3.func_82599_e();
   Entity var10 = ItemMonsterPlacer.func_77840_a(p_82487_1_.func_82618_k(), p_82487_2_.func_77960_j(), var4, var6, var8);
   if(var10 instanceof EntityLivingBase && p_82487_2_.func_82837_s()) {
      ((EntityLiving)var10).func_94058_c(p_82487_2_.func_82833_r());
   }

   p_82487_2_.func_77979_a(1);
   return p_82487_2_;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:14,代碼來源:DispenserBehaviorMobEgg.java

示例12: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   EnumFacing var3 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   double var4 = p_82487_1_.func_82615_a() + (double)var3.func_82601_c();
   double var6 = (double)((float)p_82487_1_.func_82622_e() + 0.2F);
   double var8 = p_82487_1_.func_82616_c() + (double)var3.func_82599_e();
   EntityFireworkRocket var10 = new EntityFireworkRocket(p_82487_1_.func_82618_k(), var4, var6, var8, p_82487_2_);
   p_82487_1_.func_82618_k().func_72838_d(var10);
   p_82487_2_.func_77979_a(1);
   return p_82487_2_;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:11,代碼來源:DispenserBehaviorFireworks.java

示例13: func_82487_b

import net.minecraft.block.BlockDispenser; //導入方法依賴的package包/類
public ItemStack func_82487_b(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
   ItemBucket var3 = (ItemBucket)p_82487_2_.func_77973_b();
   int var4 = p_82487_1_.func_82623_d();
   int var5 = p_82487_1_.func_82622_e();
   int var6 = p_82487_1_.func_82621_f();
   EnumFacing var7 = BlockDispenser.func_100009_j_(p_82487_1_.func_82620_h());
   if(var3.func_77875_a(p_82487_1_.func_82618_k(), var4 + var7.func_82601_c(), var5 + var7.func_96559_d(), var6 + var7.func_82599_e())) {
      p_82487_2_.field_77993_c = Item.field_77788_aw.field_77779_bT;
      p_82487_2_.field_77994_a = 1;
      return p_82487_2_;
   } else {
      return this.field_96459_b.func_82482_a(p_82487_1_, p_82487_2_);
   }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:15,代碼來源:DispenserBehaviorFilledBucket.java


注:本文中的net.minecraft.block.BlockDispenser.func_100009_j_方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。