From a8f9cc229ce53acfc3bc3c70c5d3bbb47e0f95eb Mon Sep 17 00:00:00 2001 From: onebeastchris Date: Sun, 1 Jun 2025 20:21:04 +0200 Subject: [PATCH] Initial 1.21.6 changes --- README.md | 2 +- .../java/org/geysermc/geyser/item/Items.java | 21 ++++++- .../item/hashing/DataComponentHashers.java | 25 ++++---- .../geysermc/geyser/level/WorldManager.java | 10 ---- .../geysermc/geyser/level/block/Blocks.java | 4 ++ .../level/block/property/Properties.java | 1 + .../geyser/session/cache/FormCache.java | 4 +- .../geyser/session/cache/InputCache.java | 16 +----- .../geyser/session/cache/tags/BlockTag.java | 53 +++++++++-------- .../geyser/session/cache/tags/ItemTag.java | 57 ++++++++++--------- .../player/BedrockInteractTranslator.java | 5 +- .../BedrockSetPlayerGameTypeTranslator.java | 17 +++--- .../dialogues/JavaClearDialogTranslator.java | 40 +++++++++++++ .../JavaShowDialogGameTranslator.java | 40 +++++++++++++ ...vaShowDialogueConfigurationTranslator.java | 40 +++++++++++++ .../level/JavaTrackedWaypointTranslator.java | 39 +++++++++++++ gradle.properties | 2 +- gradle/libs.versions.toml | 2 +- 18 files changed, 271 insertions(+), 107 deletions(-) create mode 100644 core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaClearDialogTranslator.java create mode 100644 core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaShowDialogGameTranslator.java create mode 100644 core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaShowDialogueConfigurationTranslator.java create mode 100644 core/src/main/java/org/geysermc/geyser/translator/protocol/java/level/JavaTrackedWaypointTranslator.java diff --git a/README.md b/README.md index 3da04c09d..49d1214e4 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The ultimate goal of this project is to allow Minecraft: Bedrock Edition users t Special thanks to the DragonProxy project for being a trailblazer in protocol translation and for all the team members who have joined us here! ## Supported Versions -Geyser is currently supporting Minecraft Bedrock 1.21.50 - 1.21.80 and Minecraft Java 1.21.5. For more information, please see [here](https://geysermc.org/wiki/geyser/supported-versions/). +Geyser is currently supporting Minecraft Bedrock 1.21.50 - 1.21.80 and Minecraft Java 1.21.6. For more information, please see [here](https://geysermc.org/wiki/geyser/supported-versions/). ## Setting Up Take a look [here](https://geysermc.org/wiki/geyser/setup/) for how to set up Geyser. diff --git a/core/src/main/java/org/geysermc/geyser/item/Items.java b/core/src/main/java/org/geysermc/geyser/item/Items.java index 5fd64c4d4..1c693a52f 100644 --- a/core/src/main/java/org/geysermc/geyser/item/Items.java +++ b/core/src/main/java/org/geysermc/geyser/item/Items.java @@ -685,6 +685,7 @@ public final class Items { public static final Item BLACK_CONCRETE_POWDER = register(new BlockItem(builder(), Blocks.BLACK_CONCRETE_POWDER)); public static final Item TURTLE_EGG = register(new BlockItem(builder(), Blocks.TURTLE_EGG)); public static final Item SNIFFER_EGG = register(new BlockItem(builder(), Blocks.SNIFFER_EGG)); + public static final Item DRIED_GHAST = register(new BlockItem(builder(), Blocks.DRIED_GHAST)); public static final Item DEAD_TUBE_CORAL_BLOCK = register(new BlockItem(builder(), Blocks.DEAD_TUBE_CORAL_BLOCK)); public static final Item DEAD_BRAIN_CORAL_BLOCK = register(new BlockItem(builder(), Blocks.DEAD_BRAIN_CORAL_BLOCK)); public static final Item DEAD_BUBBLE_CORAL_BLOCK = register(new BlockItem(builder(), Blocks.DEAD_BUBBLE_CORAL_BLOCK)); @@ -867,6 +868,22 @@ public final class Items { public static final Item RAIL = register(new BlockItem(builder(), Blocks.RAIL)); public static final Item ACTIVATOR_RAIL = register(new BlockItem(builder(), Blocks.ACTIVATOR_RAIL)); public static final Item SADDLE = register(new Item("saddle", builder())); + public static final Item WHITE_HARNESS = register(new Item("white_harness", builder())); + public static final Item ORANGE_HARNESS = register(new Item("orange_harness", builder())); + public static final Item MAGENTA_HARNESS = register(new Item("magenta_harness", builder())); + public static final Item LIGHT_BLUE_HARNESS = register(new Item("light_blue_harness", builder())); + public static final Item YELLOW_HARNESS = register(new Item("yellow_harness", builder())); + public static final Item LIME_HARNESS = register(new Item("lime_harness", builder())); + public static final Item PINK_HARNESS = register(new Item("pink_harness", builder())); + public static final Item GRAY_HARNESS = register(new Item("gray_harness", builder())); + public static final Item LIGHT_GRAY_HARNESS = register(new Item("light_gray_harness", builder())); + public static final Item CYAN_HARNESS = register(new Item("cyan_harness", builder())); + public static final Item PURPLE_HARNESS = register(new Item("purple_harness", builder())); + public static final Item BLUE_HARNESS = register(new Item("blue_harness", builder())); + public static final Item BROWN_HARNESS = register(new Item("brown_harness", builder())); + public static final Item GREEN_HARNESS = register(new Item("green_harness", builder())); + public static final Item RED_HARNESS = register(new Item("red_harness", builder())); + public static final Item BLACK_HARNESS = register(new Item("black_harness", builder())); public static final Item MINECART = register(new Item("minecart", builder())); public static final Item CHEST_MINECART = register(new Item("chest_minecart", builder())); public static final Item FURNACE_MINECART = register(new Item("furnace_minecart", builder())); @@ -1131,7 +1148,7 @@ public final class Items { public static final Item BLAZE_POWDER = register(new Item("blaze_powder", builder())); public static final Item MAGMA_CREAM = register(new Item("magma_cream", builder())); public static final Item BREWING_STAND = register(new BlockItem(builder(), Blocks.BREWING_STAND)); - public static final Item CAULDRON = register(new BlockItem(builder(), Blocks.CAULDRON, Blocks.POWDER_SNOW_CAULDRON, Blocks.WATER_CAULDRON, Blocks.LAVA_CAULDRON)); + public static final Item CAULDRON = register(new BlockItem(builder(), Blocks.CAULDRON, Blocks.LAVA_CAULDRON, Blocks.POWDER_SNOW_CAULDRON, Blocks.WATER_CAULDRON)); public static final Item ENDER_EYE = register(new Item("ender_eye", builder())); public static final Item GLISTERING_MELON_SLICE = register(new Item("glistering_melon_slice", builder())); public static final Item ARMADILLO_SPAWN_EGG = register(new SpawnEggItem("armadillo_spawn_egg", builder())); @@ -1160,6 +1177,7 @@ public final class Items { public static final Item FOX_SPAWN_EGG = register(new SpawnEggItem("fox_spawn_egg", builder())); public static final Item FROG_SPAWN_EGG = register(new SpawnEggItem("frog_spawn_egg", builder())); public static final Item GHAST_SPAWN_EGG = register(new SpawnEggItem("ghast_spawn_egg", builder())); + public static final Item HAPPY_GHAST_SPAWN_EGG = register(new SpawnEggItem("happy_ghast_spawn_egg", builder())); public static final Item GLOW_SQUID_SPAWN_EGG = register(new SpawnEggItem("glow_squid_spawn_egg", builder())); public static final Item GOAT_SPAWN_EGG = register(new SpawnEggItem("goat_spawn_egg", builder())); public static final Item GUARDIAN_SPAWN_EGG = register(new SpawnEggItem("guardian_spawn_egg", builder())); @@ -1316,6 +1334,7 @@ public final class Items { public static final Item MUSIC_DISC_5 = register(new Item("music_disc_5", builder())); public static final Item MUSIC_DISC_PIGSTEP = register(new Item("music_disc_pigstep", builder())); public static final Item MUSIC_DISC_PRECIPICE = register(new Item("music_disc_precipice", builder())); + public static final Item MUSIC_DISC_TEARS = register(new Item("music_disc_tears", builder())); public static final Item DISC_FRAGMENT_5 = register(new Item("disc_fragment_5", builder())); public static final Item TRIDENT = register(new Item("trident", builder().attackDamage(9.0))); public static final Item NAUTILUS_SHELL = register(new Item("nautilus_shell", builder())); diff --git a/core/src/main/java/org/geysermc/geyser/item/hashing/DataComponentHashers.java b/core/src/main/java/org/geysermc/geyser/item/hashing/DataComponentHashers.java index 247cfeb3a..b1ee34ee9 100644 --- a/core/src/main/java/org/geysermc/geyser/item/hashing/DataComponentHashers.java +++ b/core/src/main/java/org/geysermc/geyser/item/hashing/DataComponentHashers.java @@ -44,9 +44,7 @@ import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.session.cache.registry.JavaRegistries; import org.geysermc.geyser.util.MinecraftKey; import org.geysermc.mcprotocollib.protocol.data.game.entity.Effect; -import org.geysermc.mcprotocollib.protocol.data.game.entity.EquipmentSlot; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos; -import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType; import org.geysermc.mcprotocollib.protocol.data.game.item.HashedStack; import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import org.geysermc.mcprotocollib.protocol.data.game.item.component.BlockStateProperties; @@ -413,17 +411,18 @@ public class DataComponentHashers { testHash(session, DataComponentTypes.ENCHANTABLE, 3, -1834983819); - testHash(session, DataComponentTypes.EQUIPPABLE, new Equippable(EquipmentSlot.BODY, BuiltinSound.ITEM_ARMOR_EQUIP_GENERIC, null, null, null, - true, true, true, false), 1294431019); - testHash(session, DataComponentTypes.EQUIPPABLE, new Equippable(EquipmentSlot.BODY, BuiltinSound.ITEM_ARMOR_EQUIP_CHAIN, MinecraftKey.key("testing"), null, null, - true, true, true, false), 1226203061); - testHash(session, DataComponentTypes.EQUIPPABLE, new Equippable(EquipmentSlot.BODY, BuiltinSound.AMBIENT_CAVE, null, null, null, - false, true, false, false), 1416408052); - testHash(session, DataComponentTypes.EQUIPPABLE, new Equippable(EquipmentSlot.BODY, BuiltinSound.ENTITY_BREEZE_WIND_BURST, null, MinecraftKey.key("testing"), - new HolderSet(new int[]{EntityType.ACACIA_BOAT.ordinal()}), false, true, false, false), 1711275245); - - testHash(session, DataComponentTypes.EQUIPPABLE, new Equippable(EquipmentSlot.HELMET, BuiltinSound.ITEM_ARMOR_EQUIP_GENERIC, null, null, null, - true, true, true, false), 497790992); // TODO broken because equipment slot names don't match + // TODO +// testHash(session, DataComponentTypes.EQUIPPABLE, new Equippable(EquipmentSlot.BODY, BuiltinSound.ITEM_ARMOR_EQUIP_GENERIC, null, null, null, +// true, true, true, false), 1294431019); +// testHash(session, DataComponentTypes.EQUIPPABLE, new Equippable(EquipmentSlot.BODY, BuiltinSound.ITEM_ARMOR_EQUIP_CHAIN, MinecraftKey.key("testing"), null, null, +// true, true, true, false), 1226203061); +// testHash(session, DataComponentTypes.EQUIPPABLE, new Equippable(EquipmentSlot.BODY, BuiltinSound.AMBIENT_CAVE, null, null, null, +// false, true, false, false), 1416408052); +// testHash(session, DataComponentTypes.EQUIPPABLE, new Equippable(EquipmentSlot.BODY, BuiltinSound.ENTITY_BREEZE_WIND_BURST, null, MinecraftKey.key("testing"), +// new HolderSet(new int[]{EntityType.ACACIA_BOAT.ordinal()}), false, true, false, false), 1711275245); +// +// testHash(session, DataComponentTypes.EQUIPPABLE, new Equippable(EquipmentSlot.HELMET, BuiltinSound.ITEM_ARMOR_EQUIP_GENERIC, null, null, null, +// true, true, true, false), 497790992); // TODO broken because equipment slot names don't match testHash(session, DataComponentTypes.REPAIRABLE, new HolderSet(new int[]{Items.AMETHYST_BLOCK.javaId(), Items.PUMPKIN.javaId()}), -36715567); diff --git a/core/src/main/java/org/geysermc/geyser/level/WorldManager.java b/core/src/main/java/org/geysermc/geyser/level/WorldManager.java index b0422913d..67590373c 100644 --- a/core/src/main/java/org/geysermc/geyser/level/WorldManager.java +++ b/core/src/main/java/org/geysermc/geyser/level/WorldManager.java @@ -147,16 +147,6 @@ public abstract class WorldManager { */ public abstract int getGameRuleInt(GeyserSession session, GameRule gameRule); - /** - * Change the game mode of the given session - * - * @param session The session of the player to change the game mode of - * @param gameMode The game mode to change the player to - */ - public void setPlayerGameMode(GeyserSession session, GameMode gameMode) { - session.sendCommand("gamemode " + gameMode.name().toLowerCase(Locale.ROOT)); - } - /** * Get the default game mode of the server * diff --git a/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java b/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java index e00be5c21..2f3cdfa00 100644 --- a/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java +++ b/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java @@ -1804,6 +1804,10 @@ public final class Blocks { .intState(HATCH))); public static final Block SNIFFER_EGG = register(new Block("sniffer_egg", builder().destroyTime(0.5f) .intState(HATCH))); + public static final Block DRIED_GHAST = register(new Block("dried_ghast", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .intState(DRIED_GHAST_HYDRATION_LEVELS) + .booleanState(WATERLOGGED))); public static final Block DEAD_TUBE_CORAL_BLOCK = register(new Block("dead_tube_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); public static final Block DEAD_BRAIN_CORAL_BLOCK = register(new Block("dead_brain_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); public static final Block DEAD_BUBBLE_CORAL_BLOCK = register(new Block("dead_bubble_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); diff --git a/core/src/main/java/org/geysermc/geyser/level/block/property/Properties.java b/core/src/main/java/org/geysermc/geyser/level/block/property/Properties.java index a837bd532..5506130e3 100644 --- a/core/src/main/java/org/geysermc/geyser/level/block/property/Properties.java +++ b/core/src/main/java/org/geysermc/geyser/level/block/property/Properties.java @@ -119,6 +119,7 @@ public final class Properties { public static final IntegerProperty STAGE = IntegerProperty.create("stage", 0, 1); public static final IntegerProperty STABILITY_DISTANCE = IntegerProperty.create("distance", 0, 7); public static final IntegerProperty RESPAWN_ANCHOR_CHARGES = IntegerProperty.create("charges", 0, 4); + public static final IntegerProperty DRIED_GHAST_HYDRATION_LEVELS = IntegerProperty.create("hydration", 0, 3); public static final IntegerProperty ROTATION_16 = IntegerProperty.create("rotation", 0, 15); public static final BasicEnumProperty BED_PART = BasicEnumProperty.create("part", "head", "foot"); public static final EnumProperty CHEST_TYPE = EnumProperty.create("type", ChestType.VALUES); diff --git a/core/src/main/java/org/geysermc/geyser/session/cache/FormCache.java b/core/src/main/java/org/geysermc/geyser/session/cache/FormCache.java index be5deece3..4425357fe 100644 --- a/core/src/main/java/org/geysermc/geyser/session/cache/FormCache.java +++ b/core/src/main/java/org/geysermc/geyser/session/cache/FormCache.java @@ -111,9 +111,7 @@ public class FormCache { } String responseData = response.getFormData(); - //todo work on a proper solution in Cumulus, but that'd require all Floodgate instances to update as well and - // drops support for older Bedrock versions (because Cumulus isn't made to support multiple versions). That's - // why this hotfix exists. + // TODO drop once 1.21.70 is no longer supported if (form instanceof CustomForm customForm && GameProtocol.isTheOneVersionWithBrokenForms(session) && response.getCancelReason().isEmpty()) { // Labels are no longer included as a json null, so we have to manually add them for now. IntList labelIndexes = new IntArrayList(); diff --git a/core/src/main/java/org/geysermc/geyser/session/cache/InputCache.java b/core/src/main/java/org/geysermc/geyser/session/cache/InputCache.java index 5d6b60521..b19c2c108 100644 --- a/core/src/main/java/org/geysermc/geyser/session/cache/InputCache.java +++ b/core/src/main/java/org/geysermc/geyser/session/cache/InputCache.java @@ -34,9 +34,7 @@ import org.cloudburstmc.protocol.bedrock.data.PlayerAuthInputData; import org.cloudburstmc.protocol.bedrock.packet.PlayerAuthInputPacket; import org.geysermc.geyser.entity.type.player.SessionPlayerEntity; import org.geysermc.geyser.session.GeyserSession; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerState; import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.level.ServerboundPlayerInputPacket; -import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundPlayerCommandPacket; import java.util.Set; @@ -88,21 +86,9 @@ public final class InputCache { // using the "raw" values allows us sending key presses even with locked input // There appear to be cases where the raw value is not sent - e.g. sneaking with a shield on mobile (1.21.80) .withJump(bedrockInput.contains(PlayerAuthInputData.JUMP_CURRENT_RAW) || bedrockInput.contains(PlayerAuthInputData.JUMP_DOWN)) - .withShift(bedrockInput.contains(PlayerAuthInputData.SNEAK_CURRENT_RAW) || bedrockInput.contains(PlayerAuthInputData.SNEAK_DOWN)) + .withShift(isSneaking(bedrockInput)) .withSprint(bedrockInput.contains(PlayerAuthInputData.SPRINT_DOWN)); - // Send sneaking before inputs; matches Java edition - boolean sneaking = isSneaking(bedrockInput); - if (session.isSneaking() != sneaking) { - if (sneaking) { - session.sendDownstreamGamePacket(new ServerboundPlayerCommandPacket(entity.javaId(), PlayerState.START_SNEAKING)); - session.startSneaking(); - } else { - session.sendDownstreamGamePacket(new ServerboundPlayerCommandPacket(entity.javaId(), PlayerState.STOP_SNEAKING)); - session.stopSneaking(); - } - } - if (oldInputPacket != this.inputPacket) { // Simple equality check is fine since we're checking for an instance change. session.sendDownstreamGamePacket(this.inputPacket); } diff --git a/core/src/main/java/org/geysermc/geyser/session/cache/tags/BlockTag.java b/core/src/main/java/org/geysermc/geyser/session/cache/tags/BlockTag.java index 924b168a4..7c08dbed1 100644 --- a/core/src/main/java/org/geysermc/geyser/session/cache/tags/BlockTag.java +++ b/core/src/main/java/org/geysermc/geyser/session/cache/tags/BlockTag.java @@ -42,48 +42,45 @@ public final class BlockTag { public static final Tag BUTTONS = create("buttons"); public static final Tag WOOL_CARPETS = create("wool_carpets"); public static final Tag WOODEN_DOORS = create("wooden_doors"); - public static final Tag MOB_INTERACTABLE_DOORS = create("mob_interactable_doors"); public static final Tag WOODEN_STAIRS = create("wooden_stairs"); public static final Tag WOODEN_SLABS = create("wooden_slabs"); public static final Tag WOODEN_FENCES = create("wooden_fences"); - public static final Tag PRESSURE_PLATES = create("pressure_plates"); + public static final Tag FENCE_GATES = create("fence_gates"); public static final Tag WOODEN_PRESSURE_PLATES = create("wooden_pressure_plates"); - public static final Tag STONE_PRESSURE_PLATES = create("stone_pressure_plates"); - public static final Tag WOODEN_TRAPDOORS = create("wooden_trapdoors"); public static final Tag DOORS = create("doors"); public static final Tag SAPLINGS = create("saplings"); - public static final Tag LOGS_THAT_BURN = create("logs_that_burn"); - public static final Tag OVERWORLD_NATURAL_LOGS = create("overworld_natural_logs"); - public static final Tag LOGS = create("logs"); + public static final Tag BAMBOO_BLOCKS = create("bamboo_blocks"); + public static final Tag OAK_LOGS = create("oak_logs"); public static final Tag DARK_OAK_LOGS = create("dark_oak_logs"); public static final Tag PALE_OAK_LOGS = create("pale_oak_logs"); - public static final Tag OAK_LOGS = create("oak_logs"); public static final Tag BIRCH_LOGS = create("birch_logs"); public static final Tag ACACIA_LOGS = create("acacia_logs"); - public static final Tag CHERRY_LOGS = create("cherry_logs"); - public static final Tag JUNGLE_LOGS = create("jungle_logs"); public static final Tag SPRUCE_LOGS = create("spruce_logs"); public static final Tag MANGROVE_LOGS = create("mangrove_logs"); + public static final Tag JUNGLE_LOGS = create("jungle_logs"); + public static final Tag CHERRY_LOGS = create("cherry_logs"); public static final Tag CRIMSON_STEMS = create("crimson_stems"); public static final Tag WARPED_STEMS = create("warped_stems"); - public static final Tag BAMBOO_BLOCKS = create("bamboo_blocks"); public static final Tag WART_BLOCKS = create("wart_blocks"); - public static final Tag BANNERS = create("banners"); + public static final Tag LOGS_THAT_BURN = create("logs_that_burn"); + public static final Tag LOGS = create("logs"); public static final Tag SAND = create("sand"); public static final Tag SMELTS_TO_GLASS = create("smelts_to_glass"); - public static final Tag STAIRS = create("stairs"); public static final Tag SLABS = create("slabs"); public static final Tag WALLS = create("walls"); + public static final Tag STAIRS = create("stairs"); public static final Tag ANVIL = create("anvil"); public static final Tag RAILS = create("rails"); public static final Tag LEAVES = create("leaves"); + public static final Tag WOODEN_TRAPDOORS = create("wooden_trapdoors"); public static final Tag TRAPDOORS = create("trapdoors"); public static final Tag SMALL_FLOWERS = create("small_flowers"); + public static final Tag FLOWERS = create("flowers"); public static final Tag BEDS = create("beds"); public static final Tag FENCES = create("fences"); - public static final Tag FLOWERS = create("flowers"); - public static final Tag BEE_ATTRACTIVE = create("bee_attractive"); - public static final Tag PIGLIN_REPELLENTS = create("piglin_repellents"); + public static final Tag SOUL_FIRE_BASE_BLOCKS = create("soul_fire_base_blocks"); + public static final Tag CANDLES = create("candles"); + public static final Tag DAMPENS_VIBRATIONS = create("dampens_vibrations"); public static final Tag GOLD_ORES = create("gold_ores"); public static final Tag IRON_ORES = create("iron_ores"); public static final Tag DIAMOND_ORES = create("diamond_ores"); @@ -92,13 +89,21 @@ public final class BlockTag { public static final Tag COAL_ORES = create("coal_ores"); public static final Tag EMERALD_ORES = create("emerald_ores"); public static final Tag COPPER_ORES = create("copper_ores"); - public static final Tag CANDLES = create("candles"); public static final Tag DIRT = create("dirt"); public static final Tag TERRACOTTA = create("terracotta"); - public static final Tag BADLANDS_TERRACOTTA = create("badlands_terracotta"); - public static final Tag CONCRETE_POWDER = create("concrete_powder"); public static final Tag COMPLETES_FIND_TREE_TUTORIAL = create("completes_find_tree_tutorial"); public static final Tag SHULKER_BOXES = create("shulker_boxes"); + public static final Tag CEILING_HANGING_SIGNS = create("ceiling_hanging_signs"); + public static final Tag STANDING_SIGNS = create("standing_signs"); + public static final Tag BEE_ATTRACTIVE = create("bee_attractive"); + public static final Tag MOB_INTERACTABLE_DOORS = create("mob_interactable_doors"); + public static final Tag PRESSURE_PLATES = create("pressure_plates"); + public static final Tag STONE_PRESSURE_PLATES = create("stone_pressure_plates"); + public static final Tag OVERWORLD_NATURAL_LOGS = create("overworld_natural_logs"); + public static final Tag BANNERS = create("banners"); + public static final Tag PIGLIN_REPELLENTS = create("piglin_repellents"); + public static final Tag BADLANDS_TERRACOTTA = create("badlands_terracotta"); + public static final Tag CONCRETE_POWDER = create("concrete_powder"); public static final Tag FLOWER_POTS = create("flower_pots"); public static final Tag ENDERMAN_HOLDABLE = create("enderman_holdable"); public static final Tag ICE = create("ice"); @@ -110,10 +115,8 @@ public final class BlockTag { public static final Tag CORAL_PLANTS = create("coral_plants"); public static final Tag CORALS = create("corals"); public static final Tag BAMBOO_PLANTABLE_ON = create("bamboo_plantable_on"); - public static final Tag STANDING_SIGNS = create("standing_signs"); public static final Tag WALL_SIGNS = create("wall_signs"); public static final Tag SIGNS = create("signs"); - public static final Tag CEILING_HANGING_SIGNS = create("ceiling_hanging_signs"); public static final Tag WALL_HANGING_SIGNS = create("wall_hanging_signs"); public static final Tag ALL_HANGING_SIGNS = create("all_hanging_signs"); public static final Tag ALL_SIGNS = create("all_signs"); @@ -133,12 +136,10 @@ public final class BlockTag { public static final Tag CLIMBABLE = create("climbable"); public static final Tag FALL_DAMAGE_RESETTING = create("fall_damage_resetting"); public static final Tag HOGLIN_REPELLENTS = create("hoglin_repellents"); - public static final Tag SOUL_FIRE_BASE_BLOCKS = create("soul_fire_base_blocks"); public static final Tag STRIDER_WARM_BLOCKS = create("strider_warm_blocks"); public static final Tag CAMPFIRES = create("campfires"); public static final Tag GUARDED_BY_PIGLINS = create("guarded_by_piglins"); public static final Tag PREVENT_MOB_SPAWNING_INSIDE = create("prevent_mob_spawning_inside"); - public static final Tag FENCE_GATES = create("fence_gates"); public static final Tag UNSTABLE_BOTTOM_CENTER = create("unstable_bottom_center"); public static final Tag MUSHROOM_GROW_BLOCK = create("mushroom_grow_block"); public static final Tag EDIBLE_FOR_SHEEP = create("edible_for_sheep"); @@ -157,8 +158,8 @@ public final class BlockTag { public static final Tag INSIDE_STEP_SOUND_BLOCKS = create("inside_step_sound_blocks"); public static final Tag COMBINATION_STEP_SOUND_BLOCKS = create("combination_step_sound_blocks"); public static final Tag CAMEL_SAND_STEP_SOUND_BLOCKS = create("camel_sand_step_sound_blocks"); + public static final Tag HAPPY_GHAST_AVOIDS = create("happy_ghast_avoids"); public static final Tag OCCLUDES_VIBRATION_SIGNALS = create("occludes_vibration_signals"); - public static final Tag DAMPENS_VIBRATIONS = create("dampens_vibrations"); public static final Tag DRIPSTONE_REPLACEABLE_BLOCKS = create("dripstone_replaceable_blocks"); public static final Tag CAVE_VINES = create("cave_vines"); public static final Tag MOSS_REPLACEABLE = create("moss_replaceable"); @@ -223,7 +224,9 @@ public final class BlockTag { public static final Tag MAINTAINS_FARMLAND = create("maintains_farmland"); public static final Tag BLOCKS_WIND_CHARGE_EXPLOSIONS = create("blocks_wind_charge_explosions"); public static final Tag DOES_NOT_BLOCK_HOPPERS = create("does_not_block_hoppers"); - public static final Tag PLAYS_AMBIENT_DESERT_BLOCK_SOUNDS = create("plays_ambient_desert_block_sounds"); + public static final Tag TRIGGERS_AMBIENT_DESERT_SAND_BLOCK_SOUNDS = create("triggers_ambient_desert_sand_block_sounds"); + public static final Tag TRIGGERS_AMBIENT_DESERT_DRY_VEGETATION_BLOCK_SOUNDS = create("triggers_ambient_desert_dry_vegetation_block_sounds"); + public static final Tag TRIGGERS_AMBIENT_DRIED_GHAST_BLOCK_SOUNDS = create("triggers_ambient_dried_ghast_block_sounds"); public static final Tag AIR = create("air"); private BlockTag() {} diff --git a/core/src/main/java/org/geysermc/geyser/session/cache/tags/ItemTag.java b/core/src/main/java/org/geysermc/geyser/session/cache/tags/ItemTag.java index 50398a765..34fb02afd 100644 --- a/core/src/main/java/org/geysermc/geyser/session/cache/tags/ItemTag.java +++ b/core/src/main/java/org/geysermc/geyser/session/cache/tags/ItemTag.java @@ -47,45 +47,62 @@ public final class ItemTag { public static final Tag WOODEN_FENCES = create("wooden_fences"); public static final Tag FENCE_GATES = create("fence_gates"); public static final Tag WOODEN_PRESSURE_PLATES = create("wooden_pressure_plates"); - public static final Tag WOODEN_TRAPDOORS = create("wooden_trapdoors"); public static final Tag DOORS = create("doors"); public static final Tag SAPLINGS = create("saplings"); - public static final Tag LOGS_THAT_BURN = create("logs_that_burn"); - public static final Tag LOGS = create("logs"); + public static final Tag BAMBOO_BLOCKS = create("bamboo_blocks"); + public static final Tag OAK_LOGS = create("oak_logs"); public static final Tag DARK_OAK_LOGS = create("dark_oak_logs"); public static final Tag PALE_OAK_LOGS = create("pale_oak_logs"); - public static final Tag OAK_LOGS = create("oak_logs"); public static final Tag BIRCH_LOGS = create("birch_logs"); public static final Tag ACACIA_LOGS = create("acacia_logs"); - public static final Tag CHERRY_LOGS = create("cherry_logs"); - public static final Tag JUNGLE_LOGS = create("jungle_logs"); public static final Tag SPRUCE_LOGS = create("spruce_logs"); public static final Tag MANGROVE_LOGS = create("mangrove_logs"); + public static final Tag JUNGLE_LOGS = create("jungle_logs"); + public static final Tag CHERRY_LOGS = create("cherry_logs"); public static final Tag CRIMSON_STEMS = create("crimson_stems"); public static final Tag WARPED_STEMS = create("warped_stems"); - public static final Tag BAMBOO_BLOCKS = create("bamboo_blocks"); public static final Tag WART_BLOCKS = create("wart_blocks"); - public static final Tag BANNERS = create("banners"); + public static final Tag LOGS_THAT_BURN = create("logs_that_burn"); + public static final Tag LOGS = create("logs"); public static final Tag SAND = create("sand"); public static final Tag SMELTS_TO_GLASS = create("smelts_to_glass"); - public static final Tag STAIRS = create("stairs"); public static final Tag SLABS = create("slabs"); public static final Tag WALLS = create("walls"); + public static final Tag STAIRS = create("stairs"); public static final Tag ANVIL = create("anvil"); public static final Tag RAILS = create("rails"); public static final Tag LEAVES = create("leaves"); + public static final Tag WOODEN_TRAPDOORS = create("wooden_trapdoors"); public static final Tag TRAPDOORS = create("trapdoors"); public static final Tag SMALL_FLOWERS = create("small_flowers"); public static final Tag FLOWERS = create("flowers"); public static final Tag BEDS = create("beds"); public static final Tag FENCES = create("fences"); + public static final Tag SOUL_FIRE_BASE_BLOCKS = create("soul_fire_base_blocks"); + public static final Tag CANDLES = create("candles"); + public static final Tag DAMPENS_VIBRATIONS = create("dampens_vibrations"); + public static final Tag GOLD_ORES = create("gold_ores"); + public static final Tag IRON_ORES = create("iron_ores"); + public static final Tag DIAMOND_ORES = create("diamond_ores"); + public static final Tag REDSTONE_ORES = create("redstone_ores"); + public static final Tag LAPIS_ORES = create("lapis_ores"); + public static final Tag COAL_ORES = create("coal_ores"); + public static final Tag EMERALD_ORES = create("emerald_ores"); + public static final Tag COPPER_ORES = create("copper_ores"); + public static final Tag DIRT = create("dirt"); + public static final Tag TERRACOTTA = create("terracotta"); + public static final Tag COMPLETES_FIND_TREE_TUTORIAL = create("completes_find_tree_tutorial"); + public static final Tag SHULKER_BOXES = create("shulker_boxes"); + public static final Tag SIGNS = create("signs"); + public static final Tag HANGING_SIGNS = create("hanging_signs"); + public static final Tag BEE_FOOD = create("bee_food"); + public static final Tag BANNERS = create("banners"); public static final Tag PIGLIN_REPELLENTS = create("piglin_repellents"); public static final Tag PIGLIN_LOVED = create("piglin_loved"); public static final Tag IGNORED_BY_PIGLIN_BABIES = create("ignored_by_piglin_babies"); public static final Tag PIGLIN_SAFE_ARMOR = create("piglin_safe_armor"); public static final Tag DUPLICATES_ALLAYS = create("duplicates_allays"); public static final Tag BREWING_FUEL = create("brewing_fuel"); - public static final Tag SHULKER_BOXES = create("shulker_boxes"); public static final Tag EGGS = create("eggs"); public static final Tag MEAT = create("meat"); public static final Tag SNIFFER_FOOD = create("sniffer_food"); @@ -98,9 +115,11 @@ public final class ItemTag { public static final Tag CAT_FOOD = create("cat_food"); public static final Tag HORSE_FOOD = create("horse_food"); public static final Tag HORSE_TEMPT_ITEMS = create("horse_tempt_items"); + public static final Tag HARNESSES = create("harnesses"); + public static final Tag HAPPY_GHAST_FOOD = create("happy_ghast_food"); + public static final Tag HAPPY_GHAST_TEMPT_ITEMS = create("happy_ghast_tempt_items"); public static final Tag CAMEL_FOOD = create("camel_food"); public static final Tag ARMADILLO_FOOD = create("armadillo_food"); - public static final Tag BEE_FOOD = create("bee_food"); public static final Tag CHICKEN_FOOD = create("chicken_food"); public static final Tag FROG_FOOD = create("frog_food"); public static final Tag HOGLIN_FOOD = create("hoglin_food"); @@ -117,24 +136,10 @@ public final class ItemTag { public static final Tag PARROT_FOOD = create("parrot_food"); public static final Tag PARROT_POISONOUS_FOOD = create("parrot_poisonous_food"); public static final Tag AXOLOTL_FOOD = create("axolotl_food"); - public static final Tag GOLD_ORES = create("gold_ores"); - public static final Tag IRON_ORES = create("iron_ores"); - public static final Tag DIAMOND_ORES = create("diamond_ores"); - public static final Tag REDSTONE_ORES = create("redstone_ores"); - public static final Tag LAPIS_ORES = create("lapis_ores"); - public static final Tag COAL_ORES = create("coal_ores"); - public static final Tag EMERALD_ORES = create("emerald_ores"); - public static final Tag COPPER_ORES = create("copper_ores"); public static final Tag NON_FLAMMABLE_WOOD = create("non_flammable_wood"); - public static final Tag SOUL_FIRE_BASE_BLOCKS = create("soul_fire_base_blocks"); - public static final Tag CANDLES = create("candles"); - public static final Tag DIRT = create("dirt"); - public static final Tag TERRACOTTA = create("terracotta"); - public static final Tag COMPLETES_FIND_TREE_TUTORIAL = create("completes_find_tree_tutorial"); public static final Tag BOATS = create("boats"); public static final Tag CHEST_BOATS = create("chest_boats"); public static final Tag FISHES = create("fishes"); - public static final Tag SIGNS = create("signs"); public static final Tag CREEPER_DROP_MUSIC_DISCS = create("creeper_drop_music_discs"); public static final Tag COALS = create("coals"); public static final Tag ARROWS = create("arrows"); @@ -157,10 +162,8 @@ public final class ItemTag { public static final Tag REPAIRS_WOLF_ARMOR = create("repairs_wolf_armor"); public static final Tag STONE_CRAFTING_MATERIALS = create("stone_crafting_materials"); public static final Tag FREEZE_IMMUNE_WEARABLES = create("freeze_immune_wearables"); - public static final Tag DAMPENS_VIBRATIONS = create("dampens_vibrations"); public static final Tag CLUSTER_MAX_HARVESTABLES = create("cluster_max_harvestables"); public static final Tag COMPASSES = create("compasses"); - public static final Tag HANGING_SIGNS = create("hanging_signs"); public static final Tag CREEPER_IGNITERS = create("creeper_igniters"); public static final Tag NOTEBLOCK_TOP_INSTRUMENTS = create("noteblock_top_instruments"); public static final Tag FOOT_ARMOR = create("foot_armor"); diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockInteractTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockInteractTranslator.java index b58e29def..512670d19 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockInteractTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockInteractTranslator.java @@ -75,8 +75,9 @@ public class BedrockInteractTranslator extends PacketTranslator session.sendDownstreamGamePacket(attackPacket); break; case LEAVE_VEHICLE: - ServerboundPlayerCommandPacket sneakPacket = new ServerboundPlayerCommandPacket(entity.getEntityId(), PlayerState.START_SNEAKING); - session.sendDownstreamGamePacket(sneakPacket); + // TODO ensure that shifting is actually sent!!! + //ServerboundPlayerCommandPacket sneakPacket = new ServerboundPlayerCommandPacket(entity.getEntityId(), PlayerState); + //session.sendDownstreamGamePacket(sneakPacket); // Reset steering to avoid these accidentally triggering session#isHandsBusy session.setSteeringLeft(false); diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockSetPlayerGameTypeTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockSetPlayerGameTypeTranslator.java index 0590ca0ad..5160cd2c0 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockSetPlayerGameTypeTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockSetPlayerGameTypeTranslator.java @@ -26,12 +26,12 @@ package org.geysermc.geyser.translator.protocol.bedrock.entity.player; import org.cloudburstmc.protocol.bedrock.packet.SetPlayerGameTypePacket; -import org.geysermc.geyser.Permissions; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.translator.protocol.PacketTranslator; import org.geysermc.geyser.translator.protocol.Translator; import org.geysermc.geyser.util.EntityUtils; import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; +import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundChangeGameModePacket; /** * In vanilla Bedrock, if you have operator status, this sets the player's gamemode without confirmation from the server. @@ -45,8 +45,13 @@ public class BedrockSetPlayerGameTypeTranslator extends PacketTranslator= 2 && session.hasPermission(Permissions.SERVER_SETTINGS)) { + // Revert to current game mode first - gamemode sending will be done server-authorative + SetPlayerGameTypePacket playerGameTypePacket = new SetPlayerGameTypePacket(); + playerGameTypePacket.setGamemode(EntityUtils.toBedrockGamemode(session.getGameMode()).ordinal()); + session.sendUpstreamPacket(playerGameTypePacket); + + // We will still inform the server that we want to change gamemodes, granted we have the permission to + if (session.getOpPermissionLevel() >= 2) { if (packet.getGamemode() != session.getGameMode().ordinal()) { // Bedrock has more Gamemodes than Java, leading to cases 5 (for "default") and 6 (for "spectator") being sent // https://github.com/CloudburstMC/Protocol/blob/3.0/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/GameType.java @@ -57,12 +62,8 @@ public class BedrockSetPlayerGameTypeTranslator extends PacketTranslator GameMode.SPECTATOR; default -> GameMode.SURVIVAL; }; - session.getGeyser().getWorldManager().setPlayerGameMode(session, gameMode); + session.sendDownstreamGamePacket(new ServerboundChangeGameModePacket(gameMode)); } - } else { - SetPlayerGameTypePacket playerGameTypePacket = new SetPlayerGameTypePacket(); - playerGameTypePacket.setGamemode(EntityUtils.toBedrockGamemode(session.getGameMode()).ordinal()); - session.sendUpstreamPacket(playerGameTypePacket); } } } diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaClearDialogTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaClearDialogTranslator.java new file mode 100644 index 000000000..9b2411a13 --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaClearDialogTranslator.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2025 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.translator.protocol.java.dialogues; + +import org.geysermc.geyser.session.GeyserSession; +import org.geysermc.geyser.translator.protocol.PacketTranslator; +import org.geysermc.geyser.translator.protocol.Translator; +import org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundClearDialogPacket; + +@Translator(packet = ClientboundClearDialogPacket.class) +public class JavaClearDialogTranslator extends PacketTranslator { + + @Override + public void translate(GeyserSession session, ClientboundClearDialogPacket packet) { + + } +} diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaShowDialogGameTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaShowDialogGameTranslator.java new file mode 100644 index 000000000..30431d221 --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaShowDialogGameTranslator.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2025 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.translator.protocol.java.dialogues; + +import org.geysermc.geyser.session.GeyserSession; +import org.geysermc.geyser.translator.protocol.PacketTranslator; +import org.geysermc.geyser.translator.protocol.Translator; +import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundShowDialogGamePacket; + +@Translator(packet = ClientboundShowDialogGamePacket.class) +public class JavaShowDialogGameTranslator extends PacketTranslator { + + @Override + public void translate(GeyserSession session, ClientboundShowDialogGamePacket packet) { + + } +} diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaShowDialogueConfigurationTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaShowDialogueConfigurationTranslator.java new file mode 100644 index 000000000..1cd2de17d --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/dialogues/JavaShowDialogueConfigurationTranslator.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2025 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.translator.protocol.java.dialogues; + +import org.geysermc.geyser.session.GeyserSession; +import org.geysermc.geyser.translator.protocol.PacketTranslator; +import org.geysermc.geyser.translator.protocol.Translator; +import org.geysermc.mcprotocollib.protocol.packet.configuration.clientbound.ClientboundShowDialogConfigurationPacket; + +@Translator(packet = ClientboundShowDialogConfigurationPacket.class) +public class JavaShowDialogueConfigurationTranslator extends PacketTranslator { + + @Override + public void translate(GeyserSession session, ClientboundShowDialogConfigurationPacket packet) { + + } +} diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/level/JavaTrackedWaypointTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/level/JavaTrackedWaypointTranslator.java new file mode 100644 index 000000000..a0de8ba6c --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/level/JavaTrackedWaypointTranslator.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2025 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.translator.protocol.java.level; + +import org.geysermc.geyser.session.GeyserSession; +import org.geysermc.geyser.translator.protocol.PacketTranslator; +import org.geysermc.geyser.translator.protocol.Translator; +import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.ClientboundTrackedWaypointPacket; + +@Translator(packet = ClientboundTrackedWaypointPacket.class) +public class JavaTrackedWaypointTranslator extends PacketTranslator { + + @Override + public void translate(GeyserSession session, ClientboundTrackedWaypointPacket packet) { + } +} diff --git a/gradle.properties b/gradle.properties index ef4eac81e..d5fc8c0f7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,5 +8,5 @@ org.gradle.vfs.watch=false group=org.geysermc id=geyser -version=2.7.1-SNAPSHOT +version=2.8.0-SNAPSHOT description=Allows for players from Minecraft: Bedrock Edition to join Minecraft: Java Edition servers. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ce4d1a3b5..08498f99d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,7 +14,7 @@ protocol-common = "3.0.0.Beta6-20250506.012145-17" protocol-codec = "3.0.0.Beta6-20250506.012145-17" raknet = "1.0.0.CR3-20250218.160705-18" minecraftauth = "4.1.1" -mcprotocollib = "1.21.5-20250509.144049-29" +mcprotocollib = "1.21.6-SNAPSHOT" adventure = "4.14.0" adventure-platform = "4.3.0" junit = "5.9.2"