mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-09 19:40:14 +02:00
Added 1.8 version mapping
This commit is contained in:
parent
1ee11ffc66
commit
a08ef52c63
@ -7,6 +7,9 @@ import ru.nanit.limbo.server.data.BossBar;
|
|||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Packet for 1.9+
|
||||||
|
*/
|
||||||
public class PacketBossBar implements PacketOut {
|
public class PacketBossBar implements PacketOut {
|
||||||
|
|
||||||
private UUID uuid;
|
private UUID uuid;
|
||||||
|
@ -6,6 +6,9 @@ import ru.nanit.limbo.protocol.registry.Version;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Packet for 1.13+
|
||||||
|
*/
|
||||||
public class PacketDeclareCommands implements PacketOut {
|
public class PacketDeclareCommands implements PacketOut {
|
||||||
|
|
||||||
private List<String> commands;
|
private List<String> commands;
|
||||||
|
@ -60,6 +60,7 @@ public enum State {
|
|||||||
PLAY(3) {
|
PLAY(3) {
|
||||||
{
|
{
|
||||||
serverBound.register(PacketKeepAlive::new,
|
serverBound.register(PacketKeepAlive::new,
|
||||||
|
map(0x00, V1_8, V1_8),
|
||||||
map(0x0B, V1_9, V1_11_1),
|
map(0x0B, V1_9, V1_11_1),
|
||||||
map(0x0C, V1_12, V1_12),
|
map(0x0C, V1_12, V1_12),
|
||||||
map(0x0B, V1_12_1, V1_12_2),
|
map(0x0B, V1_12_1, V1_12_2),
|
||||||
@ -68,6 +69,7 @@ public enum State {
|
|||||||
map(0x10, V1_16, V1_16_4),
|
map(0x10, V1_16, V1_16_4),
|
||||||
map(0x0F, V1_17, V1_17_1)
|
map(0x0F, V1_17, V1_17_1)
|
||||||
);
|
);
|
||||||
|
|
||||||
clientBound.register(PacketDeclareCommands::new,
|
clientBound.register(PacketDeclareCommands::new,
|
||||||
map(0x11, V1_13, V1_14_4),
|
map(0x11, V1_13, V1_14_4),
|
||||||
map(0x12, V1_15, V1_15_2),
|
map(0x12, V1_15, V1_15_2),
|
||||||
@ -76,6 +78,7 @@ public enum State {
|
|||||||
map(0x12, V1_17, V1_17_1)
|
map(0x12, V1_17, V1_17_1)
|
||||||
);
|
);
|
||||||
clientBound.register(PacketJoinGame::new,
|
clientBound.register(PacketJoinGame::new,
|
||||||
|
map(0x01, V1_8, V1_8),
|
||||||
map(0x23, V1_9, V1_12_2),
|
map(0x23, V1_9, V1_12_2),
|
||||||
map(0x25, V1_13, V1_13_2),
|
map(0x25, V1_13, V1_13_2),
|
||||||
map(0x25, V1_14, V1_14_4),
|
map(0x25, V1_14, V1_14_4),
|
||||||
@ -85,6 +88,7 @@ public enum State {
|
|||||||
map(0x26, V1_17, V1_17_1)
|
map(0x26, V1_17, V1_17_1)
|
||||||
);
|
);
|
||||||
clientBound.register(PacketPlayerAbilities::new,
|
clientBound.register(PacketPlayerAbilities::new,
|
||||||
|
map(0x39, V1_8, V1_8),
|
||||||
map(0x2B, V1_9, V1_12),
|
map(0x2B, V1_9, V1_12),
|
||||||
map(0x2C, V1_12_1, V1_12_2),
|
map(0x2C, V1_12_1, V1_12_2),
|
||||||
map(0x2E, V1_13, V1_13_2),
|
map(0x2E, V1_13, V1_13_2),
|
||||||
@ -95,6 +99,7 @@ public enum State {
|
|||||||
map(0x32, V1_17, V1_17_1)
|
map(0x32, V1_17, V1_17_1)
|
||||||
);
|
);
|
||||||
clientBound.register(PacketPlayerPositionAndLook::new,
|
clientBound.register(PacketPlayerPositionAndLook::new,
|
||||||
|
map(0x08, V1_8, V1_8),
|
||||||
map(0x2E, V1_9, V1_12),
|
map(0x2E, V1_9, V1_12),
|
||||||
map(0x2F, V1_12_1, V1_12_2),
|
map(0x2F, V1_12_1, V1_12_2),
|
||||||
map(0x32, V1_13, V1_13_2),
|
map(0x32, V1_13, V1_13_2),
|
||||||
@ -105,6 +110,7 @@ public enum State {
|
|||||||
map(0x38, V1_17, V1_17_1)
|
map(0x38, V1_17, V1_17_1)
|
||||||
);
|
);
|
||||||
clientBound.register(PacketKeepAlive::new,
|
clientBound.register(PacketKeepAlive::new,
|
||||||
|
map(0x00, V1_8, V1_8),
|
||||||
map(0x1F, V1_9, V1_12_2),
|
map(0x1F, V1_9, V1_12_2),
|
||||||
map(0x21, V1_13, V1_13_2),
|
map(0x21, V1_13, V1_13_2),
|
||||||
map(0x20, V1_14, V1_14_4),
|
map(0x20, V1_14, V1_14_4),
|
||||||
@ -114,6 +120,7 @@ public enum State {
|
|||||||
map(0x21, V1_17, V1_17_1)
|
map(0x21, V1_17, V1_17_1)
|
||||||
);
|
);
|
||||||
clientBound.register(PacketChatMessage::new,
|
clientBound.register(PacketChatMessage::new,
|
||||||
|
map(0x02, V1_8, V1_8),
|
||||||
map(0x0F, V1_9, V1_12_2),
|
map(0x0F, V1_9, V1_12_2),
|
||||||
map(0x0E, V1_13, V1_14_4),
|
map(0x0E, V1_13, V1_14_4),
|
||||||
map(0x0F, V1_15, V1_15_2),
|
map(0x0F, V1_15, V1_15_2),
|
||||||
@ -127,6 +134,7 @@ public enum State {
|
|||||||
map(0x0D, V1_17, V1_17_1)
|
map(0x0D, V1_17, V1_17_1)
|
||||||
);
|
);
|
||||||
clientBound.register(PacketPlayerInfo::new,
|
clientBound.register(PacketPlayerInfo::new,
|
||||||
|
map(0x38, V1_8, V1_8),
|
||||||
map(0x2D, V1_9, V1_12),
|
map(0x2D, V1_9, V1_12),
|
||||||
map(0x2E, V1_12_1, V1_12_2),
|
map(0x2E, V1_12_1, V1_12_2),
|
||||||
map(0x30, V1_13, V1_13_2),
|
map(0x30, V1_13, V1_13_2),
|
||||||
|
@ -6,6 +6,8 @@ import java.util.Map;
|
|||||||
public enum Version {
|
public enum Version {
|
||||||
|
|
||||||
UNDEFINED(-1),
|
UNDEFINED(-1),
|
||||||
|
V1_8(47),
|
||||||
|
// 1.8-1.8.8 has same protocol numbers
|
||||||
V1_9(107),
|
V1_9(107),
|
||||||
V1_9_1(108),
|
V1_9_1(108),
|
||||||
V1_9_2(109),
|
V1_9_2(109),
|
||||||
@ -81,7 +83,7 @@ public enum Version {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Version getMin() {
|
public static Version getMin() {
|
||||||
return V1_9;
|
return V1_8;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Version getMax() {
|
public static Version getMax() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user