Fix extendo grip applying knockback on arrow or tnt damage

This commit is contained in:
Snownee 2021-01-14 12:34:41 +08:00
parent 5d0674067f
commit b1b771ed2e

View File

@ -163,7 +163,7 @@ public class ExtendoGripItem extends Item {
public static void attacksByExtendoGripHaveMoreKnockback(LivingKnockBackEvent event) { public static void attacksByExtendoGripHaveMoreKnockback(LivingKnockBackEvent event) {
if (lastActiveDamageSource == null) if (lastActiveDamageSource == null)
return; return;
Entity entity = lastActiveDamageSource.getTrueSource(); Entity entity = lastActiveDamageSource.getImmediateSource();
if (!(entity instanceof PlayerEntity)) if (!(entity instanceof PlayerEntity))
return; return;
PlayerEntity player = (PlayerEntity) entity; PlayerEntity player = (PlayerEntity) entity;