Merge fix-2646 and fix-2670 updates

This commit is contained in:
Ludovic Marie committed 2026-10-27 13:08:51 +01:00
2 files changed
+9 -5

No files matched your search

@@ -567,7 +567,9 @@ fn print_heart(
/// The damage of a mob's direct hit on the player (others count as none).
fn player_damage(e: &MobEvent) -> f32 {
match e {
MobEvent::AttackPlayer(amount, _) | MobEvent::DamagePlayer { amount, .. } => *amount,
MobEvent::AttackPlayer(amount, _)
| MobEvent::AttackPlayerWithEffect { amount, .. }
| MobEvent::DamagePlayer { amount, .. } => *amount,
_ => 0.0,
}
}
@@ -578,7 +580,9 @@ fn player_hurt(player: Option<&PlayerView>, e: &MobEvent) -> bool {
return false;
};
match e {
MobEvent::AttackPlayer(amount, _) | MobEvent::DamagePlayer { amount, .. } => *amount > 0.0,
MobEvent::AttackPlayer(amount, _)
| MobEvent::AttackPlayerWithEffect { amount, .. }
| MobEvent::DamagePlayer { amount, .. } => *amount > 0.0,
// ServerExplosion.hurtEntities: within twice the radius every hit does damage.
MobEvent::Explode(at, radius) => {
let d = Vec3::new(at[0], at[1], at[2])
+3 -3
View File
@@ -540,9 +540,9 @@ impl Opt {
Opt::HideLightningFlashes => on_off(s.file.bool("hideLightningFlashes")),
Opt::MonochromeLogo => on_off(s.file.bool("darkMojangStudiosBackground")),
Opt::HideSplashTexts => on_off(s.file.bool("hideSplashTexts")),
Opt::HideMatchedNames
| Opt::OnlySecureChat
| Opt::SaveChatDrafts => on_off(s.file.bool(self.file_key().unwrap())),
Opt::HideMatchedNames | Opt::OnlySecureChat | Opt::SaveChatDrafts => {
on_off(s.file.bool(self.file_key().unwrap()))
}
Opt::NarratorHotkey => on_off(s.file.bool("narratorHotkey")),
Opt::RotateWithMinecarts => on_off(s.file.bool("rotateWithMinecart")),
Opt::HighContrastBlockOutlines => on_off(s.file.bool("highContrastBlockOutline")),