3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Merge pull request #852 from creeper123123321/dev

Fix click window packet
Dieser Commit ist enthalten in:
Myles 2018-07-14 19:45:45 +01:00 committet von GitHub
Commit 8d7ef29d3e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
5 geänderte Dateien mit 14 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -117,6 +117,10 @@ public class BungeeServerHandler implements Listener {
}
}
info.setServerProtocolVersion(protocolId);
// Add version-specific base Protocol
pipeline.add(ProtocolRegistry.getBaseProtocol(protocolId));
user.put(info);
user.put(storage);

Datei anzeigen

@ -72,6 +72,7 @@ public abstract class Protocol {
/**
* Initialise a user for this protocol setting up objects.
* /!\ WARNING - May be called more than once in a single {@link UserConnection}
*
* @param userConnection The user to initialise
*/

Datei anzeigen

@ -16,7 +16,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Level;
public class ProtocolPipeline extends Protocol {
List<Protocol> protocolList;
private List<Protocol> protocolList;
private UserConnection userConnection;
public ProtocolPipeline(UserConnection userConnection) {
@ -48,7 +48,7 @@ public class ProtocolPipeline extends Protocol {
/**
* Add a protocol to the current pipeline
* This will call the Protocol#init method.
* This will call the {@link Protocol#init(UserConnection)} method.
*
* @param protocol The protocol to add to the end
*/
@ -174,6 +174,10 @@ public class ProtocolPipeline extends Protocol {
return protocolList;
}
/**
* Cleans the pipe and adds {@link us.myles.ViaVersion.protocols.base.BaseProtocol}
* /!\ WARNING - It doesn't add version-specific base Protocol
*/
public void cleanPipes() {
pipes().clear();
registerPackets();

Datei anzeigen

@ -496,10 +496,10 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
registerIncoming(State.PLAY, 0x05, 0x06);
registerIncoming(State.PLAY, 0x06, 0x07);
registerIncoming(State.PLAY, 0x07, 0x08);
// InventoryPackets 0x07, 0x08
registerIncoming(State.PLAY, 0x08, 0x09);
// InventoryPackets 0x09 -> 0x0A
// New 0x0A - Edit book -> Plugin Message
registerIncoming(State.PLAY, 0x09, 0x0B, new PacketRemapper() {
@Override

Datei anzeigen

@ -182,7 +182,7 @@ public class InventoryPackets {
*/
// Click window packet
protocol.registerIncoming(State.PLAY, 0x07, 0x07, new PacketRemapper() {
protocol.registerIncoming(State.PLAY, 0x07, 0x08, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.UNSIGNED_BYTE); // 0 - Window ID