Make horses and llama's fire LivingFallEvent. Fixes #9743

This commit is contained in:
LexManos committed 2023-10-09 11:33:39 -07:00
1 parent a6978cffbf
commit 0c2f3e5523
5 files changed
+34 -10

No files matched your search

@@ -293,12 +293,6 @@ public class ForgeHooks {
return MinecraftForge.EVENT_BUS.post(new LivingDropsEvent(entity, source, drops, lootingLevel, recentlyHit));
}
@Nullable
public static float[] onLivingFall(LivingEntity entity, float distance, float damageMultiplier) {
LivingFallEvent event = new LivingFallEvent(entity, distance, damageMultiplier);
return (MinecraftForge.EVENT_BUS.post(event) ? null : new float[]{event.getDistance(), event.getDamageMultiplier()});
}
public static int getLootingLevel(Entity target, @Nullable Entity killer, @Nullable DamageSource cause) {
int looting = 0;
if (killer instanceof LivingEntity living)