mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Drop 1.17.30 support; add support for 1.18.10.28 beta
This commit is contained in:
parent
c295e47940
commit
08a78731df
8 changed files with 1047 additions and 960 deletions
|
@ -120,8 +120,8 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.CloudburstMC.Protocol</groupId>
|
||||
<artifactId>bedrock-v475</artifactId>
|
||||
<version>c22aa595</version>
|
||||
<artifactId>bedrock-v486</artifactId>
|
||||
<version>v1.18.10-c2c5a7069f-1</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
|
|
@ -28,9 +28,9 @@ package org.geysermc.geyser.network;
|
|||
import com.github.steveice10.mc.protocol.codec.MinecraftCodec;
|
||||
import com.github.steveice10.mc.protocol.codec.PacketCodec;
|
||||
import com.nukkitx.protocol.bedrock.BedrockPacketCodec;
|
||||
import com.nukkitx.protocol.bedrock.v465.Bedrock_v465;
|
||||
import com.nukkitx.protocol.bedrock.v471.Bedrock_v471;
|
||||
import com.nukkitx.protocol.bedrock.v475.Bedrock_v475;
|
||||
import com.nukkitx.protocol.bedrock.v486.Bedrock_v486;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -45,7 +45,7 @@ public final class MinecraftProtocol {
|
|||
* Default Bedrock codec that should act as a fallback. Should represent the latest available
|
||||
* release of the game that Geyser supports.
|
||||
*/
|
||||
public static final BedrockPacketCodec DEFAULT_BEDROCK_CODEC = Bedrock_v475.V475_CODEC;
|
||||
public static final BedrockPacketCodec DEFAULT_BEDROCK_CODEC = Bedrock_v486.V486_CODEC;
|
||||
/**
|
||||
* A list of all supported Bedrock versions that can join Geyser
|
||||
*/
|
||||
|
@ -58,9 +58,9 @@ public final class MinecraftProtocol {
|
|||
private static final PacketCodec DEFAULT_JAVA_CODEC = MinecraftCodec.CODEC;
|
||||
|
||||
static {
|
||||
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v465.V465_CODEC);
|
||||
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v471.V471_CODEC);
|
||||
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC.toBuilder().minecraftVersion("1.18.0/1.18.1/1.18.2").build());
|
||||
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v475.V475_CODEC.toBuilder().minecraftVersion("1.18.0/1.18.1/1.18.2").build());
|
||||
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,8 +28,8 @@ package org.geysermc.geyser.registry.populator;
|
|||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.nukkitx.nbt.*;
|
||||
import com.nukkitx.protocol.bedrock.v465.Bedrock_v465;
|
||||
import com.nukkitx.protocol.bedrock.v471.Bedrock_v471;
|
||||
import com.nukkitx.protocol.bedrock.v486.Bedrock_v486;
|
||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.ints.IntSet;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
|
@ -46,7 +46,10 @@ import org.geysermc.geyser.util.BlockUtils;
|
|||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Deque;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
|
@ -59,8 +62,34 @@ public class BlockRegistryPopulator {
|
|||
|
||||
static {
|
||||
ImmutableMap.Builder<ObjectIntPair<String>, BiFunction<String, NbtMapBuilder, String>> stateMapperBuilder = ImmutableMap.<ObjectIntPair<String>, BiFunction<String, NbtMapBuilder, String>>builder()
|
||||
.put(ObjectIntPair.of("1_17_30", Bedrock_v465.V465_CODEC.getProtocolVersion()), EMPTY_MAPPER)
|
||||
.put(ObjectIntPair.of("1_17_40", Bedrock_v471.V471_CODEC.getProtocolVersion()), EMPTY_MAPPER);
|
||||
.put(ObjectIntPair.of("1_17_40", Bedrock_v471.V471_CODEC.getProtocolVersion()), EMPTY_MAPPER)
|
||||
.put(ObjectIntPair.of("1_18_10", Bedrock_v486.V486_CODEC.getProtocolVersion()), (bedrockIdentifier, statesBuilder) -> {
|
||||
statesBuilder.remove("no_drop_bit"); // Used in skulls
|
||||
if (bedrockIdentifier.equals("minecraft:glow_lichen")) {
|
||||
// Moved around north, south, west
|
||||
int bits = (int) statesBuilder.get("multi_face_direction_bits");
|
||||
boolean north = (bits & (1 << 2)) != 0;
|
||||
boolean south = (bits & (1 << 3)) != 0;
|
||||
boolean west = (bits & (1 << 4)) != 0;
|
||||
if (north) {
|
||||
bits |= 1 << 4;
|
||||
} else {
|
||||
bits &= ~(1 << 4);
|
||||
}
|
||||
if (south) {
|
||||
bits |= 1 << 2;
|
||||
} else {
|
||||
bits &= ~(1 << 2);
|
||||
}
|
||||
if (west) {
|
||||
bits |= 1 << 3;
|
||||
} else {
|
||||
bits &= ~(1 << 3);
|
||||
}
|
||||
statesBuilder.put("multi_face_direction_bits", bits);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
BLOCK_MAPPERS = stateMapperBuilder.build();
|
||||
}
|
||||
|
|
|
@ -35,9 +35,9 @@ import com.nukkitx.protocol.bedrock.data.SoundEvent;
|
|||
import com.nukkitx.protocol.bedrock.data.inventory.ComponentItemData;
|
||||
import com.nukkitx.protocol.bedrock.data.inventory.ItemData;
|
||||
import com.nukkitx.protocol.bedrock.packet.StartGamePacket;
|
||||
import com.nukkitx.protocol.bedrock.v465.Bedrock_v465;
|
||||
import com.nukkitx.protocol.bedrock.v471.Bedrock_v471;
|
||||
import com.nukkitx.protocol.bedrock.v475.Bedrock_v475;
|
||||
import com.nukkitx.protocol.bedrock.v486.Bedrock_v486;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||
|
@ -63,9 +63,9 @@ public class ItemRegistryPopulator {
|
|||
|
||||
static {
|
||||
PALETTE_VERSIONS = new Object2ObjectOpenHashMap<>();
|
||||
PALETTE_VERSIONS.put("1_17_30", new PaletteVersion(Bedrock_v465.V465_CODEC.getProtocolVersion(), Collections.emptyMap()));
|
||||
PALETTE_VERSIONS.put("1_17_40", new PaletteVersion(Bedrock_v471.V471_CODEC.getProtocolVersion(), Collections.emptyMap()));
|
||||
PALETTE_VERSIONS.put("1_18_0", new PaletteVersion(Bedrock_v475.V475_CODEC.getProtocolVersion(), Collections.emptyMap()));
|
||||
PALETTE_VERSIONS.put("1_18_10", new PaletteVersion(Bedrock_v486.V486_CODEC.getProtocolVersion(), Collections.emptyMap()));
|
||||
}
|
||||
|
||||
private record PaletteVersion(int protocolVersion, Map<String, String> additionalTranslatedItems) {
|
||||
|
|
Binary file not shown.
BIN
core/src/main/resources/bedrock/block_palette.1_18_10.nbt
Normal file
BIN
core/src/main/resources/bedrock/block_palette.1_18_10.nbt
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -51,6 +51,10 @@
|
|||
"name" : "minecraft:air",
|
||||
"id" : -158
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:allay_spawn_egg",
|
||||
"id" : 631
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:allow",
|
||||
"id" : 210
|
||||
|
@ -65,7 +69,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:amethyst_shard",
|
||||
"id" : 623
|
||||
"id" : 625
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:ancient_debris",
|
||||
|
@ -117,7 +121,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:balloon",
|
||||
"id" : 597
|
||||
"id" : 598
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:bamboo",
|
||||
|
@ -133,7 +137,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:banner_pattern",
|
||||
"id" : 627
|
||||
"id" : 635
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:barrel",
|
||||
|
@ -293,7 +297,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:bleach",
|
||||
"id" : 595
|
||||
"id" : 596
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:blue_candle",
|
||||
|
@ -317,7 +321,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:boat",
|
||||
"id" : 625
|
||||
"id" : 633
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:bone",
|
||||
|
@ -429,11 +433,11 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:camera",
|
||||
"id" : 592
|
||||
"id" : 593
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:campfire",
|
||||
"id" : 588
|
||||
"id" : 589
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:candle",
|
||||
|
@ -493,7 +497,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:chain",
|
||||
"id" : 617
|
||||
"id" : 619
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:chain_command_block",
|
||||
|
@ -575,6 +579,10 @@
|
|||
"name" : "minecraft:clay_ball",
|
||||
"id" : 384
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:client_request_placeholder_block",
|
||||
"id" : -465
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:clock",
|
||||
"id" : 393
|
||||
|
@ -669,7 +677,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:compound",
|
||||
"id" : 593
|
||||
"id" : 594
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:concrete",
|
||||
|
@ -793,7 +801,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:crimson_door",
|
||||
"id" : 614
|
||||
"id" : 616
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:crimson_double_slab",
|
||||
|
@ -833,7 +841,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:crimson_sign",
|
||||
"id" : 612
|
||||
"id" : 614
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:crimson_slab",
|
||||
|
@ -1169,7 +1177,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:dye",
|
||||
"id" : 626
|
||||
"id" : 634
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:egg",
|
||||
|
@ -1697,7 +1705,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:end_crystal",
|
||||
"id" : 629
|
||||
"id" : 637
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:end_gateway",
|
||||
|
@ -1803,6 +1811,10 @@
|
|||
"name" : "minecraft:fire_charge",
|
||||
"id" : 509
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:firefly_spawn_egg",
|
||||
"id" : 632
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:firework_rocket",
|
||||
"id" : 519
|
||||
|
@ -1855,6 +1867,14 @@
|
|||
"name" : "minecraft:frame",
|
||||
"id" : 513
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:frog_egg",
|
||||
"id" : -468
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:frog_spawn_egg",
|
||||
"id" : 628
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:frosted_ice",
|
||||
"id" : 207
|
||||
|
@ -1891,13 +1911,17 @@
|
|||
"name" : "minecraft:glistering_melon_slice",
|
||||
"id" : 434
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:globe_banner_pattern",
|
||||
"id" : 588
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:glow_berries",
|
||||
"id" : 630
|
||||
"id" : 638
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:glow_frame",
|
||||
"id" : 621
|
||||
"id" : 623
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:glow_ink_sac",
|
||||
|
@ -1913,7 +1937,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:glow_stick",
|
||||
"id" : 166
|
||||
"id" : 601
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:glowingobsidian",
|
||||
|
@ -1929,7 +1953,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:goat_horn",
|
||||
"id" : 622
|
||||
"id" : 624
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:goat_spawn_egg",
|
||||
|
@ -2109,11 +2133,11 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:honey_bottle",
|
||||
"id" : 591
|
||||
"id" : 592
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:honeycomb",
|
||||
"id" : 590
|
||||
"id" : 591
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:honeycomb_block",
|
||||
|
@ -2141,7 +2165,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:ice_bomb",
|
||||
"id" : 594
|
||||
"id" : 595
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:infested_deepslate",
|
||||
|
@ -2569,7 +2593,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:lodestone_compass",
|
||||
"id" : 600
|
||||
"id" : 602
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:log",
|
||||
|
@ -2613,7 +2637,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:medicine",
|
||||
"id" : 598
|
||||
"id" : 599
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:medium_amethyst_bud",
|
||||
|
@ -2723,9 +2747,13 @@
|
|||
"name" : "minecraft:music_disc_mellohi",
|
||||
"id" : 540
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:music_disc_otherside",
|
||||
"id" : 627
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:music_disc_pigstep",
|
||||
"id" : 618
|
||||
"id" : 620
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:music_disc_stal",
|
||||
|
@ -2751,6 +2779,14 @@
|
|||
"name" : "minecraft:mycelium",
|
||||
"id" : 110
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:mysterious_frame",
|
||||
"id" : -466
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:mysterious_frame_slot",
|
||||
"id" : -467
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:name_tag",
|
||||
"id" : 548
|
||||
|
@ -2777,7 +2813,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:nether_sprouts",
|
||||
"id" : 619
|
||||
"id" : 621
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:nether_star",
|
||||
|
@ -2797,7 +2833,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_axe",
|
||||
"id" : 605
|
||||
"id" : 607
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_block",
|
||||
|
@ -2805,43 +2841,43 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_boots",
|
||||
"id" : 610
|
||||
"id" : 612
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_chestplate",
|
||||
"id" : 608
|
||||
"id" : 610
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_helmet",
|
||||
"id" : 607
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_hoe",
|
||||
"id" : 606
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_ingot",
|
||||
"id" : 601
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_leggings",
|
||||
"id" : 609
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_pickaxe",
|
||||
"id" : 604
|
||||
"name" : "minecraft:netherite_hoe",
|
||||
"id" : 608
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_scrap",
|
||||
"id" : 611
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_shovel",
|
||||
"name" : "minecraft:netherite_ingot",
|
||||
"id" : 603
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_leggings",
|
||||
"id" : 611
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_pickaxe",
|
||||
"id" : 606
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_scrap",
|
||||
"id" : 613
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_shovel",
|
||||
"id" : 605
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherite_sword",
|
||||
"id" : 602
|
||||
"id" : 604
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:netherrack",
|
||||
|
@ -2887,6 +2923,10 @@
|
|||
"name" : "minecraft:ocelot_spawn_egg",
|
||||
"id" : 451
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:ochre_froglight",
|
||||
"id" : -471
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:orange_candle",
|
||||
"id" : -414
|
||||
|
@ -2943,6 +2983,10 @@
|
|||
"name" : "minecraft:parrot_spawn_egg",
|
||||
"id" : 478
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:pearlescent_froglight",
|
||||
"id" : -469
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:phantom_membrane",
|
||||
"id" : 574
|
||||
|
@ -3257,7 +3301,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:rapid_fertilizer",
|
||||
"id" : 596
|
||||
"id" : 597
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:ravager_spawn_egg",
|
||||
|
@ -3577,7 +3621,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:soul_campfire",
|
||||
"id" : 620
|
||||
"id" : 622
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:soul_fire",
|
||||
|
@ -3601,11 +3645,11 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:sparkler",
|
||||
"id" : 599
|
||||
"id" : 600
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:spawn_egg",
|
||||
"id" : 628
|
||||
"id" : 636
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:spider_eye",
|
||||
|
@ -3669,7 +3713,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:spyglass",
|
||||
"id" : 624
|
||||
"id" : 626
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:squid_spawn_egg",
|
||||
|
@ -3829,7 +3873,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:suspicious_stew",
|
||||
"id" : 589
|
||||
"id" : 590
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:sweet_berries",
|
||||
|
@ -3839,6 +3883,14 @@
|
|||
"name" : "minecraft:sweet_berry_bush",
|
||||
"id" : -207
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:tadpole_bucket",
|
||||
"id" : 630
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:tadpole_spawn_egg",
|
||||
"id" : 629
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:tallgrass",
|
||||
"id" : 31
|
||||
|
@ -3943,6 +3995,10 @@
|
|||
"name" : "minecraft:unpowered_repeater",
|
||||
"id" : 93
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:verdant_froglight",
|
||||
"id" : -470
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:vex_spawn_egg",
|
||||
"id" : 476
|
||||
|
@ -3977,7 +4033,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:warped_door",
|
||||
"id" : 615
|
||||
"id" : 617
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:warped_double_slab",
|
||||
|
@ -3997,7 +4053,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:warped_fungus_on_a_stick",
|
||||
"id" : 616
|
||||
"id" : 618
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:warped_hyphae",
|
||||
|
@ -4021,7 +4077,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "minecraft:warped_sign",
|
||||
"id" : 613
|
||||
"id" : 615
|
||||
},
|
||||
{
|
||||
"name" : "minecraft:warped_slab",
|
Loading…
Reference in a new issue