Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 00:50:13 +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
|
@Override
|
||||||
public void cancelClientbound(State state, int oldPacketID, int newPacketID) {
|
public void cancelClientbound(State state, int oldPacketID, int newPacketID) {
|
||||||
registerClientbound(state, oldPacketID, newPacketID, new PacketRemapper() {
|
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
|
@Override
|
||||||
public void registerClientbound(State state, int oldPacketID, int newPacketID, PacketRemapper packetRemapper, boolean override) {
|
public void registerClientbound(State state, int oldPacketID, int newPacketID, PacketRemapper packetRemapper, boolean override) {
|
||||||
ProtocolPacket protocolPacket = new ProtocolPacket(state, oldPacketID, newPacketID, packetRemapper);
|
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);
|
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);
|
void cancelServerbound(State state, int oldPacketID, int newPacketID);
|
||||||
|
|
||||||
default void cancelServerbound(State state, int newPacketID) {
|
void cancelServerbound(State state, int newPacketID);
|
||||||
cancelServerbound(state, -1, newPacketID);
|
|
||||||
}
|
|
||||||
|
|
||||||
default void registerClientbound(State state, int oldPacketID, int newPacketID) {
|
default void registerClientbound(State state, int oldPacketID, int newPacketID) {
|
||||||
registerClientbound(state, oldPacketID, newPacketID, null);
|
registerClientbound(state, oldPacketID, newPacketID, null);
|
||||||
@ -81,11 +83,13 @@ public interface Protocol<C1 extends ClientboundPacketType, C2 extends Clientbou
|
|||||||
registerClientbound(state, oldPacketID, newPacketID, packetRemapper, false);
|
registerClientbound(state, oldPacketID, newPacketID, packetRemapper, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use {@link #cancelClientbound(State, int)}
|
||||||
|
*/
|
||||||
|
@Deprecated/*(forRemoval = true)*/
|
||||||
void cancelClientbound(State state, int oldPacketID, int newPacketID);
|
void cancelClientbound(State state, int oldPacketID, int newPacketID);
|
||||||
|
|
||||||
default void cancelClientbound(State state, int oldPacketID) {
|
void cancelClientbound(State state, int oldPacketID);
|
||||||
cancelClientbound(state, oldPacketID, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a clientbound packet, with id transformation and remapper.
|
* Registers a clientbound packet, with id transformation and remapper.
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren