Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 09:00:09 +01:00
1.17-pre4
Dieser Commit ist enthalten in:
Ursprung
6839334c1a
Commit
a8b3444ff5
@ -76,7 +76,7 @@ public class ProtocolVersion {
|
|||||||
public static final ProtocolVersion v1_16_2 = register(751, "1.16.2");
|
public static final ProtocolVersion v1_16_2 = register(751, "1.16.2");
|
||||||
public static final ProtocolVersion v1_16_3 = register(753, "1.16.3");
|
public static final ProtocolVersion v1_16_3 = register(753, "1.16.3");
|
||||||
public static final ProtocolVersion v1_16_4 = register(754, "1.16.4/5", new VersionRange("1.16", 4, 5));
|
public static final ProtocolVersion v1_16_4 = register(754, "1.16.4/5", new VersionRange("1.16", 4, 5));
|
||||||
public static final ProtocolVersion v1_17 = register(755, 31, "1.17");
|
public static final ProtocolVersion v1_17 = register(755, 32, "1.17");
|
||||||
public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
|
public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
|
||||||
|
|
||||||
public static ProtocolVersion register(int version, String name) {
|
public static ProtocolVersion register(int version, String name) {
|
||||||
@ -152,7 +152,7 @@ public class ProtocolVersion {
|
|||||||
* @return immutable list of registered protocol versions
|
* @return immutable list of registered protocol versions
|
||||||
*/
|
*/
|
||||||
public static List<ProtocolVersion> getProtocols() {
|
public static List<ProtocolVersion> getProtocols() {
|
||||||
return Collections.unmodifiableList(new ArrayList<>(VERSIONS.values()));
|
return Collections.unmodifiableList(VERSION_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,7 +54,6 @@ public class InventoryPackets {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// This will cause desync issues to clients with a high latency
|
|
||||||
protocol.registerServerbound(ServerboundPackets1_17.CLICK_WINDOW, new PacketRemapper() {
|
protocol.registerServerbound(ServerboundPackets1_17.CLICK_WINDOW, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
@ -93,13 +92,11 @@ public class InventoryPackets {
|
|||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
handler(wrapper -> {
|
handler(wrapper -> {
|
||||||
// Confirmation packets were removed - just instantly respond with a confirmation back
|
|
||||||
short inventoryId = wrapper.read(Type.UNSIGNED_BYTE);
|
short inventoryId = wrapper.read(Type.UNSIGNED_BYTE);
|
||||||
short confirmationId = wrapper.read(Type.SHORT);
|
short confirmationId = wrapper.read(Type.SHORT);
|
||||||
boolean accepted = wrapper.read(Type.BOOLEAN);
|
boolean accepted = wrapper.read(Type.BOOLEAN);
|
||||||
if (!accepted) {
|
if (!accepted) {
|
||||||
// Use the new ping packet to replace the removed acknowledgement, extra bit for fast dismissal
|
// 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 & 0xFFF);
|
int id = (1 << 30) | (inventoryId << 16) | (confirmationId & 0xFFF);
|
||||||
wrapper.user().get(InventoryAcknowledgements.class).addId(id);
|
wrapper.user().get(InventoryAcknowledgements.class).addId(id);
|
||||||
|
|
||||||
@ -121,7 +118,7 @@ public class InventoryPackets {
|
|||||||
int id = wrapper.read(Type.INT);
|
int id = wrapper.read(Type.INT);
|
||||||
// Check extra bit for fast dismissal
|
// Check extra bit for fast dismissal
|
||||||
if ((id & (1 << 30)) != 0 && wrapper.user().get(InventoryAcknowledgements.class).removeId(id)) {
|
if ((id & (1 << 30)) != 0 && wrapper.user().get(InventoryAcknowledgements.class).removeId(id)) {
|
||||||
// Decode inventory acknowledgement
|
// Decode our requested inventory acknowledgement
|
||||||
int inventoryId = (id >> 16) & 0xFF;
|
int inventoryId = (id >> 16) & 0xFF;
|
||||||
int confirmationId = id & 0xFFFF;
|
int confirmationId = id & 0xFFFF;
|
||||||
PacketWrapper packet = wrapper.create(ServerboundPackets1_16_2.WINDOW_CONFIRMATION);
|
PacketWrapper packet = wrapper.create(ServerboundPackets1_16_2.WINDOW_CONFIRMATION);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Project properties - we put these here so they can be modified without causing a recompile of the build scripts
|
# Project properties - we put these here so they can be modified without causing a recompile of the build scripts
|
||||||
projectVersion=4.0.0-1.17-pre3-SNAPSHOT
|
projectVersion=4.0.0-1.17-pre4-SNAPSHOT
|
||||||
|
|
||||||
# Gradle properties
|
# Gradle properties
|
||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren