diff --git a/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch b/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch index fd41f3a8bc..11c921375f 100644 --- a/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch @@ -47,15 +47,7 @@ while (i > 0) { int j = EntityXPOrb.func_70527_a(i); -@@ -442,6 +445,7 @@ - { - this.field_70755_b = p_70604_1_; - this.field_70756_c = this.field_70173_aa; -+ net.minecraftforge.common.ForgeHooks.onLivingSetAttackTarget(this, p_70604_1_); - } - - public EntityLivingBase func_110144_aD() -@@ -670,8 +674,10 @@ +@@ -670,8 +673,10 @@ else { Collection collection = this.field_70713_bf.values(); @@ -68,7 +60,7 @@ this.func_82142_c(this.func_70644_a(MobEffects.field_76441_p)); } } -@@ -819,6 +825,8 @@ +@@ -819,6 +824,8 @@ public void func_70691_i(float p_70691_1_) { @@ -77,7 +69,7 @@ float f = this.func_110143_aJ(); if (f > 0.0F) -@@ -839,6 +847,7 @@ +@@ -839,6 +846,7 @@ public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { @@ -85,7 +77,7 @@ if (this.func_180431_b(p_70097_1_)) { return false; -@@ -927,9 +936,9 @@ +@@ -927,9 +935,9 @@ this.field_70718_bc = 100; this.field_70717_bb = (EntityPlayer)entity1; } @@ -97,7 +89,7 @@ if (entitywolf.func_70909_n()) { -@@ -1127,7 +1136,7 @@ +@@ -1127,7 +1135,7 @@ public void func_70669_a(ItemStack p_70669_1_) { @@ -106,7 +98,7 @@ for (int i = 0; i < 5; ++i) { -@@ -1139,12 +1148,17 @@ +@@ -1139,12 +1147,17 @@ vec3d1 = vec3d1.func_178789_a(-this.field_70125_A * 0.017453292F); vec3d1 = vec3d1.func_178785_b(-this.field_70177_z * 0.017453292F); vec3d1 = vec3d1.func_72441_c(this.field_70165_t, this.field_70163_u + (double)this.func_70047_e(), this.field_70161_v); @@ -125,7 +117,7 @@ if (!this.field_70729_aU) { Entity entity = p_70645_1_.func_76346_g(); -@@ -1165,18 +1179,26 @@ +@@ -1165,18 +1178,26 @@ if (!this.field_70170_p.field_72995_K) { @@ -157,7 +149,7 @@ } this.field_70170_p.func_72960_a(this, (byte)3); -@@ -1195,6 +1217,9 @@ +@@ -1195,6 +1216,9 @@ public void func_70653_a(Entity p_70653_1_, float p_70653_2_, double p_70653_3_, double p_70653_5_) { @@ -167,7 +159,7 @@ if (this.field_70146_Z.nextDouble() >= this.func_110148_a(SharedMonsterAttributes.field_111266_c).func_111126_e()) { this.field_70160_al = true; -@@ -1253,15 +1278,7 @@ +@@ -1253,15 +1277,7 @@ BlockPos blockpos = new BlockPos(i, j, k); IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos); Block block = iblockstate.func_177230_c(); @@ -184,7 +176,7 @@ } } -@@ -1287,6 +1304,9 @@ +@@ -1287,6 +1303,9 @@ public void func_180430_e(float p_180430_1_, float p_180430_2_) { @@ -194,7 +186,7 @@ super.func_180430_e(p_180430_1_, p_180430_2_); PotionEffect potioneffect = this.func_70660_b(MobEffects.field_76430_j); float f = potioneffect == null ? 0.0F : (float)(potioneffect.func_76458_c() + 1); -@@ -1303,7 +1323,7 @@ +@@ -1303,7 +1322,7 @@ if (iblockstate.func_185904_a() != Material.field_151579_a) { @@ -203,7 +195,7 @@ this.func_184185_a(soundtype.func_185842_g(), soundtype.func_185843_a() * 0.5F, soundtype.func_185847_b() * 0.75F); } } -@@ -1380,17 +1400,20 @@ +@@ -1380,17 +1399,20 @@ { if (!this.func_180431_b(p_70665_1_)) { @@ -225,7 +217,7 @@ this.func_110149_m(this.func_110139_bj() - p_70665_2_); } } -@@ -1447,6 +1470,11 @@ +@@ -1447,6 +1469,11 @@ public void func_184609_a(EnumHand p_184609_1_) { @@ -237,7 +229,7 @@ if (!this.field_82175_bq || this.field_110158_av >= this.func_82166_i() / 2 || this.field_110158_av < 0) { this.field_110158_av = -1; -@@ -1694,7 +1722,7 @@ +@@ -1694,7 +1721,7 @@ if (!this.field_70170_p.func_184143_b(axisalignedbb1)) { @@ -246,7 +238,7 @@ { this.func_70634_a(d11, this.field_70163_u + 1.0D, d12); return; -@@ -1702,14 +1730,14 @@ +@@ -1702,14 +1729,14 @@ BlockPos blockpos = new BlockPos(d11, this.field_70163_u - 1.0D, d12); @@ -263,7 +255,7 @@ { d1 = d11; d13 = this.field_70163_u + 2.0D; -@@ -1781,16 +1809,17 @@ +@@ -1781,16 +1808,17 @@ } this.field_70160_al = true; @@ -283,7 +275,7 @@ } protected float func_189749_co() -@@ -1874,7 +1903,8 @@ +@@ -1874,7 +1902,8 @@ if (this.field_70122_E) { @@ -293,7 +285,7 @@ } float f7 = 0.16277136F / (f6 * f6 * f6); -@@ -1894,7 +1924,8 @@ +@@ -1894,7 +1923,8 @@ if (this.field_70122_E) { @@ -303,7 +295,7 @@ } if (this.func_70617_f_()) -@@ -2054,6 +2085,7 @@ +@@ -2054,6 +2084,7 @@ public void func_70071_h_() { @@ -311,7 +303,7 @@ super.func_70071_h_(); this.func_184608_ct(); -@@ -2096,7 +2128,9 @@ +@@ -2096,7 +2127,9 @@ if (!ItemStack.func_77989_b(itemstack1, itemstack)) { @@ -321,7 +313,7 @@ if (!itemstack.func_190926_b()) { -@@ -2575,6 +2609,40 @@ +@@ -2575,6 +2608,40 @@ this.field_70752_e = true; } @@ -362,7 +354,7 @@ public abstract EnumHandSide func_184591_cq(); public boolean func_184587_cr() -@@ -2595,12 +2663,19 @@ +@@ -2595,12 +2662,19 @@ if (itemstack == this.field_184627_bm) { @@ -383,7 +375,7 @@ { this.func_71036_o(); } -@@ -2618,8 +2693,10 @@ +@@ -2618,8 +2692,10 @@ if (!itemstack.func_190926_b() && !this.func_184587_cr()) { @@ -395,7 +387,7 @@ if (!this.field_70170_p.field_72995_K) { -@@ -2700,7 +2777,10 @@ +@@ -2700,7 +2776,10 @@ if (!this.field_184627_bm.func_190926_b() && this.func_184587_cr()) { this.func_184584_a(this.field_184627_bm, 16); @@ -407,7 +399,7 @@ this.func_184602_cy(); } } -@@ -2724,7 +2804,8 @@ +@@ -2724,7 +2803,8 @@ { if (!this.field_184627_bm.func_190926_b()) { @@ -417,7 +409,7 @@ } this.func_184602_cy(); -@@ -2852,6 +2933,31 @@ +@@ -2852,6 +2932,31 @@ return true; } @@ -449,7 +441,7 @@ public boolean func_190631_cK() { return true; -@@ -2861,4 +2967,30 @@ +@@ -2861,4 +2966,30 @@ public void func_191987_a(BlockPos p_191987_1_, boolean p_191987_2_) { } diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java index 4db7148d17..01da37583f 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java @@ -28,8 +28,7 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable; /** * LivingSetAttackTargetEvent is fired when an Entity sets a target to attack.
* This event is fired whenever an Entity sets a target to attack in - * {@link EntityLiving#setAttackTarget(EntityLivingBase)} and - * {@link EntityLivingBase#setRevengeTarget(EntityLivingBase)}.
+ * {@link EntityLiving#setAttackTarget(EntityLivingBase)}.
*
* This event is fired via the {@link ForgeHooks#onLivingSetAttackTarget(EntityLivingBase, EntityLivingBase)}.
*