This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Description
YarnForge's ForgeHooks:
public static boolean onLivingAttack(LivingEntity entity, DamageSource src, float amount) {
return entity instanceof PlayerEntity || !MinecraftForge.EVENT_BUS.post(new LivingAttackEvent(entity, src, amount));
}
public static boolean onPlayerAttack(LivingEntity entity, DamageSource src, float amount) {
return !MinecraftForge.EVENT_BUS.post(new LivingAttackEvent(entity, src, amount));
}
Patchwork's EntityEvents:
public static boolean onLivingAttack(LivingEntity entity, DamageSource src, float damage) {
return MinecraftForge.EVENT_BUS.post(new LivingAttackEvent(entity, src, damage));
}
The LivingEntity mixin ends up not checking if the entity is instanceof PlayerEntity while forge does. For all I know there's a reason for this, but it's not documented if there is a reason.