Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-25 07:40:13 +01:00
1.14.2 support
Dieser Commit ist enthalten in:
Ursprung
b5f099824d
Commit
85c6238d68
@ -28,7 +28,8 @@ public enum ProtocolVersion {
|
|||||||
MINECRAFT_1_13_1(401, "1.13.1"),
|
MINECRAFT_1_13_1(401, "1.13.1"),
|
||||||
MINECRAFT_1_13_2(404, "1.13.2"),
|
MINECRAFT_1_13_2(404, "1.13.2"),
|
||||||
MINECRAFT_1_14(477, "1.14"),
|
MINECRAFT_1_14(477, "1.14"),
|
||||||
MINECRAFT_1_14_1(480, "1.14.1");
|
MINECRAFT_1_14_1(480, "1.14.1"),
|
||||||
|
MINECRAFT_1_14_2(485, "1.14.2");
|
||||||
|
|
||||||
private final int protocol;
|
private final int protocol;
|
||||||
private final String name;
|
private final String name;
|
||||||
@ -40,7 +41,7 @@ public enum ProtocolVersion {
|
|||||||
/**
|
/**
|
||||||
* Represents the highest supported version.
|
* Represents the highest supported version.
|
||||||
*/
|
*/
|
||||||
public static final ProtocolVersion MAXIMUM_VERSION = MINECRAFT_1_14_1;
|
public static final ProtocolVersion MAXIMUM_VERSION = values()[values().length - 1];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The user-friendly representation of the lowest and highest supported versions.
|
* The user-friendly representation of the lowest and highest supported versions.
|
||||||
|
@ -11,6 +11,7 @@ import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_13_1;
|
|||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_13_2;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_13_2;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_14;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_14;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_14_1;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_14_1;
|
||||||
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_14_2;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_8;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_8;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9_1;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9_1;
|
||||||
@ -254,7 +255,7 @@ public enum StateRegistry {
|
|||||||
LINKED_PROTOCOL_VERSIONS.put(MINECRAFT_1_12, EnumSet.of(MINECRAFT_1_12_1));
|
LINKED_PROTOCOL_VERSIONS.put(MINECRAFT_1_12, EnumSet.of(MINECRAFT_1_12_1));
|
||||||
LINKED_PROTOCOL_VERSIONS.put(MINECRAFT_1_12_1, EnumSet.of(MINECRAFT_1_12_2));
|
LINKED_PROTOCOL_VERSIONS.put(MINECRAFT_1_12_1, EnumSet.of(MINECRAFT_1_12_2));
|
||||||
LINKED_PROTOCOL_VERSIONS.put(MINECRAFT_1_13, EnumSet.of(MINECRAFT_1_13_1, MINECRAFT_1_13_2));
|
LINKED_PROTOCOL_VERSIONS.put(MINECRAFT_1_13, EnumSet.of(MINECRAFT_1_13_1, MINECRAFT_1_13_2));
|
||||||
LINKED_PROTOCOL_VERSIONS.put(MINECRAFT_1_14, EnumSet.of(MINECRAFT_1_14_1));
|
LINKED_PROTOCOL_VERSIONS.put(MINECRAFT_1_14, EnumSet.of(MINECRAFT_1_14_1, MINECRAFT_1_14_2));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Direction direction;
|
private final Direction direction;
|
||||||
@ -332,6 +333,7 @@ public enum StateRegistry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to create a packet from the specified {@code id}.
|
* Attempts to create a packet from the specified {@code id}.
|
||||||
|
*
|
||||||
* @param id the packet ID
|
* @param id the packet ID
|
||||||
* @return the packet instance, or {@code null} if the ID is not registered
|
* @return the packet instance, or {@code null} if the ID is not registered
|
||||||
*/
|
*/
|
||||||
@ -345,6 +347,7 @@ public enum StateRegistry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to look up the packet ID for an {@code packet}.
|
* Attempts to look up the packet ID for an {@code packet}.
|
||||||
|
*
|
||||||
* @param packet the packet to look up
|
* @param packet the packet to look up
|
||||||
* @return the packet ID
|
* @return the packet ID
|
||||||
* @throws IllegalArgumentException if the packet ID is not found
|
* @throws IllegalArgumentException if the packet ID is not found
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren