From 3fdd6b41d08bed0c53a1e8880937283b203703df Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 8 Oct 2023 12:33:17 +0200 Subject: [PATCH] Fix: Beacon effects broken since 1.20.2 (#4199) Since 1.20.2, effect IDs start at 0, not 1. Bedrock of course doesn't respect that, so we need to subtract 1! --- .../geyser/translator/inventory/BeaconInventoryTranslator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/geysermc/geyser/translator/inventory/BeaconInventoryTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/inventory/BeaconInventoryTranslator.java index db0702e13..a0b6ebe9c 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/inventory/BeaconInventoryTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/inventory/BeaconInventoryTranslator.java @@ -119,7 +119,7 @@ public class BeaconInventoryTranslator extends AbstractBlockInventoryTranslator } private OptionalInt toJava(int effectChoice) { - return effectChoice == 0 ? OptionalInt.empty() : OptionalInt.of(effectChoice); + return effectChoice == 0 ? OptionalInt.empty() : OptionalInt.of(effectChoice - 1); } @Override