This commit is contained in:
Konicai 2023-12-14 15:22:40 -05:00
parent 21a2c2332f
commit d3a4b13364
6 changed files with 10 additions and 7 deletions

View file

@ -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.50 and Minecraft Java 1.20.3
### Currently supporting Minecraft Bedrock 1.20.40 - 1.20.51 and Minecraft Java 1.20.4
## Setting Up
Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Geyser.

View file

@ -63,7 +63,9 @@ public final class GameProtocol {
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v622.CODEC.toBuilder()
.minecraftVersion("1.20.40/1.20.41")
.build());
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC);
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC.toBuilder()
.minecraftVersion("1.20.50/1.20.51")
.build());
}
/**

View file

@ -37,7 +37,7 @@ import java.util.Map;
/**
* Backwards-maps the blocks and items of 1.20.50 (630) to 1.20.40 (622)
*/
public class Conversion630_622 {
class Conversion630_622 {
private static final List<String> NEW_STONES = List.of("minecraft:stone", "minecraft:granite", "minecraft:polished_granite", "minecraft:diorite", "minecraft:polished_diorite", "minecraft:andesite", "minecraft:polished_andesite");
private static final List<String> NEW_WOODS = List.of("minecraft:oak_planks", "minecraft:spruce_planks", "minecraft:birch_planks", "minecraft:jungle_planks", "minecraft:acacia_planks", "minecraft:dark_oak_planks");

View file

@ -87,7 +87,7 @@ public class ItemRegistryPopulator {
public static void populate() {
List<PaletteVersion> paletteVersions = new ArrayList<>(3);
paletteVersions.add(new PaletteVersion("1_20_40", Bedrock_v622.CODEC.getProtocolVersion(), Collections.emptyMap(), Conversion630_622::remapItem)); // NO item changes between 1.20.30 and 1.20.40
paletteVersions.add(new PaletteVersion("1_20_40", Bedrock_v622.CODEC.getProtocolVersion(), Collections.emptyMap(), Conversion630_622::remapItem));
paletteVersions.add(new PaletteVersion("1_20_50", Bedrock_v630.CODEC.getProtocolVersion()));
GeyserBootstrap bootstrap = GeyserImpl.getInstance().getBootstrap();

View file

@ -336,7 +336,7 @@ public class JavaLevelEventTranslator extends PacketTranslator<ClientboundLevelE
return;
}
default -> {
GeyserImpl.getInstance().getLogger().warning("Unhandled level event: " + packet.getEvent());
GeyserImpl.getInstance().getLogger().debug("Unhandled level event: " + packet.getEvent());
return;
}
}

View file

@ -27,6 +27,7 @@ package org.geysermc.geyser.translator.protocol.java.scoreboard;
import com.github.steveice10.mc.protocol.data.game.scoreboard.ScoreboardPosition;
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.scoreboard.ClientboundSetScorePacket;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.cloudburstmc.protocol.bedrock.data.entity.EntityDataTypes;
import org.cloudburstmc.protocol.bedrock.packet.SetEntityDataPacket;
import org.geysermc.geyser.GeyserImpl;
@ -86,7 +87,7 @@ public class JavaSetScoreTranslator extends PacketTranslator<ClientboundSetScore
/**
* @param objective the objective that currently resides on the below name display slot
*/
protected static void setBelowName(GeyserSession session, Objective objective, String username, int count) {
static void setBelowName(GeyserSession session, Objective objective, String username, int count) {
PlayerEntity entity = getOtherPlayerEntity(session, username);
if (entity == null) {
return;
@ -102,7 +103,7 @@ public class JavaSetScoreTranslator extends PacketTranslator<ClientboundSetScore
session.sendUpstreamPacket(entityDataPacket);
}
private static PlayerEntity getOtherPlayerEntity(GeyserSession session, String username) {
private static @Nullable PlayerEntity getOtherPlayerEntity(GeyserSession session, String username) {
// We don't care about the session player, because... they're not going to be seeing their own score
if (session.getPlayerEntity().getUsername().equals(username)) {
return null;