Merge pull request #2263 from kacpherek/fix/bee-poison-difficulty
🤖 Agent: Read against the vanilla 26.3 sources (Bee stings only poison on Normal and Hard) and proven in contrib-gate-21's union of 72 kacpherek PRs: 95 parity harnesses on playhorizon and the Mac mini, clippy, 1534 tests, lan_e2e 23 checks in-frame and with --server-thread. Thanks @kacpherek!
This commit is contained in:
@@ -323,12 +323,19 @@ pub fn sting(m: &mut Mob, who: Who, cx: &mut Cx) {
|
||||
match who {
|
||||
Who::Player => {
|
||||
cx.events.push(MobEvent::AttackPlayer(amount, from));
|
||||
let seconds = if cx.w.difficulty.hard { 18 } else { 10 };
|
||||
cx.events.push(MobEvent::EffectPlayer {
|
||||
effect: "minecraft:poison",
|
||||
ticks: seconds * 20,
|
||||
amplifier: 0,
|
||||
});
|
||||
// Poison only on normal (10 s) and hard (18 s).
|
||||
let seconds = match cx.w.difficulty.id {
|
||||
2 => 10,
|
||||
3 => 18,
|
||||
_ => 0,
|
||||
};
|
||||
if seconds > 0 {
|
||||
cx.events.push(MobEvent::EffectPlayer {
|
||||
effect: "minecraft:poison",
|
||||
ticks: seconds * 20,
|
||||
amplifier: 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
Who::Mob(id) => cx.events.push(MobEvent::AttackMob {
|
||||
target: id,
|
||||
|
||||
Reference in New Issue
Block a user