diff --git a/core/src/main/java/org/geysermc/geyser/entity/type/BoatEntity.java b/core/src/main/java/org/geysermc/geyser/entity/type/BoatEntity.java index 1bf6e581e..25569990e 100644 --- a/core/src/main/java/org/geysermc/geyser/entity/type/BoatEntity.java +++ b/core/src/main/java/org/geysermc/geyser/entity/type/BoatEntity.java @@ -125,8 +125,8 @@ public class BoatEntity extends Entity { public void setVariant(IntEntityMetadata entityMetadata) { variant = entityMetadata.getPrimitiveValue(); dirtyMetadata.put(EntityDataTypes.VARIANT, switch (variant) { - case 6, 7 -> variant - 1; // Dark oak and mangrove - case 5, 8 -> 0; // TODO temp until 1.20. Cherry and bamboo + case 6, 7, 8 -> variant - 1; // dark_oak, mangrove, bamboo + case 5 -> 8; // cherry default -> variant; }); } diff --git a/core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java b/core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java index cfd293c26..51533dfd8 100644 --- a/core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java +++ b/core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java @@ -85,8 +85,6 @@ public class UpstreamPacketHandler extends LoggingPacketHandler { return translateAndDefault(packet); } - private boolean newProtocol = false; // TEMPORARY - private boolean setCorrectCodec(int protocolVersion) { BedrockCodec packetCodec = GameProtocol.getBedrockCodec(protocolVersion); if (packetCodec == null) { @@ -125,9 +123,7 @@ public class UpstreamPacketHandler extends LoggingPacketHandler { @Override public PacketSignal handle(RequestNetworkSettingsPacket packet) { - if (setCorrectCodec(packet.getProtocolVersion())) { - newProtocol = true; - } else { + if (!setCorrectCodec(packet.getProtocolVersion())) { return PacketSignal.HANDLED; } @@ -152,14 +148,6 @@ public class UpstreamPacketHandler extends LoggingPacketHandler { return PacketSignal.HANDLED; } -// session.getUpstream().getSession().getCodec() == null - - if (!newProtocol) { - if (!setCorrectCodec(loginPacket.getProtocolVersion())) { // REMOVE WHEN ONLY 1.19.30 IS SUPPORTED OR 1.20 - return PacketSignal.HANDLED; - } - } - // Set the block translation based off of version session.setBlockMappings(BlockRegistries.BLOCKS.forVersion(loginPacket.getProtocolVersion())); session.setItemMappings(Registries.ITEMS.forVersion(loginPacket.getProtocolVersion())); diff --git a/core/src/main/resources/mappings b/core/src/main/resources/mappings index f69b4db9a..7800f0769 160000 --- a/core/src/main/resources/mappings +++ b/core/src/main/resources/mappings @@ -1 +1 @@ -Subproject commit f69b4db9a6f0e8fff8b29564195c76074210b924 +Subproject commit 7800f07692d8636a58ac8611ae6fa7b8d3d3a3b3