当前位置: 首页>>代码示例>>Java>>正文


Java TileEntityPiston.func_70341_b方法代码示例

本文整理汇总了Java中net.minecraft.tileentity.TileEntityPiston.func_70341_b方法的典型用法代码示例。如果您正苦于以下问题:Java TileEntityPiston.func_70341_b方法的具体用法?Java TileEntityPiston.func_70341_b怎么用?Java TileEntityPiston.func_70341_b使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.tileentity.TileEntityPiston的用法示例。


在下文中一共展示了TileEntityPiston.func_70341_b方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: func_71902_a

import net.minecraft.tileentity.TileEntityPiston; //导入方法依赖的package包/类
public void func_71902_a(IBlockAccess p_71902_1_, int p_71902_2_, int p_71902_3_, int p_71902_4_) {
   TileEntityPiston var5 = this.func_72295_d(p_71902_1_, p_71902_2_, p_71902_3_, p_71902_4_);
   if(var5 != null) {
      Block var6 = Block.field_71973_m[var5.func_70340_a()];
      if(var6 == null || var6 == this) {
         return;
      }

      var6.func_71902_a(p_71902_1_, p_71902_2_, p_71902_3_, p_71902_4_);
      float var7 = var5.func_70333_a(0.0F);
      if(var5.func_70341_b()) {
         var7 = 1.0F - var7;
      }

      int var8 = var5.func_70336_c();
      this.field_72026_ch = var6.func_83009_v() - (double)((float)Facing.field_71586_b[var8] * var7);
      this.field_72023_ci = var6.func_83008_x() - (double)((float)Facing.field_71587_c[var8] * var7);
      this.field_72024_cj = var6.func_83005_z() - (double)((float)Facing.field_71585_d[var8] * var7);
      this.field_72021_ck = var6.func_83007_w() - (double)((float)Facing.field_71586_b[var8] * var7);
      this.field_72022_cl = var6.func_83010_y() - (double)((float)Facing.field_71587_c[var8] * var7);
      this.field_72019_cm = var6.func_83006_A() - (double)((float)Facing.field_71585_d[var8] * var7);
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:25,代码来源:BlockPistonMoving.java

示例2: func_71872_e

import net.minecraft.tileentity.TileEntityPiston; //导入方法依赖的package包/类
public AxisAlignedBB func_71872_e(World p_71872_1_, int p_71872_2_, int p_71872_3_, int p_71872_4_) {
   TileEntityPiston var5 = this.func_72295_d(p_71872_1_, p_71872_2_, p_71872_3_, p_71872_4_);
   if(var5 == null) {
      return null;
   } else {
      float var6 = var5.func_70333_a(0.0F);
      if(var5.func_70341_b()) {
         var6 = 1.0F - var6;
      }

      return this.func_72296_b(p_71872_1_, p_71872_2_, p_71872_3_, p_71872_4_, var5.func_70340_a(), var6, var5.func_70336_c());
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:14,代码来源:BlockPistonMoving.java

示例3: func_76903_a

import net.minecraft.tileentity.TileEntityPiston; //导入方法依赖的package包/类
public void func_76903_a(TileEntityPiston p_76903_1_, double p_76903_2_, double p_76903_4_, double p_76903_6_, float p_76903_8_) {
   Block var9 = Block.field_71973_m[p_76903_1_.func_70340_a()];
   if(var9 != null && p_76903_1_.func_70333_a(p_76903_8_) < 1.0F) {
      Tessellator var10 = Tessellator.field_78398_a;
      this.func_110628_a(TextureMap.field_110575_b);
      RenderHelper.func_74518_a();
      GL11.glBlendFunc(770, 771);
      GL11.glEnable(3042);
      GL11.glDisable(2884);
      if(Minecraft.func_71379_u()) {
         GL11.glShadeModel(7425);
      } else {
         GL11.glShadeModel(7424);
      }

      var10.func_78382_b();
      var10.func_78373_b((double)((float)p_76903_2_ - (float)p_76903_1_.field_70329_l + p_76903_1_.func_70337_b(p_76903_8_)), (double)((float)p_76903_4_ - (float)p_76903_1_.field_70330_m + p_76903_1_.func_70334_c(p_76903_8_)), (double)((float)p_76903_6_ - (float)p_76903_1_.field_70327_n + p_76903_1_.func_70332_d(p_76903_8_)));
      var10.func_78376_a(1, 1, 1);
      if(var9 == Block.field_72099_aa && p_76903_1_.func_70333_a(p_76903_8_) < 0.5F) {
         this.field_76904_a.func_78587_a(var9, p_76903_1_.field_70329_l, p_76903_1_.field_70330_m, p_76903_1_.field_70327_n, false);
      } else if(p_76903_1_.func_70338_f() && !p_76903_1_.func_70341_b()) {
         Block.field_72099_aa.func_72122_e(((BlockPistonBase)var9).func_72118_n());
         this.field_76904_a.func_78587_a(Block.field_72099_aa, p_76903_1_.field_70329_l, p_76903_1_.field_70330_m, p_76903_1_.field_70327_n, p_76903_1_.func_70333_a(p_76903_8_) < 0.5F);
         Block.field_72099_aa.func_72120_n();
         var10.func_78373_b((double)((float)p_76903_2_ - (float)p_76903_1_.field_70329_l), (double)((float)p_76903_4_ - (float)p_76903_1_.field_70330_m), (double)((float)p_76903_6_ - (float)p_76903_1_.field_70327_n));
         this.field_76904_a.func_78568_d(var9, p_76903_1_.field_70329_l, p_76903_1_.field_70330_m, p_76903_1_.field_70327_n);
      } else {
         this.field_76904_a.func_78583_a(var9, p_76903_1_.field_70329_l, p_76903_1_.field_70330_m, p_76903_1_.field_70327_n);
      }

      var10.func_78373_b(0.0D, 0.0D, 0.0D);
      var10.func_78381_a();
      RenderHelper.func_74519_b();
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:37,代码来源:TileEntityRendererPiston.java

示例4: func_71883_b

import net.minecraft.tileentity.TileEntityPiston; //导入方法依赖的package包/类
public boolean func_71883_b(World p_71883_1_, int p_71883_2_, int p_71883_3_, int p_71883_4_, int p_71883_5_, int p_71883_6_) {
   if(!p_71883_1_.field_72995_K) {
      boolean var7 = this.func_72113_e(p_71883_1_, p_71883_2_, p_71883_3_, p_71883_4_, p_71883_6_);
      if(var7 && p_71883_5_ == 1) {
         p_71883_1_.func_72921_c(p_71883_2_, p_71883_3_, p_71883_4_, p_71883_6_ | 8, 2);
         return false;
      }

      if(!var7 && p_71883_5_ == 0) {
         return false;
      }
   }

   if(p_71883_5_ == 0) {
      if(!this.func_72115_j(p_71883_1_, p_71883_2_, p_71883_3_, p_71883_4_, p_71883_6_)) {
         return false;
      }

      p_71883_1_.func_72921_c(p_71883_2_, p_71883_3_, p_71883_4_, p_71883_6_ | 8, 2);
      p_71883_1_.func_72908_a((double)p_71883_2_ + 0.5D, (double)p_71883_3_ + 0.5D, (double)p_71883_4_ + 0.5D, "tile.piston.out", 0.5F, p_71883_1_.field_73012_v.nextFloat() * 0.25F + 0.6F);
   } else if(p_71883_5_ == 1) {
      TileEntity var16 = p_71883_1_.func_72796_p(p_71883_2_ + Facing.field_71586_b[p_71883_6_], p_71883_3_ + Facing.field_71587_c[p_71883_6_], p_71883_4_ + Facing.field_71585_d[p_71883_6_]);
      if(var16 instanceof TileEntityPiston) {
         ((TileEntityPiston)var16).func_70339_i();
      }

      p_71883_1_.func_72832_d(p_71883_2_, p_71883_3_, p_71883_4_, Block.field_72095_ac.field_71990_ca, p_71883_6_, 3);
      p_71883_1_.func_72837_a(p_71883_2_, p_71883_3_, p_71883_4_, BlockPistonMoving.func_72297_a(this.field_71990_ca, p_71883_6_, p_71883_6_, false, true));
      if(this.field_72119_a) {
         int var8 = p_71883_2_ + Facing.field_71586_b[p_71883_6_] * 2;
         int var9 = p_71883_3_ + Facing.field_71587_c[p_71883_6_] * 2;
         int var10 = p_71883_4_ + Facing.field_71585_d[p_71883_6_] * 2;
         int var11 = p_71883_1_.func_72798_a(var8, var9, var10);
         int var12 = p_71883_1_.func_72805_g(var8, var9, var10);
         boolean var13 = false;
         if(var11 == Block.field_72095_ac.field_71990_ca) {
            TileEntity var14 = p_71883_1_.func_72796_p(var8, var9, var10);
            if(var14 instanceof TileEntityPiston) {
               TileEntityPiston var15 = (TileEntityPiston)var14;
               if(var15.func_70336_c() == p_71883_6_ && var15.func_70341_b()) {
                  var15.func_70339_i();
                  var11 = var15.func_70340_a();
                  var12 = var15.func_70322_n();
                  var13 = true;
               }
            }
         }

         if(!var13 && var11 > 0 && func_72111_a(var11, p_71883_1_, var8, var9, var10, false) && (Block.field_71973_m[var11].func_71915_e() == 0 || var11 == Block.field_71963_Z.field_71990_ca || var11 == Block.field_71956_V.field_71990_ca)) {
            p_71883_2_ += Facing.field_71586_b[p_71883_6_];
            p_71883_3_ += Facing.field_71587_c[p_71883_6_];
            p_71883_4_ += Facing.field_71585_d[p_71883_6_];
            p_71883_1_.func_72832_d(p_71883_2_, p_71883_3_, p_71883_4_, Block.field_72095_ac.field_71990_ca, var12, 3);
            p_71883_1_.func_72837_a(p_71883_2_, p_71883_3_, p_71883_4_, BlockPistonMoving.func_72297_a(var11, var12, p_71883_6_, false, false));
            p_71883_1_.func_94571_i(var8, var9, var10);
         } else if(!var13) {
            p_71883_1_.func_94571_i(p_71883_2_ + Facing.field_71586_b[p_71883_6_], p_71883_3_ + Facing.field_71587_c[p_71883_6_], p_71883_4_ + Facing.field_71585_d[p_71883_6_]);
         }
      } else {
         p_71883_1_.func_94571_i(p_71883_2_ + Facing.field_71586_b[p_71883_6_], p_71883_3_ + Facing.field_71587_c[p_71883_6_], p_71883_4_ + Facing.field_71585_d[p_71883_6_]);
      }

      p_71883_1_.func_72908_a((double)p_71883_2_ + 0.5D, (double)p_71883_3_ + 0.5D, (double)p_71883_4_ + 0.5D, "tile.piston.in", 0.5F, p_71883_1_.field_73012_v.nextFloat() * 0.15F + 0.6F);
   }

   return true;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:68,代码来源:BlockPistonBase.java


注:本文中的net.minecraft.tileentity.TileEntityPiston.func_70341_b方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。