fix: chunk leak

This commit is contained in:
Alexander Medvedev committed 2026-08-16 14:32:10 +02:00
1 parent c13c515081
commit a72531a7c2
65 files changed
+991 -655

No files matched your search

+7 -10
View File
@@ -88,16 +88,13 @@ impl CommandExecutor for GiveExecutor {
let mut successes = 0;
for target in targets {
if target.living_entity.has_effect(effect).await
&& target
.living_entity
.get_effect(effect)
.await
.expect("Effect should exist because has_effect returned true")
.amplifier
>= amplifier
{
} else {
let should_skip = target
.living_entity
.get_effect(effect)
.await
.is_some_and(|existing| existing.amplifier >= amplifier);
if !should_skip {
target
.add_effect(Effect {
effect_type: effect,