Update to 1.19.4

This commit is contained in:
BoomEaro 2023-03-15 15:44:55 +02:00
parent 77a68efdc8
commit bbafbcc959
6 changed files with 2805 additions and 18 deletions

View File

@ -207,7 +207,12 @@ public class PacketJoinGame implements PacketOut {
msg.writeByte(previousGameMode);
msg.writeStringsArray(worldNames);
if (version.moreOrEqual(Version.V1_19_1)) {
msg.writeCompoundTag(dimensionRegistry.getCodec_1_19_1());
if (version.moreOrEqual(Version.V1_19_4)) {
msg.writeCompoundTag(dimensionRegistry.getCodec_1_19_4());
}
else {
msg.writeCompoundTag(dimensionRegistry.getCodec_1_19_1());
}
}
else {
msg.writeCompoundTag(dimensionRegistry.getCodec_1_19());

View File

@ -59,7 +59,7 @@ public class PacketPlayerPositionAndLook implements PacketOut {
msg.writeVarInt(teleportId);
}
if (version.moreOrEqual(Version.V1_17)) {
if (version.fromTo(Version.V1_17, Version.V1_19_3)) {
msg.writeBoolean(false); // Dismount vehicle
}
}

View File

@ -87,7 +87,8 @@ public enum State {
map(0x0F, V1_17, V1_18_2),
map(0x11, V1_19, V1_19),
map(0x12, V1_19_1, V1_19_1),
map(0x11, V1_19_3, V1_19_3)
map(0x11, V1_19_3, V1_19_3),
map(0x12, V1_19_4, V1_19_4)
);
clientBound.register(PacketDeclareCommands::new,
@ -97,7 +98,8 @@ public enum State {
map(0x10, V1_16_2, V1_16_4),
map(0x12, V1_17, V1_18_2),
map(0x0F, V1_19, V1_19_1),
map(0x0E, V1_19_3, V1_19_3)
map(0x0E, V1_19_3, V1_19_3),
map(0x10, V1_19_4, V1_19_4)
);
clientBound.register(PacketJoinGame::new,
map(0x01, V1_7_2, V1_8),
@ -109,7 +111,8 @@ public enum State {
map(0x26, V1_17, V1_18_2),
map(0x23, V1_19, V1_19),
map(0x25, V1_19_1, V1_19_1),
map(0x24, V1_19_3, V1_19_3)
map(0x24, V1_19_3, V1_19_3),
map(0x28, V1_19_4, V1_19_4)
);
clientBound.register(PacketPluginMessage::new,
map(0x19, V1_13, V1_13_2),
@ -120,7 +123,8 @@ public enum State {
map(0x18, V1_17, V1_18_2),
map(0x15, V1_19, V1_19),
map(0x16, V1_19_1, V1_19_1),
map(0x15, V1_19_3, V1_19_3)
map(0x15, V1_19_3, V1_19_3),
map(0x17, V1_19_4, V1_19_4)
);
clientBound.register(PacketPlayerAbilities::new,
map(0x39, V1_7_2, V1_8),
@ -134,7 +138,8 @@ public enum State {
map(0x32, V1_17, V1_18_2),
map(0x2F, V1_19, V1_19),
map(0x31, V1_19_1, V1_19_1),
map(0x30, V1_19_3, V1_19_3)
map(0x30, V1_19_3, V1_19_3),
map(0x34, V1_19_4, V1_19_4)
);
clientBound.register(PacketPlayerPositionAndLook::new,
map(0x08, V1_7_2, V1_8),
@ -148,7 +153,8 @@ public enum State {
map(0x38, V1_17, V1_18_2),
map(0x36, V1_19, V1_19),
map(0x39, V1_19_1, V1_19_1),
map(0x38, V1_19_3, V1_19_3)
map(0x38, V1_19_3, V1_19_3),
map(0x3C, V1_19_4, V1_19_4)
);
clientBound.register(PacketKeepAlive::new,
map(0x00, V1_7_2, V1_8),
@ -161,7 +167,8 @@ public enum State {
map(0x21, V1_17, V1_18_2),
map(0x1E, V1_19, V1_19),
map(0x20, V1_19_1, V1_19_1),
map(0x1F, V1_19_3, V1_19_3)
map(0x1F, V1_19_3, V1_19_3),
map(0x23, V1_19_4, V1_19_4)
);
clientBound.register(PacketChatMessage::new,
map(0x02, V1_7_2, V1_8),
@ -172,14 +179,16 @@ public enum State {
map(0x0F, V1_17, V1_18_2),
map(0x5F, V1_19, V1_19),
map(0x62, V1_19_1, V1_19_1),
map(0x60, V1_19_3, V1_19_3)
map(0x60, V1_19_3, V1_19_3),
map(0x64, V1_19_4, V1_19_4)
);
clientBound.register(PacketBossBar::new,
map(0x0C, V1_9, V1_14_4),
map(0x0D, V1_15, V1_15_2),
map(0x0C, V1_16, V1_16_4),
map(0x0D, V1_17, V1_18_2),
map(0x0A, V1_19, V1_19_3)
map(0x0A, V1_19, V1_19_3),
map(0xB, V1_19_4, V1_19_4)
);
clientBound.register(PacketPlayerInfo::new,
map(0x38, V1_7_2, V1_8),
@ -193,7 +202,8 @@ public enum State {
map(0x36, V1_17, V1_18_2),
map(0x34, V1_19, V1_19),
map(0x37, V1_19_1, V1_19_1),
map(0x36, V1_19_3, V1_19_3)
map(0x36, V1_19_3, V1_19_3),
map(0x3A, V1_19_4, V1_19_4)
);
clientBound.register(PacketTitleLegacy::new,
map(0x45, V1_8, V1_11_1),
@ -208,19 +218,22 @@ public enum State {
map(0x59, V1_17, V1_17_1),
map(0x5A, V1_18, V1_19),
map(0x5D, V1_19_1, V1_19_1),
map(0x5B, V1_19_3, V1_19_3)
map(0x5B, V1_19_3, V1_19_3),
map(0x5F, V1_19_4, V1_19_4)
);
clientBound.register(PacketTitleSetSubTitle::new,
map(0x57, V1_17, V1_17_1),
map(0x58, V1_18, V1_19),
map(0x5B, V1_19_1, V1_19_1),
map(0x59, V1_19_3, V1_19_3)
map(0x59, V1_19_3, V1_19_3),
map(0x5D, V1_19_4, V1_19_4)
);
clientBound.register(PacketTitleTimes::new,
map(0x5A, V1_17, V1_17_1),
map(0x5B, V1_18, V1_19),
map(0x5E, V1_19_1, V1_19_1),
map(0x5C, V1_19_3, V1_19_3)
map(0x5C, V1_19_3, V1_19_3),
map(0x60, V1_19_4, V1_19_4)
);
clientBound.register(PacketPlayerListHeader::new,
map(0x47, V1_8, V1_8),
@ -236,10 +249,12 @@ public enum State {
map(0x5F, V1_18, V1_18_2),
map(0x60, V1_19, V1_19),
map(0x63, V1_19_1, V1_19_1),
map(0x61, V1_19_3, V1_19_3)
map(0x61, V1_19_3, V1_19_3),
map(0x65, V1_19_4, V1_19_4)
);
clientBound.register(PacketSpawnPosition::new,
map(0x4C, V1_19_3, V1_19_3)
map(0x4C, V1_19_3, V1_19_3),
map(0x50, V1_19_4, V1_19_4)
);
}
};

View File

@ -65,7 +65,8 @@ public enum Version {
V1_18_2(758),
V1_19(759),
V1_19_1(760),
V1_19_3(761);
V1_19_3(761),
V1_19_4(762);
private static final Map<Integer, Version> VERSION_MAP;
private static final Version MAX;

View File

@ -38,6 +38,7 @@ public final class DimensionRegistry {
private CompoundBinaryTag codec_1_18_2;
private CompoundBinaryTag codec_1_19;
private CompoundBinaryTag codec_1_19_1;
private CompoundBinaryTag codec_1_19_4;
private CompoundBinaryTag oldCodec;
public DimensionRegistry(LimboServer server) {
@ -60,6 +61,10 @@ public final class DimensionRegistry {
return codec_1_19_1;
}
public CompoundBinaryTag getCodec_1_19_4() {
return codec_1_19_4;
}
public CompoundBinaryTag getOldCodec() {
return oldCodec;
}
@ -77,6 +82,7 @@ public final class DimensionRegistry {
codec_1_18_2 = readCodecFile("/dimension/codec_1_18_2.snbt");
codec_1_19 = readCodecFile("/dimension/codec_1_19.snbt");
codec_1_19_1 = readCodecFile("/dimension/codec_1_19_1.snbt");
codec_1_19_4 = readCodecFile("/dimension/codec_1_19_4.snbt");
// On 1.16-1.16.1 different codec format
oldCodec = readCodecFile("/dimension/codec_old.snbt");

File diff suppressed because it is too large Load Diff