Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-04 23:30:24 +01:00
Deprecate cancelClientbound/Serverbound with new id parameter
Dieser Commit ist enthalten in:
Ursprung
f4f7215a6a
Commit
68e4146f3b
@ -176,6 +176,11 @@ public abstract class AbstractProtocol<C1 extends ClientboundPacketType, C2 exte
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancelServerbound(State state, int newPacketID) {
|
||||
cancelServerbound(state, -1, newPacketID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancelClientbound(State state, int oldPacketID, int newPacketID) {
|
||||
registerClientbound(state, oldPacketID, newPacketID, new PacketRemapper() {
|
||||
@ -186,6 +191,11 @@ public abstract class AbstractProtocol<C1 extends ClientboundPacketType, C2 exte
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancelClientbound(State state, int oldPacketID) {
|
||||
cancelClientbound(state, oldPacketID, -1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerClientbound(State state, int oldPacketID, int newPacketID, PacketRemapper packetRemapper, boolean override) {
|
||||
ProtocolPacket protocolPacket = new ProtocolPacket(state, oldPacketID, newPacketID, packetRemapper);
|
||||
|
@ -67,11 +67,13 @@ public interface Protocol<C1 extends ClientboundPacketType, C2 extends Clientbou
|
||||
*/
|
||||
void registerServerbound(State state, int oldPacketID, int newPacketID, PacketRemapper packetRemapper, boolean override);
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #cancelServerbound(State, int)}
|
||||
*/
|
||||
@Deprecated/*(forRemoval = true)*/
|
||||
void cancelServerbound(State state, int oldPacketID, int newPacketID);
|
||||
|
||||
default void cancelServerbound(State state, int newPacketID) {
|
||||
cancelServerbound(state, -1, newPacketID);
|
||||
}
|
||||
void cancelServerbound(State state, int newPacketID);
|
||||
|
||||
default void registerClientbound(State state, int oldPacketID, int newPacketID) {
|
||||
registerClientbound(state, oldPacketID, newPacketID, null);
|
||||
@ -81,11 +83,13 @@ public interface Protocol<C1 extends ClientboundPacketType, C2 extends Clientbou
|
||||
registerClientbound(state, oldPacketID, newPacketID, packetRemapper, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #cancelClientbound(State, int)}
|
||||
*/
|
||||
@Deprecated/*(forRemoval = true)*/
|
||||
void cancelClientbound(State state, int oldPacketID, int newPacketID);
|
||||
|
||||
default void cancelClientbound(State state, int oldPacketID) {
|
||||
cancelClientbound(state, oldPacketID, -1);
|
||||
}
|
||||
void cancelClientbound(State state, int oldPacketID);
|
||||
|
||||
/**
|
||||
* Registers a clientbound packet, with id transformation and remapper.
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren