Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +01:00
Reset reader before passing packet through protocols (#4117)
Dieser Commit ist enthalten in:
Ursprung
f8eb57cdbb
Commit
33de12ceb1
@ -40,7 +40,6 @@ import com.viaversion.viaversion.protocol.version.BaseVersionProvider;
|
|||||||
import com.viaversion.viaversion.protocols.base.packet.BaseClientboundPacket;
|
import com.viaversion.viaversion.protocols.base.packet.BaseClientboundPacket;
|
||||||
import com.viaversion.viaversion.protocols.base.packet.BasePacketTypesProvider;
|
import com.viaversion.viaversion.protocols.base.packet.BasePacketTypesProvider;
|
||||||
import com.viaversion.viaversion.protocols.base.packet.BaseServerboundPacket;
|
import com.viaversion.viaversion.protocols.base.packet.BaseServerboundPacket;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -137,6 +136,7 @@ public class InitialBaseProtocol extends AbstractProtocol<BaseClientboundPacket,
|
|||||||
try {
|
try {
|
||||||
final List<Protocol> protocols = new ArrayList<>(pipeline.pipes());
|
final List<Protocol> protocols = new ArrayList<>(pipeline.pipes());
|
||||||
protocols.removeAll(alreadyAdded); // Skip all manually added protocols to prevent double handling
|
protocols.removeAll(alreadyAdded); // Skip all manually added protocols to prevent double handling
|
||||||
|
wrapper.resetReader();
|
||||||
wrapper.apply(Direction.SERVERBOUND, State.HANDSHAKE, protocols);
|
wrapper.apply(Direction.SERVERBOUND, State.HANDSHAKE, protocols);
|
||||||
} catch (CancelException e) {
|
} catch (CancelException e) {
|
||||||
wrapper.cancel();
|
wrapper.cancel();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren