mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Support 1.20.40 connections
This commit is contained in:
parent
6b67e43f84
commit
647a73d9f6
8 changed files with 11373 additions and 8 deletions
|
@ -31,6 +31,7 @@ import org.cloudburstmc.protocol.bedrock.codec.BedrockCodec;
|
||||||
import org.cloudburstmc.protocol.bedrock.codec.v589.Bedrock_v589;
|
import org.cloudburstmc.protocol.bedrock.codec.v589.Bedrock_v589;
|
||||||
import org.cloudburstmc.protocol.bedrock.codec.v594.Bedrock_v594;
|
import org.cloudburstmc.protocol.bedrock.codec.v594.Bedrock_v594;
|
||||||
import org.cloudburstmc.protocol.bedrock.codec.v618.Bedrock_v618;
|
import org.cloudburstmc.protocol.bedrock.codec.v618.Bedrock_v618;
|
||||||
|
import org.cloudburstmc.protocol.bedrock.codec.v622.Bedrock_v622;
|
||||||
import org.cloudburstmc.protocol.bedrock.netty.codec.packet.BedrockPacketCodec;
|
import org.cloudburstmc.protocol.bedrock.netty.codec.packet.BedrockPacketCodec;
|
||||||
import org.geysermc.geyser.session.GeyserSession;
|
import org.geysermc.geyser.session.GeyserSession;
|
||||||
|
|
||||||
|
@ -46,9 +47,7 @@ public final class GameProtocol {
|
||||||
* Default Bedrock codec that should act as a fallback. Should represent the latest available
|
* Default Bedrock codec that should act as a fallback. Should represent the latest available
|
||||||
* release of the game that Geyser supports.
|
* release of the game that Geyser supports.
|
||||||
*/
|
*/
|
||||||
public static final BedrockCodec DEFAULT_BEDROCK_CODEC = Bedrock_v618.CODEC.toBuilder()
|
public static final BedrockCodec DEFAULT_BEDROCK_CODEC = Bedrock_v622.CODEC;
|
||||||
.minecraftVersion("1.20.31")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of all supported Bedrock versions that can join Geyser
|
* A list of all supported Bedrock versions that can join Geyser
|
||||||
|
@ -68,9 +67,10 @@ public final class GameProtocol {
|
||||||
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v594.CODEC.toBuilder()
|
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v594.CODEC.toBuilder()
|
||||||
.minecraftVersion("1.20.10/1.20.15")
|
.minecraftVersion("1.20.10/1.20.15")
|
||||||
.build());
|
.build());
|
||||||
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC.toBuilder()
|
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v618.CODEC.toBuilder()
|
||||||
.minecraftVersion("1.20.30/1.20.31")
|
.minecraftVersion("1.20.30/1.20.32")
|
||||||
.build());
|
.build());
|
||||||
|
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -110,6 +110,8 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
|
||||||
} else if (protocolVersion < GameProtocol.DEFAULT_BEDROCK_CODEC.getProtocolVersion()) {
|
} else if (protocolVersion < GameProtocol.DEFAULT_BEDROCK_CODEC.getProtocolVersion()) {
|
||||||
session.disconnect(GeyserLocale.getLocaleStringLog("geyser.network.outdated.client", supportedVersions));
|
session.disconnect(GeyserLocale.getLocaleStringLog("geyser.network.outdated.client", supportedVersions));
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
throw new IllegalStateException("Default codec of protocol version " + protocolVersion + " should have been found");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,11 +36,13 @@ import it.unimi.dsi.fastutil.objects.*;
|
||||||
import org.cloudburstmc.blockstateupdater.BlockStateUpdater;
|
import org.cloudburstmc.blockstateupdater.BlockStateUpdater;
|
||||||
import org.cloudburstmc.blockstateupdater.BlockStateUpdater_1_20_10;
|
import org.cloudburstmc.blockstateupdater.BlockStateUpdater_1_20_10;
|
||||||
import org.cloudburstmc.blockstateupdater.BlockStateUpdater_1_20_30;
|
import org.cloudburstmc.blockstateupdater.BlockStateUpdater_1_20_30;
|
||||||
|
import org.cloudburstmc.blockstateupdater.BlockStateUpdater_1_20_40;
|
||||||
import org.cloudburstmc.blockstateupdater.util.tagupdater.CompoundTagUpdaterContext;
|
import org.cloudburstmc.blockstateupdater.util.tagupdater.CompoundTagUpdaterContext;
|
||||||
import org.cloudburstmc.nbt.*;
|
import org.cloudburstmc.nbt.*;
|
||||||
import org.cloudburstmc.protocol.bedrock.codec.v589.Bedrock_v589;
|
import org.cloudburstmc.protocol.bedrock.codec.v589.Bedrock_v589;
|
||||||
import org.cloudburstmc.protocol.bedrock.codec.v594.Bedrock_v594;
|
import org.cloudburstmc.protocol.bedrock.codec.v594.Bedrock_v594;
|
||||||
import org.cloudburstmc.protocol.bedrock.codec.v618.Bedrock_v618;
|
import org.cloudburstmc.protocol.bedrock.codec.v618.Bedrock_v618;
|
||||||
|
import org.cloudburstmc.protocol.bedrock.codec.v622.Bedrock_v622;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.BlockPropertyData;
|
import org.cloudburstmc.protocol.bedrock.data.BlockPropertyData;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition;
|
import org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition;
|
||||||
import org.geysermc.geyser.GeyserImpl;
|
import org.geysermc.geyser.GeyserImpl;
|
||||||
|
@ -117,11 +119,13 @@ public final class BlockRegistryPopulator {
|
||||||
private static void registerBedrockBlocks() {
|
private static void registerBedrockBlocks() {
|
||||||
Remapper mapper594 = Remapper.of(BlockStateUpdater_1_20_10.INSTANCE);
|
Remapper mapper594 = Remapper.of(BlockStateUpdater_1_20_10.INSTANCE);
|
||||||
Remapper mapper618 = Remapper.of(BlockStateUpdater_1_20_10.INSTANCE, BlockStateUpdater_1_20_30.INSTANCE);
|
Remapper mapper618 = Remapper.of(BlockStateUpdater_1_20_10.INSTANCE, BlockStateUpdater_1_20_30.INSTANCE);
|
||||||
|
Remapper mapper622 = Remapper.of(BlockStateUpdater_1_20_10.INSTANCE, BlockStateUpdater_1_20_30.INSTANCE, BlockStateUpdater_1_20_40.INSTANCE);
|
||||||
|
|
||||||
var blockMappers = ImmutableMap.<ObjectIntPair<String>, Remapper>builder()
|
var blockMappers = ImmutableMap.<ObjectIntPair<String>, Remapper>builder()
|
||||||
.put(ObjectIntPair.of("1_20_0", Bedrock_v589.CODEC.getProtocolVersion()), tag -> tag)
|
.put(ObjectIntPair.of("1_20_0", Bedrock_v589.CODEC.getProtocolVersion()), tag -> tag)
|
||||||
.put(ObjectIntPair.of("1_20_10", Bedrock_v594.CODEC.getProtocolVersion()), mapper594)
|
.put(ObjectIntPair.of("1_20_10", Bedrock_v594.CODEC.getProtocolVersion()), mapper594)
|
||||||
.put(ObjectIntPair.of("1_20_30", Bedrock_v618.CODEC.getProtocolVersion()), mapper618)
|
.put(ObjectIntPair.of("1_20_30", Bedrock_v618.CODEC.getProtocolVersion()), mapper618)
|
||||||
|
.put(ObjectIntPair.of("1_20_40", Bedrock_v622.CODEC.getProtocolVersion()), mapper622)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// We can keep this strong as nothing should be garbage collected
|
// We can keep this strong as nothing should be garbage collected
|
||||||
|
|
|
@ -41,6 +41,7 @@ import org.cloudburstmc.nbt.NbtType;
|
||||||
import org.cloudburstmc.protocol.bedrock.codec.v589.Bedrock_v589;
|
import org.cloudburstmc.protocol.bedrock.codec.v589.Bedrock_v589;
|
||||||
import org.cloudburstmc.protocol.bedrock.codec.v594.Bedrock_v594;
|
import org.cloudburstmc.protocol.bedrock.codec.v594.Bedrock_v594;
|
||||||
import org.cloudburstmc.protocol.bedrock.codec.v618.Bedrock_v618;
|
import org.cloudburstmc.protocol.bedrock.codec.v618.Bedrock_v618;
|
||||||
|
import org.cloudburstmc.protocol.bedrock.codec.v622.Bedrock_v622;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.SoundEvent;
|
import org.cloudburstmc.protocol.bedrock.data.SoundEvent;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition;
|
import org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.definitions.ItemDefinition;
|
import org.cloudburstmc.protocol.bedrock.data.definitions.ItemDefinition;
|
||||||
|
@ -116,6 +117,7 @@ public class ItemRegistryPopulator {
|
||||||
paletteVersions.add(new PaletteVersion("1_20_0", Bedrock_v589.CODEC.getProtocolVersion()));
|
paletteVersions.add(new PaletteVersion("1_20_0", Bedrock_v589.CODEC.getProtocolVersion()));
|
||||||
paletteVersions.add(new PaletteVersion("1_20_10", Bedrock_v594.CODEC.getProtocolVersion(), Collections.emptyMap(), remapper594));
|
paletteVersions.add(new PaletteVersion("1_20_10", Bedrock_v594.CODEC.getProtocolVersion(), Collections.emptyMap(), remapper594));
|
||||||
paletteVersions.add(new PaletteVersion("1_20_30", Bedrock_v618.CODEC.getProtocolVersion(), Collections.emptyMap(), remapper618));
|
paletteVersions.add(new PaletteVersion("1_20_30", Bedrock_v618.CODEC.getProtocolVersion(), Collections.emptyMap(), remapper618));
|
||||||
|
paletteVersions.add(new PaletteVersion("1_20_40", Bedrock_v622.CODEC.getProtocolVersion(), Collections.emptyMap(), remapper618)); // NO item changes between 1.20.30 and 1.20.40
|
||||||
|
|
||||||
GeyserBootstrap bootstrap = GeyserImpl.getInstance().getBootstrap();
|
GeyserBootstrap bootstrap = GeyserImpl.getInstance().getBootstrap();
|
||||||
|
|
||||||
|
|
BIN
core/src/main/resources/bedrock/block_palette.1_20_40.nbt
Normal file
BIN
core/src/main/resources/bedrock/block_palette.1_20_40.nbt
Normal file
Binary file not shown.
5787
core/src/main/resources/bedrock/creative_items.1_20_40.json
Normal file
5787
core/src/main/resources/bedrock/creative_items.1_20_40.json
Normal file
File diff suppressed because it is too large
Load diff
5570
core/src/main/resources/bedrock/runtime_item_states.1_20_40.json
Normal file
5570
core/src/main/resources/bedrock/runtime_item_states.1_20_40.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -9,10 +9,10 @@ netty = "4.1.80.Final"
|
||||||
guava = "29.0-jre"
|
guava = "29.0-jre"
|
||||||
gson = "2.3.1" # Provided by Spigot 1.8.8
|
gson = "2.3.1" # Provided by Spigot 1.8.8
|
||||||
websocket = "1.5.1"
|
websocket = "1.5.1"
|
||||||
protocol = "3.0.0.Beta1-20230908.171156-106"
|
protocol = "3.0.0.Beta1-20231016.115644-107"
|
||||||
protocol-connection = "3.0.0.Beta1-20230908.171156-105"
|
protocol-connection = "3.0.0.Beta1-20231016.115644-106"
|
||||||
raknet = "1.0.0.CR1-20230703.195238-9"
|
raknet = "1.0.0.CR1-20230703.195238-9"
|
||||||
blockstateupdater="1.20.30-20230918.203831-4"
|
blockstateupdater="1.20.40-20231016.111746-1"
|
||||||
mcauthlib = "d9d773e"
|
mcauthlib = "d9d773e"
|
||||||
mcprotocollib = "1.20.2-1-20231003.141424-6"
|
mcprotocollib = "1.20.2-1-20231003.141424-6"
|
||||||
adventure = "4.14.0"
|
adventure = "4.14.0"
|
||||||
|
|
Loading…
Reference in a new issue