3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-07-03 14:18:03 +02:00

Fix map marker reading

Dieser Commit ist enthalten in:
Nassim Jahnke 2023-12-05 22:23:48 +01:00
Ursprung 375bb5a1b9
Commit 8a2c18863c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -173,7 +173,7 @@ public final class Protocol1_20_2To1_20_3 extends BackwardsProtocol<ClientboundP
if (wrapper.passthrough(Type.BOOLEAN)) {
final int icons = wrapper.passthrough(Type.VAR_INT);
for (int i = 0; i < icons; i++) {
wrapper.passthrough(Type.BYTE); // Type
wrapper.passthrough(Type.VAR_INT); // Type
wrapper.passthrough(Type.BYTE); // X
wrapper.passthrough(Type.BYTE); // Y
wrapper.passthrough(Type.BYTE); // Rotation

Datei anzeigen

@ -83,8 +83,8 @@ public final class BlockItemPacketRewriter1_20_2 extends ItemRewriter<Clientboun
final int icons = wrapper.passthrough(Type.VAR_INT);
for (int i = 0; i < icons; i++) {
// Map new marker types to red marker
final byte markerType = wrapper.read(Type.BYTE);
wrapper.write(Type.BYTE, markerType < 27 ? markerType : 2);
final int markerType = wrapper.read(Type.VAR_INT);
wrapper.write(Type.VAR_INT, markerType < 27 ? markerType : 2);
wrapper.passthrough(Type.BYTE); // X
wrapper.passthrough(Type.BYTE); // Y