mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Make horses and llama's fire LivingFallEvent. Fixes #9743
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user