Disabled invulnerability during knockback() for ScriptEntity.

This commit is contained in:
luisc committed 2021-10-19 03:44:41 -05:00
1 parent f88cbb8b51
commit 40e738384f
1 file changed
+2
@@ -463,12 +463,14 @@ public class ScriptEntity<T extends Entity> implements IEntity {
entity.motionX *= 0.6D;
entity.motionZ *= 0.6D;
entity.attackEntityFrom(DamageSource.outOfWorld, 0.0001F);
entity.hurtResistantTime = 0;
}
public void knockback(int xpower, int ypower, int zpower, float direction){
float v = direction * (float)Math.PI / 180.0F;
entity.addVelocity(-MathHelper.sin(v) * (float)xpower, 0.1D + ypower * 0.04f, MathHelper.cos(v) * (float)zpower);
entity.attackEntityFrom(DamageSource.outOfWorld, 0.0001F);
entity.hurtResistantTime = 0;
}
/**