3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 16:40:10 +01:00

Fix secondary effect reading in serverbound beacon

Fixes #3455
Dieser Commit ist enthalten in:
Nassim Jahnke 2023-09-28 09:34:26 +10:00
Ursprung b4720c723a
Commit 3b0d1d961a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -62,8 +62,11 @@ public final class BlockItemPacketRewriter1_20_2 extends ItemRewriter<Clientboun
blockRewriter.registerEffect(ClientboundPackets1_19_4.EFFECT, 1010, 2001);
protocol.registerServerbound(ServerboundPackets1_20_2.SET_BEACON_EFFECT, wrapper -> {
if (wrapper.passthrough(Type.BOOLEAN)) {
// Effects start at 1 before 1.20.2
if (wrapper.passthrough(Type.BOOLEAN)) { // Primary effect
wrapper.write(Type.VAR_INT, wrapper.read(Type.VAR_INT) + 1);
}
if (wrapper.passthrough(Type.BOOLEAN)) { // Secondary effect
wrapper.write(Type.VAR_INT, wrapper.read(Type.VAR_INT) + 1);
}
});