3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-07-10 17:28:04 +02:00

Handle new trial chamber map decoration type

Fixes #789
Dieser Commit ist enthalten in:
Nassim Jahnke 2024-06-17 12:21:25 +02:00
Ursprung 4061e91e53
Commit bba0a3a3a6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -186,6 +186,23 @@ public final class BlockItemPacketRewriter1_20_5 extends BackwardsStructuredItem
}
});
protocol.registerClientbound(ClientboundPackets1_20_5.MAP_ITEM_DATA, wrapper -> {
wrapper.passthrough(Types.VAR_INT); // Map id
wrapper.passthrough(Types.BYTE); // Scale
wrapper.passthrough(Types.BOOLEAN); // Locked
if (wrapper.passthrough(Types.BOOLEAN)) {
final int icons = wrapper.passthrough(Types.VAR_INT);
for (int i = 0; i < icons; i++) {
final int decorationType = wrapper.read(Types.VAR_INT);
wrapper.write(Types.VAR_INT, decorationType == 34 ? 32 : decorationType); // Trial champer to jungle temple
wrapper.passthrough(Types.BYTE); // X
wrapper.passthrough(Types.BYTE); // Y
wrapper.passthrough(Types.BYTE); // Rotation
wrapper.passthrough(Types.OPTIONAL_TAG); // Display name
}
}
});
final RecipeRewriter1_20_3<ClientboundPacket1_20_5> recipeRewriter = new RecipeRewriter1_20_3<>(protocol);
protocol.registerClientbound(ClientboundPackets1_20_5.UPDATE_RECIPES, wrapper -> {
final int size = wrapper.passthrough(Types.VAR_INT);