Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 08:10:11 +01:00
1.19.10 fallout
Dieser Commit ist enthalten in:
Ursprung
363d72da91
Commit
bca6359f7e
@ -1,4 +1,4 @@
|
|||||||
val paperVersion = "1.17.1-R0.1-SNAPSHOT" // Needed because we do not support Java 17 yet
|
val paperVersion = "1.19-R0.1-SNAPSHOT" // Needed because we do not support Java 17 yet
|
||||||
val viaVersion = "4.0.0"
|
val viaVersion = "4.0.0"
|
||||||
val adaptersVersion = "1.4-SNAPSHOT"
|
val adaptersVersion = "1.4-SNAPSHOT"
|
||||||
val commodoreVersion = "1.13"
|
val commodoreVersion = "1.13"
|
||||||
|
@ -62,11 +62,11 @@ public final class GeyserPaperPingPassthrough implements IGeyserPingPassthrough
|
|||||||
// Approximately pre-1.19
|
// Approximately pre-1.19
|
||||||
event = OLD_CONSTRUCTOR.newInstance(new GeyserStatusClient(inetSocketAddress),
|
event = OLD_CONSTRUCTOR.newInstance(new GeyserStatusClient(inetSocketAddress),
|
||||||
Bukkit.getMotd(), Bukkit.getOnlinePlayers().size(),
|
Bukkit.getMotd(), Bukkit.getOnlinePlayers().size(),
|
||||||
Bukkit.getMaxPlayers(), Bukkit.getVersion(), MinecraftProtocol.getJavaProtocolVersion(), null);
|
Bukkit.getMaxPlayers(), Bukkit.getVersion(), GameProtocol.getJavaProtocolVersion(), null);
|
||||||
} else {
|
} else {
|
||||||
event = new PaperServerListPingEvent(new GeyserStatusClient(inetSocketAddress),
|
event = new PaperServerListPingEvent(new GeyserStatusClient(inetSocketAddress),
|
||||||
Bukkit.getMotd(), Bukkit.shouldSendChatPreviews(), Bukkit.getOnlinePlayers().size(),
|
Bukkit.getMotd(), Bukkit.shouldSendChatPreviews(), Bukkit.getOnlinePlayers().size(),
|
||||||
Bukkit.getMaxPlayers(), Bukkit.getVersion(), MinecraftProtocol.getJavaProtocolVersion(), null);
|
Bukkit.getMaxPlayers(), Bukkit.getVersion(), GameProtocol.getJavaProtocolVersion(), null);
|
||||||
}
|
}
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
|
@ -16,6 +16,6 @@ dependencies {
|
|||||||
|
|
||||||
tasks.withType<KotlinCompile> {
|
tasks.withType<KotlinCompile> {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = "16"
|
jvmTarget = "17"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -30,10 +30,10 @@ object Versions {
|
|||||||
const val guavaVersion = "29.0-jre"
|
const val guavaVersion = "29.0-jre"
|
||||||
const val nbtVersion = "2.1.0"
|
const val nbtVersion = "2.1.0"
|
||||||
const val websocketVersion = "1.5.1"
|
const val websocketVersion = "1.5.1"
|
||||||
const val protocolVersion = "977a9a1"
|
const val protocolVersion = "a78a64b"
|
||||||
const val raknetVersion = "1.6.28-SNAPSHOT"
|
const val raknetVersion = "1.6.28-SNAPSHOT"
|
||||||
const val mcauthlibVersion = "d9d773e"
|
const val mcauthlibVersion = "d9d773e"
|
||||||
const val mcprotocollibversion = "bb2b414"
|
const val mcprotocollibversion = "54fc9f0"
|
||||||
const val packetlibVersion = "3.0"
|
const val packetlibVersion = "3.0"
|
||||||
const val adventureVersion = "4.9.3"
|
const val adventureVersion = "4.9.3"
|
||||||
const val eventVersion = "3.0.0"
|
const val eventVersion = "3.0.0"
|
||||||
|
@ -26,8 +26,8 @@ tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_16
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_16
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
}
|
}
|
@ -31,7 +31,7 @@ dependencies {
|
|||||||
// Network libraries
|
// Network libraries
|
||||||
implementation("org.java-websocket", "Java-WebSocket", Versions.websocketVersion)
|
implementation("org.java-websocket", "Java-WebSocket", Versions.websocketVersion)
|
||||||
|
|
||||||
api("com.github.CloudburstMC.Protocol", "bedrock-v527", Versions.protocolVersion) {
|
api("com.github.CloudburstMC.Protocol", "bedrock-v534", Versions.protocolVersion) {
|
||||||
exclude("com.nukkitx.network", "raknet")
|
exclude("com.nukkitx.network", "raknet")
|
||||||
exclude("com.nukkitx", "nbt")
|
exclude("com.nukkitx", "nbt")
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ package org.geysermc.geyser.ping;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonParseException;
|
import com.fasterxml.jackson.core.JsonParseException;
|
||||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||||
import com.github.steveice10.mc.protocol.MinecraftProtocol;
|
|
||||||
import com.nukkitx.nbt.util.VarInts;
|
import com.nukkitx.nbt.util.VarInts;
|
||||||
import io.netty.handler.codec.haproxy.HAProxyCommand;
|
import io.netty.handler.codec.haproxy.HAProxyCommand;
|
||||||
import io.netty.handler.codec.haproxy.HAProxyProxiedProtocol;
|
import io.netty.handler.codec.haproxy.HAProxyProxiedProtocol;
|
||||||
@ -85,7 +84,7 @@ public class GeyserLegacyPingPassthrough implements IGeyserPingPassthrough, Runn
|
|||||||
ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream();
|
ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream();
|
||||||
try (DataOutputStream handshake = new DataOutputStream(byteArrayStream)) {
|
try (DataOutputStream handshake = new DataOutputStream(byteArrayStream)) {
|
||||||
handshake.write(0x0);
|
handshake.write(0x0);
|
||||||
VarInts.writeUnsignedInt(handshake, MinecraftProtocol.getJavaProtocolVersion());
|
VarInts.writeUnsignedInt(handshake, GameProtocol.getJavaProtocolVersion());
|
||||||
VarInts.writeUnsignedInt(handshake, address.length());
|
VarInts.writeUnsignedInt(handshake, address.length());
|
||||||
handshake.writeBytes(address);
|
handshake.writeBytes(address);
|
||||||
handshake.writeShort(port);
|
handshake.writeShort(port);
|
||||||
|
@ -1643,7 +1643,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
|||||||
boolean spectator = gameMode == GameMode.SPECTATOR;
|
boolean spectator = gameMode == GameMode.SPECTATOR;
|
||||||
boolean worldImmutable = gameMode == GameMode.ADVENTURE || spectator;
|
boolean worldImmutable = gameMode == GameMode.ADVENTURE || spectator;
|
||||||
|
|
||||||
if (org.geysermc.geyser.network.MinecraftProtocol.supports1_19_10(this)) {
|
if (org.geysermc.geyser.network.GameProtocol.supports1_19_10(this)) {
|
||||||
UpdateAdventureSettingsPacket adventureSettingsPacket = new UpdateAdventureSettingsPacket();
|
UpdateAdventureSettingsPacket adventureSettingsPacket = new UpdateAdventureSettingsPacket();
|
||||||
adventureSettingsPacket.setNoMvP(false);
|
adventureSettingsPacket.setNoMvP(false);
|
||||||
adventureSettingsPacket.setNoPvM(false);
|
adventureSettingsPacket.setNoPvM(false);
|
||||||
|
@ -29,7 +29,7 @@ import com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack;
|
|||||||
import com.github.steveice10.opennbt.tag.builtin.StringTag;
|
import com.github.steveice10.opennbt.tag.builtin.StringTag;
|
||||||
import com.nukkitx.protocol.bedrock.data.inventory.ItemData;
|
import com.nukkitx.protocol.bedrock.data.inventory.ItemData;
|
||||||
import org.geysermc.geyser.GeyserImpl;
|
import org.geysermc.geyser.GeyserImpl;
|
||||||
import org.geysermc.geyser.network.MinecraftProtocol;
|
import org.geysermc.geyser.network.GameProtocol;
|
||||||
import org.geysermc.geyser.registry.Registries;
|
import org.geysermc.geyser.registry.Registries;
|
||||||
import org.geysermc.geyser.registry.type.ItemMapping;
|
import org.geysermc.geyser.registry.type.ItemMapping;
|
||||||
import org.geysermc.geyser.registry.type.ItemMappings;
|
import org.geysermc.geyser.registry.type.ItemMappings;
|
||||||
@ -91,7 +91,7 @@ public class GoatHornTranslator extends ItemTranslator {
|
|||||||
@Override
|
@Override
|
||||||
public List<ItemMapping> getAppliedItems() {
|
public List<ItemMapping> getAppliedItems() {
|
||||||
return Collections.singletonList(
|
return Collections.singletonList(
|
||||||
Registries.ITEMS.forVersion(MinecraftProtocol.DEFAULT_BEDROCK_CODEC.getProtocolVersion())
|
Registries.ITEMS.forVersion(GameProtocol.DEFAULT_BEDROCK_CODEC.getProtocolVersion())
|
||||||
.getMapping("minecraft:goat_horn")
|
.getMapping("minecraft:goat_horn")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ package org.geysermc.geyser.translator.protocol.java.entity.player;
|
|||||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerCombatKillPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerCombatKillPacket;
|
||||||
import com.nukkitx.protocol.bedrock.packet.DeathInfoPacket;
|
import com.nukkitx.protocol.bedrock.packet.DeathInfoPacket;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.geysermc.geyser.network.MinecraftProtocol;
|
import org.geysermc.geyser.network.GameProtocol;
|
||||||
import org.geysermc.geyser.session.GeyserSession;
|
import org.geysermc.geyser.session.GeyserSession;
|
||||||
import org.geysermc.geyser.translator.protocol.PacketTranslator;
|
import org.geysermc.geyser.translator.protocol.PacketTranslator;
|
||||||
import org.geysermc.geyser.translator.protocol.Translator;
|
import org.geysermc.geyser.translator.protocol.Translator;
|
||||||
@ -39,11 +39,11 @@ public class JavaPlayerCombatKillTranslator extends PacketTranslator<Clientbound
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(GeyserSession session, ClientboundPlayerCombatKillPacket packet) {
|
public void translate(GeyserSession session, ClientboundPlayerCombatKillPacket packet) {
|
||||||
if (packet.getPlayerId() == session.getPlayerEntity().getEntityId() && MinecraftProtocol.supports1_19_10(session)) {
|
if (packet.getPlayerId() == session.getPlayerEntity().getEntityId() && GameProtocol.supports1_19_10(session)) {
|
||||||
Component deathMessage = packet.getMessage();
|
Component deathMessage = packet.getMessage();
|
||||||
// TODO - could inject score in, but as of 1.19.10 newlines don't center and start at the left of the first text
|
// TODO - could inject score in, but as of 1.19.10 newlines don't center and start at the left of the first text
|
||||||
DeathInfoPacket deathInfoPacket = new DeathInfoPacket();
|
DeathInfoPacket deathInfoPacket = new DeathInfoPacket();
|
||||||
deathInfoPacket.setCauseAttackName(MessageTranslator.convertMessage(deathMessage, session.getLocale()));
|
deathInfoPacket.setCauseAttackName(MessageTranslator.convertMessage(deathMessage, session.locale()));
|
||||||
session.sendUpstreamPacket(deathInfoPacket);
|
session.sendUpstreamPacket(deathInfoPacket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren