Skip to content

Commit

Permalink
Fix wooden slabs (GeyserMC#4489)
Browse files Browse the repository at this point in the history
* Fix wooden slabs

Signed-off-by: Joshua Castle <[email protected]>

* Update submodule

Signed-off-by: Joshua Castle <[email protected]>

* Also indicate 1.20.71 support

Signed-off-by: Joshua Castle <[email protected]>

---------

Signed-off-by: Joshua Castle <[email protected]>
  • Loading branch information
Kas-tle authored Mar 13, 2024
1 parent 1df63c6 commit 7e4d97f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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!

### Currently supporting Minecraft Bedrock 1.20.40 - 1.20.70 and Minecraft Java 1.20.4
### Currently supporting Minecraft Bedrock 1.20.40 - 1.20.71 and Minecraft Java 1.20.4

## Setting Up
Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Geyser.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public final class GameProtocol {
.minecraftVersion("1.20.60/1.20.62")
.build());
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC.toBuilder()
.minecraftVersion("1.20.70")
.minecraftVersion("1.20.70/1.20.71")
.build());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ static GeyserMappingItem remapItem(@SuppressWarnings("unused") Item item, Geyser
}
}

if (NEW_SLABS.contains(identifer)) {
switch (identifer) {
case "minecraft:oak_slab" -> { return mapping.withBedrockIdentifier("minecraft:wooden_slab").withBedrockData(0); }
case "minecraft:spruce_slab" -> { return mapping.withBedrockIdentifier("minecraft:wooden_slab").withBedrockData(1); }
case "minecraft:birch_slab" -> { return mapping.withBedrockIdentifier("minecraft:wooden_slab").withBedrockData(2); }
case "minecraft:jungle_slab" -> { return mapping.withBedrockIdentifier("minecraft:wooden_slab").withBedrockData(3); }
case "minecraft:acacia_slab" -> { return mapping.withBedrockIdentifier("minecraft:wooden_slab").withBedrockData(4); }
case "minecraft:dark_oak_slab" -> { return mapping.withBedrockIdentifier("minecraft:wooden_slab").withBedrockData(5); }
}
}

if (NEW_LEAVES.contains(identifer) || NEW_LEAVES2.contains(identifer)) {
switch (identifer) {
case "minecraft:oak_leaves" -> { return mapping.withBedrockIdentifier("minecraft:leaves").withBedrockData(0); }
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/mappings
Submodule mappings updated 1 files
+11 −11 items.json

0 comments on commit 7e4d97f

Please sign in to comment.