3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-24 23:30:22 +01:00

Drop 1.17.30 support; add support for 1.18.10.28 beta

Dieser Commit ist enthalten in:
Camotoy 2022-02-06 17:15:12 -05:00
Ursprung c295e47940
Commit 08a78731df
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F
8 geänderte Dateien mit 1047 neuen und 960 gelöschten Zeilen

Datei anzeigen

@ -120,8 +120,8 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.CloudburstMC.Protocol</groupId> <groupId>com.github.CloudburstMC.Protocol</groupId>
<artifactId>bedrock-v475</artifactId> <artifactId>bedrock-v486</artifactId>
<version>c22aa595</version> <version>v1.18.10-c2c5a7069f-1</version>
<scope>compile</scope> <scope>compile</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>

Datei anzeigen

@ -28,9 +28,9 @@ package org.geysermc.geyser.network;
import com.github.steveice10.mc.protocol.codec.MinecraftCodec; import com.github.steveice10.mc.protocol.codec.MinecraftCodec;
import com.github.steveice10.mc.protocol.codec.PacketCodec; import com.github.steveice10.mc.protocol.codec.PacketCodec;
import com.nukkitx.protocol.bedrock.BedrockPacketCodec; 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.v471.Bedrock_v471;
import com.nukkitx.protocol.bedrock.v475.Bedrock_v475; import com.nukkitx.protocol.bedrock.v475.Bedrock_v475;
import com.nukkitx.protocol.bedrock.v486.Bedrock_v486;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; 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 * 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 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 * 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; private static final PacketCodec DEFAULT_JAVA_CODEC = MinecraftCodec.CODEC;
static { static {
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v465.V465_CODEC);
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v471.V471_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);
} }
/** /**

Datei anzeigen

@ -28,8 +28,8 @@ package org.geysermc.geyser.registry.populator;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.nukkitx.nbt.*; 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.v471.Bedrock_v471;
import com.nukkitx.protocol.bedrock.v486.Bedrock_v486;
import it.unimi.dsi.fastutil.ints.IntOpenHashSet; import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
import it.unimi.dsi.fastutil.ints.IntSet; import it.unimi.dsi.fastutil.ints.IntSet;
import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntMap;
@ -46,7 +46,10 @@ import org.geysermc.geyser.util.BlockUtils;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.InputStream; 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.function.BiFunction;
import java.util.zip.GZIPInputStream; import java.util.zip.GZIPInputStream;
@ -59,8 +62,34 @@ public class BlockRegistryPopulator {
static { static {
ImmutableMap.Builder<ObjectIntPair<String>, BiFunction<String, NbtMapBuilder, String>> stateMapperBuilder = ImmutableMap.<ObjectIntPair<String>, BiFunction<String, NbtMapBuilder, String>>builder() 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(); BLOCK_MAPPERS = stateMapperBuilder.build();
} }

Datei anzeigen

@ -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.ComponentItemData;
import com.nukkitx.protocol.bedrock.data.inventory.ItemData; import com.nukkitx.protocol.bedrock.data.inventory.ItemData;
import com.nukkitx.protocol.bedrock.packet.StartGamePacket; 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.v471.Bedrock_v471;
import com.nukkitx.protocol.bedrock.v475.Bedrock_v475; 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.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntArrayList;
@ -63,9 +63,9 @@ public class ItemRegistryPopulator {
static { static {
PALETTE_VERSIONS = new Object2ObjectOpenHashMap<>(); 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_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_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) { private record PaletteVersion(int protocolVersion, Map<String, String> additionalTranslatedItems) {

Binäre Datei nicht angezeigt.

Datei anzeigen

@ -51,6 +51,10 @@
"name" : "minecraft:air", "name" : "minecraft:air",
"id" : -158 "id" : -158
}, },
{
"name" : "minecraft:allay_spawn_egg",
"id" : 631
},
{ {
"name" : "minecraft:allow", "name" : "minecraft:allow",
"id" : 210 "id" : 210
@ -65,7 +69,7 @@
}, },
{ {
"name" : "minecraft:amethyst_shard", "name" : "minecraft:amethyst_shard",
"id" : 623 "id" : 625
}, },
{ {
"name" : "minecraft:ancient_debris", "name" : "minecraft:ancient_debris",
@ -117,7 +121,7 @@
}, },
{ {
"name" : "minecraft:balloon", "name" : "minecraft:balloon",
"id" : 597 "id" : 598
}, },
{ {
"name" : "minecraft:bamboo", "name" : "minecraft:bamboo",
@ -133,7 +137,7 @@
}, },
{ {
"name" : "minecraft:banner_pattern", "name" : "minecraft:banner_pattern",
"id" : 627 "id" : 635
}, },
{ {
"name" : "minecraft:barrel", "name" : "minecraft:barrel",
@ -293,7 +297,7 @@
}, },
{ {
"name" : "minecraft:bleach", "name" : "minecraft:bleach",
"id" : 595 "id" : 596
}, },
{ {
"name" : "minecraft:blue_candle", "name" : "minecraft:blue_candle",
@ -317,7 +321,7 @@
}, },
{ {
"name" : "minecraft:boat", "name" : "minecraft:boat",
"id" : 625 "id" : 633
}, },
{ {
"name" : "minecraft:bone", "name" : "minecraft:bone",
@ -429,11 +433,11 @@
}, },
{ {
"name" : "minecraft:camera", "name" : "minecraft:camera",
"id" : 592 "id" : 593
}, },
{ {
"name" : "minecraft:campfire", "name" : "minecraft:campfire",
"id" : 588 "id" : 589
}, },
{ {
"name" : "minecraft:candle", "name" : "minecraft:candle",
@ -493,7 +497,7 @@
}, },
{ {
"name" : "minecraft:chain", "name" : "minecraft:chain",
"id" : 617 "id" : 619
}, },
{ {
"name" : "minecraft:chain_command_block", "name" : "minecraft:chain_command_block",
@ -575,6 +579,10 @@
"name" : "minecraft:clay_ball", "name" : "minecraft:clay_ball",
"id" : 384 "id" : 384
}, },
{
"name" : "minecraft:client_request_placeholder_block",
"id" : -465
},
{ {
"name" : "minecraft:clock", "name" : "minecraft:clock",
"id" : 393 "id" : 393
@ -669,7 +677,7 @@
}, },
{ {
"name" : "minecraft:compound", "name" : "minecraft:compound",
"id" : 593 "id" : 594
}, },
{ {
"name" : "minecraft:concrete", "name" : "minecraft:concrete",
@ -793,7 +801,7 @@
}, },
{ {
"name" : "minecraft:crimson_door", "name" : "minecraft:crimson_door",
"id" : 614 "id" : 616
}, },
{ {
"name" : "minecraft:crimson_double_slab", "name" : "minecraft:crimson_double_slab",
@ -833,7 +841,7 @@
}, },
{ {
"name" : "minecraft:crimson_sign", "name" : "minecraft:crimson_sign",
"id" : 612 "id" : 614
}, },
{ {
"name" : "minecraft:crimson_slab", "name" : "minecraft:crimson_slab",
@ -1169,7 +1177,7 @@
}, },
{ {
"name" : "minecraft:dye", "name" : "minecraft:dye",
"id" : 626 "id" : 634
}, },
{ {
"name" : "minecraft:egg", "name" : "minecraft:egg",
@ -1697,7 +1705,7 @@
}, },
{ {
"name" : "minecraft:end_crystal", "name" : "minecraft:end_crystal",
"id" : 629 "id" : 637
}, },
{ {
"name" : "minecraft:end_gateway", "name" : "minecraft:end_gateway",
@ -1803,6 +1811,10 @@
"name" : "minecraft:fire_charge", "name" : "minecraft:fire_charge",
"id" : 509 "id" : 509
}, },
{
"name" : "minecraft:firefly_spawn_egg",
"id" : 632
},
{ {
"name" : "minecraft:firework_rocket", "name" : "minecraft:firework_rocket",
"id" : 519 "id" : 519
@ -1855,6 +1867,14 @@
"name" : "minecraft:frame", "name" : "minecraft:frame",
"id" : 513 "id" : 513
}, },
{
"name" : "minecraft:frog_egg",
"id" : -468
},
{
"name" : "minecraft:frog_spawn_egg",
"id" : 628
},
{ {
"name" : "minecraft:frosted_ice", "name" : "minecraft:frosted_ice",
"id" : 207 "id" : 207
@ -1891,13 +1911,17 @@
"name" : "minecraft:glistering_melon_slice", "name" : "minecraft:glistering_melon_slice",
"id" : 434 "id" : 434
}, },
{
"name" : "minecraft:globe_banner_pattern",
"id" : 588
},
{ {
"name" : "minecraft:glow_berries", "name" : "minecraft:glow_berries",
"id" : 630 "id" : 638
}, },
{ {
"name" : "minecraft:glow_frame", "name" : "minecraft:glow_frame",
"id" : 621 "id" : 623
}, },
{ {
"name" : "minecraft:glow_ink_sac", "name" : "minecraft:glow_ink_sac",
@ -1913,7 +1937,7 @@
}, },
{ {
"name" : "minecraft:glow_stick", "name" : "minecraft:glow_stick",
"id" : 166 "id" : 601
}, },
{ {
"name" : "minecraft:glowingobsidian", "name" : "minecraft:glowingobsidian",
@ -1929,7 +1953,7 @@
}, },
{ {
"name" : "minecraft:goat_horn", "name" : "minecraft:goat_horn",
"id" : 622 "id" : 624
}, },
{ {
"name" : "minecraft:goat_spawn_egg", "name" : "minecraft:goat_spawn_egg",
@ -2109,11 +2133,11 @@
}, },
{ {
"name" : "minecraft:honey_bottle", "name" : "minecraft:honey_bottle",
"id" : 591 "id" : 592
}, },
{ {
"name" : "minecraft:honeycomb", "name" : "minecraft:honeycomb",
"id" : 590 "id" : 591
}, },
{ {
"name" : "minecraft:honeycomb_block", "name" : "minecraft:honeycomb_block",
@ -2141,7 +2165,7 @@
}, },
{ {
"name" : "minecraft:ice_bomb", "name" : "minecraft:ice_bomb",
"id" : 594 "id" : 595
}, },
{ {
"name" : "minecraft:infested_deepslate", "name" : "minecraft:infested_deepslate",
@ -2569,7 +2593,7 @@
}, },
{ {
"name" : "minecraft:lodestone_compass", "name" : "minecraft:lodestone_compass",
"id" : 600 "id" : 602
}, },
{ {
"name" : "minecraft:log", "name" : "minecraft:log",
@ -2613,7 +2637,7 @@
}, },
{ {
"name" : "minecraft:medicine", "name" : "minecraft:medicine",
"id" : 598 "id" : 599
}, },
{ {
"name" : "minecraft:medium_amethyst_bud", "name" : "minecraft:medium_amethyst_bud",
@ -2723,9 +2747,13 @@
"name" : "minecraft:music_disc_mellohi", "name" : "minecraft:music_disc_mellohi",
"id" : 540 "id" : 540
}, },
{
"name" : "minecraft:music_disc_otherside",
"id" : 627
},
{ {
"name" : "minecraft:music_disc_pigstep", "name" : "minecraft:music_disc_pigstep",
"id" : 618 "id" : 620
}, },
{ {
"name" : "minecraft:music_disc_stal", "name" : "minecraft:music_disc_stal",
@ -2751,6 +2779,14 @@
"name" : "minecraft:mycelium", "name" : "minecraft:mycelium",
"id" : 110 "id" : 110
}, },
{
"name" : "minecraft:mysterious_frame",
"id" : -466
},
{
"name" : "minecraft:mysterious_frame_slot",
"id" : -467
},
{ {
"name" : "minecraft:name_tag", "name" : "minecraft:name_tag",
"id" : 548 "id" : 548
@ -2777,7 +2813,7 @@
}, },
{ {
"name" : "minecraft:nether_sprouts", "name" : "minecraft:nether_sprouts",
"id" : 619 "id" : 621
}, },
{ {
"name" : "minecraft:nether_star", "name" : "minecraft:nether_star",
@ -2797,7 +2833,7 @@
}, },
{ {
"name" : "minecraft:netherite_axe", "name" : "minecraft:netherite_axe",
"id" : 605 "id" : 607
}, },
{ {
"name" : "minecraft:netherite_block", "name" : "minecraft:netherite_block",
@ -2805,43 +2841,43 @@
}, },
{ {
"name" : "minecraft:netherite_boots", "name" : "minecraft:netherite_boots",
"id" : 610 "id" : 612
}, },
{ {
"name" : "minecraft:netherite_chestplate", "name" : "minecraft:netherite_chestplate",
"id" : 608 "id" : 610
}, },
{ {
"name" : "minecraft:netherite_helmet", "name" : "minecraft:netherite_helmet",
"id" : 607
},
{
"name" : "minecraft:netherite_hoe",
"id" : 606
},
{
"name" : "minecraft:netherite_ingot",
"id" : 601
},
{
"name" : "minecraft:netherite_leggings",
"id" : 609 "id" : 609
}, },
{ {
"name" : "minecraft:netherite_pickaxe", "name" : "minecraft:netherite_hoe",
"id" : 604 "id" : 608
}, },
{ {
"name" : "minecraft:netherite_scrap", "name" : "minecraft:netherite_ingot",
"id" : 611
},
{
"name" : "minecraft:netherite_shovel",
"id" : 603 "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", "name" : "minecraft:netherite_sword",
"id" : 602 "id" : 604
}, },
{ {
"name" : "minecraft:netherrack", "name" : "minecraft:netherrack",
@ -2887,6 +2923,10 @@
"name" : "minecraft:ocelot_spawn_egg", "name" : "minecraft:ocelot_spawn_egg",
"id" : 451 "id" : 451
}, },
{
"name" : "minecraft:ochre_froglight",
"id" : -471
},
{ {
"name" : "minecraft:orange_candle", "name" : "minecraft:orange_candle",
"id" : -414 "id" : -414
@ -2943,6 +2983,10 @@
"name" : "minecraft:parrot_spawn_egg", "name" : "minecraft:parrot_spawn_egg",
"id" : 478 "id" : 478
}, },
{
"name" : "minecraft:pearlescent_froglight",
"id" : -469
},
{ {
"name" : "minecraft:phantom_membrane", "name" : "minecraft:phantom_membrane",
"id" : 574 "id" : 574
@ -3257,7 +3301,7 @@
}, },
{ {
"name" : "minecraft:rapid_fertilizer", "name" : "minecraft:rapid_fertilizer",
"id" : 596 "id" : 597
}, },
{ {
"name" : "minecraft:ravager_spawn_egg", "name" : "minecraft:ravager_spawn_egg",
@ -3577,7 +3621,7 @@
}, },
{ {
"name" : "minecraft:soul_campfire", "name" : "minecraft:soul_campfire",
"id" : 620 "id" : 622
}, },
{ {
"name" : "minecraft:soul_fire", "name" : "minecraft:soul_fire",
@ -3601,11 +3645,11 @@
}, },
{ {
"name" : "minecraft:sparkler", "name" : "minecraft:sparkler",
"id" : 599 "id" : 600
}, },
{ {
"name" : "minecraft:spawn_egg", "name" : "minecraft:spawn_egg",
"id" : 628 "id" : 636
}, },
{ {
"name" : "minecraft:spider_eye", "name" : "minecraft:spider_eye",
@ -3669,7 +3713,7 @@
}, },
{ {
"name" : "minecraft:spyglass", "name" : "minecraft:spyglass",
"id" : 624 "id" : 626
}, },
{ {
"name" : "minecraft:squid_spawn_egg", "name" : "minecraft:squid_spawn_egg",
@ -3829,7 +3873,7 @@
}, },
{ {
"name" : "minecraft:suspicious_stew", "name" : "minecraft:suspicious_stew",
"id" : 589 "id" : 590
}, },
{ {
"name" : "minecraft:sweet_berries", "name" : "minecraft:sweet_berries",
@ -3839,6 +3883,14 @@
"name" : "minecraft:sweet_berry_bush", "name" : "minecraft:sweet_berry_bush",
"id" : -207 "id" : -207
}, },
{
"name" : "minecraft:tadpole_bucket",
"id" : 630
},
{
"name" : "minecraft:tadpole_spawn_egg",
"id" : 629
},
{ {
"name" : "minecraft:tallgrass", "name" : "minecraft:tallgrass",
"id" : 31 "id" : 31
@ -3943,6 +3995,10 @@
"name" : "minecraft:unpowered_repeater", "name" : "minecraft:unpowered_repeater",
"id" : 93 "id" : 93
}, },
{
"name" : "minecraft:verdant_froglight",
"id" : -470
},
{ {
"name" : "minecraft:vex_spawn_egg", "name" : "minecraft:vex_spawn_egg",
"id" : 476 "id" : 476
@ -3977,7 +4033,7 @@
}, },
{ {
"name" : "minecraft:warped_door", "name" : "minecraft:warped_door",
"id" : 615 "id" : 617
}, },
{ {
"name" : "minecraft:warped_double_slab", "name" : "minecraft:warped_double_slab",
@ -3997,7 +4053,7 @@
}, },
{ {
"name" : "minecraft:warped_fungus_on_a_stick", "name" : "minecraft:warped_fungus_on_a_stick",
"id" : 616 "id" : 618
}, },
{ {
"name" : "minecraft:warped_hyphae", "name" : "minecraft:warped_hyphae",
@ -4021,7 +4077,7 @@
}, },
{ {
"name" : "minecraft:warped_sign", "name" : "minecraft:warped_sign",
"id" : 613 "id" : 615
}, },
{ {
"name" : "minecraft:warped_slab", "name" : "minecraft:warped_slab",