mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 18:15:39 +01:00
Fix confirmation id encoding, remove old send methods
This commit is contained in:
parent
d7e3aa7143
commit
6839334c1a
@ -205,15 +205,6 @@ public interface PacketWrapper {
|
||||
*/
|
||||
void scheduleSend(Class<? extends Protocol> protocol, boolean skipCurrentPipeline) throws Exception;
|
||||
|
||||
@Deprecated
|
||||
default void send(Class<? extends Protocol> protocol, boolean skipCurrentPipeline, boolean currentThread) throws Exception {
|
||||
if (currentThread) {
|
||||
send(protocol, skipCurrentPipeline);
|
||||
} else {
|
||||
scheduleSend(protocol, skipCurrentPipeline);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send this packet to the associated user.
|
||||
* Be careful not to send packets twice.
|
||||
@ -366,15 +357,6 @@ public interface PacketWrapper {
|
||||
*/
|
||||
void scheduleSendToServer(Class<? extends Protocol> protocol, boolean skipCurrentPipeline) throws Exception;
|
||||
|
||||
@Deprecated
|
||||
default void sendToServer(Class<? extends Protocol> protocol, boolean skipCurrentPipeline, boolean currentThread) throws Exception {
|
||||
if (currentThread) {
|
||||
sendToServer(protocol, skipCurrentPipeline);
|
||||
} else {
|
||||
scheduleSendToServer(protocol, skipCurrentPipeline);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the packet id.
|
||||
*
|
||||
|
@ -100,7 +100,7 @@ public class InventoryPackets {
|
||||
if (!accepted) {
|
||||
// Use the new ping packet to replace the removed acknowledgement, extra bit for fast dismissal
|
||||
// Hope the client actually answers it /shrug
|
||||
int id = (1 << 30) | (inventoryId << 16) | confirmationId;
|
||||
int id = (1 << 30) | (inventoryId << 16) | (confirmationId & 0xFFF);
|
||||
wrapper.user().get(InventoryAcknowledgements.class).addId(id);
|
||||
|
||||
PacketWrapper pingPacket = wrapper.create(ClientboundPackets1_17.PING);
|
||||
|
Loading…
Reference in New Issue
Block a user