Correctly compare holders in BeaconMenu (#10673)

This commit is contained in:
Bjarne Koll 2024-05-08 03:18:57 +02:00
parent 624d28817c
commit 93f003b64f

View file

@ -336,7 +336,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void updateEffects(Optional<Holder<MobEffect>> primary, Optional<Holder<MobEffect>> secondary) {
+ // Paper start - fix MC-174630 - validate secondary power
+ if (secondary.isPresent() && secondary.get().value() != net.minecraft.world.effect.MobEffects.REGENERATION && (primary.isPresent() && secondary.get() != primary.get())) {
+ if (secondary.isPresent() && secondary.get() != net.minecraft.world.effect.MobEffects.REGENERATION && (primary.isPresent() && secondary.get() != primary.get())) {
+ secondary = Optional.empty();
+ }
+ // Paper end