mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-12-29 15:49:09 +01:00
cleanup
This commit is contained in:
parent
21a2c2332f
commit
d3a4b13364
6 changed files with 10 additions and 7 deletions
|
@ -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!
|
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
|
## Setting Up
|
||||||
Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Geyser.
|
Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Geyser.
|
||||||
|
|
|
@ -63,7 +63,9 @@ public final class GameProtocol {
|
||||||
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v622.CODEC.toBuilder()
|
SUPPORTED_BEDROCK_CODECS.add(Bedrock_v622.CODEC.toBuilder()
|
||||||
.minecraftVersion("1.20.40/1.20.41")
|
.minecraftVersion("1.20.40/1.20.41")
|
||||||
.build());
|
.build());
|
||||||
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC);
|
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC.toBuilder()
|
||||||
|
.minecraftVersion("1.20.50/1.20.51")
|
||||||
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* Backwards-maps the blocks and items of 1.20.50 (630) to 1.20.40 (622)
|
* 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_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");
|
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");
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class ItemRegistryPopulator {
|
||||||
|
|
||||||
public static void populate() {
|
public static void populate() {
|
||||||
List<PaletteVersion> paletteVersions = new ArrayList<>(3);
|
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()));
|
paletteVersions.add(new PaletteVersion("1_20_50", Bedrock_v630.CODEC.getProtocolVersion()));
|
||||||
|
|
||||||
GeyserBootstrap bootstrap = GeyserImpl.getInstance().getBootstrap();
|
GeyserBootstrap bootstrap = GeyserImpl.getInstance().getBootstrap();
|
||||||
|
|
|
@ -336,7 +336,7 @@ public class JavaLevelEventTranslator extends PacketTranslator<ClientboundLevelE
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
default -> {
|
default -> {
|
||||||
GeyserImpl.getInstance().getLogger().warning("Unhandled level event: " + packet.getEvent());
|
GeyserImpl.getInstance().getLogger().debug("Unhandled level event: " + packet.getEvent());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.data.game.scoreboard.ScoreboardPosition;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.scoreboard.ClientboundSetScorePacket;
|
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.data.entity.EntityDataTypes;
|
||||||
import org.cloudburstmc.protocol.bedrock.packet.SetEntityDataPacket;
|
import org.cloudburstmc.protocol.bedrock.packet.SetEntityDataPacket;
|
||||||
import org.geysermc.geyser.GeyserImpl;
|
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
|
* @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);
|
PlayerEntity entity = getOtherPlayerEntity(session, username);
|
||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -102,7 +103,7 @@ public class JavaSetScoreTranslator extends PacketTranslator<ClientboundSetScore
|
||||||
session.sendUpstreamPacket(entityDataPacket);
|
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
|
// 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)) {
|
if (session.getPlayerEntity().getUsername().equals(username)) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue