mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Add implementation for Living Attack event on client-side for players (#3667)
* Fixed unused import
This commit is contained in:
1 parent
ab4c4db0d5
commit
3c3fcc0ffd
2 files changed
+22
-4
No files matched your search
@@ -0,0 +1,10 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_)
|
||||
{
|
||||
+ net.minecraftforge.common.ForgeHooks.onLivingAttack(this, p_70097_1_, p_70097_2_);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
|
||||
@@ -428,6 +428,15 @@
|
||||
@@ -125,6 +125,7 @@
|
||||
|
||||
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_)
|
||||
{
|
||||
+ net.minecraftforge.common.ForgeHooks.onLivingAttack(this, p_70097_1_, p_70097_2_);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -428,6 +429,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +24,7 @@
|
||||
protected boolean func_145771_j(double p_145771_1_, double p_145771_3_, double p_145771_5_)
|
||||
{
|
||||
if (this.field_70145_X)
|
||||
@@ -440,30 +449,34 @@
|
||||
@@ -440,30 +450,34 @@
|
||||
double d0 = p_145771_1_ - (double)blockpos.func_177958_n();
|
||||
double d1 = p_145771_5_ - (double)blockpos.func_177952_p();
|
||||
|
||||
@@ -56,7 +64,7 @@
|
||||
{
|
||||
d2 = 1.0D - d1;
|
||||
i = 5;
|
||||
@@ -498,7 +511,8 @@
|
||||
@@ -498,7 +512,8 @@
|
||||
|
||||
private boolean func_175162_d(BlockPos p_175162_1_)
|
||||
{
|
||||
@@ -66,7 +74,7 @@
|
||||
}
|
||||
|
||||
public void func_70031_b(boolean p_70031_1_)
|
||||
@@ -543,7 +557,13 @@
|
||||
@@ -543,7 +558,13 @@
|
||||
|
||||
public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user