You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of issue: CleanroomMC/Cleanroom#13
here is a issue of CleanroomMC(a fork of Forge of mc1.12.2)
It is noticed that Forge doesn't call LivingFallEvent when a horse(or a llama) falls in 47.2.1.
note: use parchment 2023.06.26-1.20.1
LivingEntity
public boolean causeFallDamage(float pFallDistance, float pMultiplier, DamageSource pSource) {
float[] ret = net.minecraftforge.common.ForgeHooks.onLivingFall(this, pFallDistance, pMultiplier);//**here post event**
if (ret == null) return false;
pFallDistance = ret[0];
pMultiplier = ret[1];
boolean flag = super.causeFallDamage(pFallDistance, pMultiplier, pSource);
int i = this.calculateFallDamage(pFallDistance, pMultiplier);
if (i > 0) {
this.playSound(this.getFallDamageSound(i), 1.0F, 1.0F);
this.playBlockFallSound();
this.hurt(pSource, (float)i);
return true;
} else {
return flag;
}
}
AbstractHorse
public boolean causeFallDamage(float pFallDistance, float pMultiplier, DamageSource pSource) {
if (pFallDistance > 1.0F) {
this.playSound(SoundEvents.HORSE_LAND, 0.4F, 1.0F);
}
int i = this.calculateFallDamage(pFallDistance, pMultiplier);
if (i <= 0) {
return false;
} else {
this.hurt(pSource, (float)i);
if (this.isVehicle()) {
for(Entity entity : this.getIndirectPassengers()) {
entity.hurt(pSource, (float)i);
}
}
this.playBlockFallSound();
return true;
}
}
protected int calculateFallDamage(float pDistance, float pDamageMultiplier) {
return Mth.ceil((pDistance * 0.5F - 3.0F) * pDamageMultiplier);
}
no event post here.
The text was updated successfully, but these errors were encountered:
Ecdcaeb
added
the
Triage
This request requires the active attention of the Triage Team. Requires labelling or reviews.
label
Oct 8, 2023
Ecdcaeb
changed the title
Should Horse calls LivingFallEvent?
Should Horse post LivingFallEvent?
Oct 8, 2023
Ecdcaeb
changed the title
Should Horse post LivingFallEvent?
[1.20.1]Should Horse post LivingFallEvent?
Oct 8, 2023
Minecraft Version: 1.20.1
Forge Version: 47.2.1
Logs: NONE
Steps to Reproduce:
NONE
Description of issue:
CleanroomMC/Cleanroom#13
here is a issue of CleanroomMC(a fork of Forge of mc1.12.2)
It is noticed that Forge doesn't call LivingFallEvent when a horse(or a llama) falls in 47.2.1.
note: use parchment 2023.06.26-1.20.1
LivingEntity
AbstractHorse
no event post here.
The text was updated successfully, but these errors were encountered: