public void onDeath(DamageSource var1) { super.onDeath(var1); if (var1.getSourceOfDamage() instanceof EntityArrow && var1.getEntity() instanceof EntityPlayer) { EntityPlayer var2 = (EntityPlayer) var1.getEntity(); double var3 = var2.posX - this.posX; double var5 = var2.posZ - this.posZ; if (var3 * var3 + var5 * var5 >= 2500.0D) { var2.triggerAchievement(AchievementList.snipeSkeleton); } } }
public void onLivingUpdate() { if (this.worldObj.isDaytime() && !this.worldObj.multiplayerWorld) { float var1 = this.getEntityBrightness(1.0F); if (var1 > 0.5F && this.worldObj.canBlockSeeTheSky( MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)) && this.rand.nextFloat() * 30.0F < (var1 - 0.4F) * 2.0F) { this.func_40046_d(8); } } super.onLivingUpdate(); }
public void func_70636_d() { if (!this.field_70170_p.field_72995_K) { if (this.func_70026_G()) { this.func_70097_a(DamageSource.field_76369_e, 1); } --this.field_70848_e; if (this.field_70848_e <= 0) { this.field_70848_e = 100; this.field_70847_d = 0.5F + (float) this.field_70146_Z.nextGaussian() * 3.0F; } if (this.func_70777_m() != null && this.func_70777_m().field_70163_u + (double) this.func_70777_m().func_70047_e() > this.field_70163_u + (double) this.func_70047_e() + (double) this.field_70847_d) { this.field_70181_x += (0.30000001192092896D - this.field_70181_x) * 0.30000001192092896D; } } if (this.field_70146_Z.nextInt(24) == 0) { this.field_70170_p.func_72908_a( this.field_70165_t + 0.5D, this.field_70163_u + 0.5D, this.field_70161_v + 0.5D, "fire.fire", 1.0F + this.field_70146_Z.nextFloat(), this.field_70146_Z.nextFloat() * 0.7F + 0.3F); } if (!this.field_70122_E && this.field_70181_x < 0.0D) { this.field_70181_x *= 0.6D; } for (int var1 = 0; var1 < 2; ++var1) { this.field_70170_p.func_72869_a( "largesmoke", this.field_70165_t + (this.field_70146_Z.nextDouble() - 0.5D) * (double) this.field_70130_N, this.field_70163_u + this.field_70146_Z.nextDouble() * (double) this.field_70131_O, this.field_70161_v + (this.field_70146_Z.nextDouble() - 0.5D) * (double) this.field_70130_N, 0.0D, 0.0D, 0.0D); } super.func_70636_d(); }
public void func_70636_d() { if (this.func_70026_G()) { this.func_70097_a(DamageSource.field_76369_e, 1); } this.field_70697_bw = this.field_70789_a != null ? 6.5F : 0.3F; int var1; if (!this.field_70170_p.field_72995_K) { int var2; int var3; int var4; if (this.func_70822_p() == 0) { if (this.field_70146_Z.nextInt(20) == 0) { var1 = MathHelper.func_76128_c( this.field_70165_t - 2.0D + this.field_70146_Z.nextDouble() * 4.0D); var2 = MathHelper.func_76128_c(this.field_70163_u + this.field_70146_Z.nextDouble() * 3.0D); var3 = MathHelper.func_76128_c( this.field_70161_v - 2.0D + this.field_70146_Z.nextDouble() * 4.0D); var4 = this.field_70170_p.func_72798_a(var1, var2, var3); if (field_70827_d[var4]) { this.func_70818_a(this.field_70170_p.func_72798_a(var1, var2, var3)); this.func_70817_b(this.field_70170_p.func_72805_g(var1, var2, var3)); this.field_70170_p.func_72859_e(var1, var2, var3, 0); } } } else if (this.field_70146_Z.nextInt(2000) == 0) { var1 = MathHelper.func_76128_c( this.field_70165_t - 1.0D + this.field_70146_Z.nextDouble() * 2.0D); var2 = MathHelper.func_76128_c(this.field_70163_u + this.field_70146_Z.nextDouble() * 2.0D); var3 = MathHelper.func_76128_c( this.field_70161_v - 1.0D + this.field_70146_Z.nextDouble() * 2.0D); var4 = this.field_70170_p.func_72798_a(var1, var2, var3); int var5 = this.field_70170_p.func_72798_a(var1, var2 - 1, var3); if (var4 == 0 && var5 > 0 && Block.field_71973_m[var5].func_71886_c()) { this.field_70170_p.func_72832_d( var1, var2, var3, this.func_70822_p(), this.func_70824_q()); this.func_70818_a(0); } } } for (var1 = 0; var1 < 2; ++var1) { this.field_70170_p.func_72869_a( "portal", this.field_70165_t + (this.field_70146_Z.nextDouble() - 0.5D) * (double) this.field_70130_N, this.field_70163_u + this.field_70146_Z.nextDouble() * (double) this.field_70131_O - 0.25D, this.field_70161_v + (this.field_70146_Z.nextDouble() - 0.5D) * (double) this.field_70130_N, (this.field_70146_Z.nextDouble() - 0.5D) * 2.0D, -this.field_70146_Z.nextDouble(), (this.field_70146_Z.nextDouble() - 0.5D) * 2.0D); } if (this.field_70170_p.func_72935_r() && !this.field_70170_p.field_72995_K) { float var6 = this.func_70013_c(1.0F); if (var6 > 0.5F && this.field_70170_p.func_72937_j( MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.field_70163_u), MathHelper.func_76128_c(this.field_70161_v)) && this.field_70146_Z.nextFloat() * 30.0F < (var6 - 0.4F) * 2.0F) { this.field_70789_a = null; this.func_70819_e(false); this.func_70820_n(); } } if (this.func_70026_G()) { this.field_70789_a = null; this.func_70819_e(false); this.func_70820_n(); } this.field_70703_bu = false; if (this.field_70789_a != null) { this.func_70625_a(this.field_70789_a, 100.0F, 100.0F); } if (!this.field_70170_p.field_72995_K && this.func_70089_S()) { if (this.field_70789_a != null) { if (this.field_70789_a instanceof EntityPlayer && this.func_70821_d((EntityPlayer) this.field_70789_a)) { this.field_70702_br = this.field_70701_bs = 0.0F; this.field_70697_bw = 0.0F; if (this.field_70789_a.func_70068_e(this) < 16.0D) { this.func_70820_n(); } this.field_70828_e = 0; } else if (this.field_70789_a.func_70068_e(this) > 256.0D && this.field_70828_e++ >= 30 && this.func_70816_c(this.field_70789_a)) { this.field_70828_e = 0; } } else { this.func_70819_e(false); this.field_70828_e = 0; } } super.func_70636_d(); }
public void func_70037_a(NBTTagCompound p_70037_1_) { super.func_70037_a(p_70037_1_); this.func_70818_a(p_70037_1_.func_74765_d("carried")); this.func_70817_b(p_70037_1_.func_74765_d("carriedData")); }
public void func_70014_b(NBTTagCompound p_70014_1_) { super.func_70014_b(p_70014_1_); p_70014_1_.func_74777_a("carried", (short) this.func_70822_p()); p_70014_1_.func_74777_a("carriedData", (short) this.func_70824_q()); }
protected void func_70088_a() { super.func_70088_a(); this.field_70180_af.func_75682_a(16, new Byte((byte) 0)); this.field_70180_af.func_75682_a(17, new Byte((byte) 0)); this.field_70180_af.func_75682_a(18, new Byte((byte) 0)); }
public void writeEntityToNBT(NBTTagCompound var1) { super.writeEntityToNBT(var1); }
public void readEntityFromNBT(NBTTagCompound var1) { super.readEntityFromNBT(var1); }