3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00
Dieser Commit ist enthalten in:
Nassim Jahnke 2023-08-05 13:31:43 +10:00
Ursprung 6e5e115c3b
Commit 39efc5262e
2 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -84,6 +84,7 @@ public final class Protocol1_20_2To1_20 extends AbstractProtocol<ClientboundPack
final ConfigurationState configurationState = wrapper.user().get(ConfigurationState.class); final ConfigurationState configurationState = wrapper.user().get(ConfigurationState.class);
configurationState.setBridgePhase(ConfigurationState.BridgePhase.CONFIGURATION); configurationState.setBridgePhase(ConfigurationState.BridgePhase.CONFIGURATION);
// TODO: ... WE NEED TO SET THE ACTUAL STATE TO CONFIGURATON FOR PROTOCOLS DOWN THE LINE AAAAAAAAAAAAAAA
wrapper.user().getProtocolInfo().setState(State.PLAY); wrapper.user().getProtocolInfo().setState(State.PLAY);
configurationState.sendQueuedPackets(wrapper.user()); configurationState.sendQueuedPackets(wrapper.user());
}); });

Datei anzeigen

@ -75,10 +75,7 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter<Clientbound
wrapper.write(Type.BYTE, gamemode); wrapper.write(Type.BYTE, gamemode);
wrapper.write(Type.BYTE, previousGamemode); wrapper.write(Type.BYTE, previousGamemode);
wrapper.passthrough(Type.BOOLEAN); // Debug // Debug, flat, last death pos, and portal cooldown at the end unchanged
wrapper.passthrough(Type.BOOLEAN); // Flat
wrapper.passthrough(Type.OPTIONAL_GLOBAL_POSITION); // Last death position
wrapper.passthrough(Type.VAR_INT); // Portal cooldown
// Send configuration packets first before going into the play protocol state // Send configuration packets first before going into the play protocol state
final PacketWrapper registryDataPacket = wrapper.create(ClientboundConfigurationPackets1_20_2.REGISTRY_DATA); final PacketWrapper registryDataPacket = wrapper.create(ClientboundConfigurationPackets1_20_2.REGISTRY_DATA);
@ -111,7 +108,7 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter<Clientbound
wrapper.passthrough(Type.STRING); // Dimension type wrapper.passthrough(Type.STRING); // Dimension type
wrapper.passthrough(Type.STRING); // World wrapper.passthrough(Type.STRING); // World
wrapper.passthrough(Type.LONG); // Seed wrapper.passthrough(Type.LONG); // Seed
wrapper.passthrough(Type.BYTE); // Gamemode wrapper.write(Type.BYTE, wrapper.read(Type.UNSIGNED_BYTE).byteValue()); // Gamemode
wrapper.passthrough(Type.BYTE); // Previous gamemode wrapper.passthrough(Type.BYTE); // Previous gamemode
wrapper.passthrough(Type.BOOLEAN); // Debug wrapper.passthrough(Type.BOOLEAN); // Debug
wrapper.passthrough(Type.BOOLEAN); // Flat wrapper.passthrough(Type.BOOLEAN); // Flat