3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-20 15:00:11 +01:00

Yeet unused, update optionalpack link

Dieser Commit ist enthalten in:
onebeastchris 2024-06-19 23:41:58 +02:00
Ursprung 86f645899f
Commit 6053b7dae8
3 geänderte Dateien mit 5 neuen und 24 gelöschten Zeilen

Datei anzeigen

@ -36,20 +36,7 @@ import org.cloudburstmc.protocol.bedrock.data.ResourcePackType;
import org.cloudburstmc.protocol.bedrock.netty.codec.compression.CompressionStrategy; import org.cloudburstmc.protocol.bedrock.netty.codec.compression.CompressionStrategy;
import org.cloudburstmc.protocol.bedrock.netty.codec.compression.SimpleCompressionStrategy; import org.cloudburstmc.protocol.bedrock.netty.codec.compression.SimpleCompressionStrategy;
import org.cloudburstmc.protocol.bedrock.netty.codec.compression.ZlibCompression; import org.cloudburstmc.protocol.bedrock.netty.codec.compression.ZlibCompression;
import org.cloudburstmc.protocol.bedrock.packet.BedrockPacket; import org.cloudburstmc.protocol.bedrock.packet.*;
import org.cloudburstmc.protocol.bedrock.packet.LoginPacket;
import org.cloudburstmc.protocol.bedrock.packet.ModalFormResponsePacket;
import org.cloudburstmc.protocol.bedrock.packet.MovePlayerPacket;
import org.cloudburstmc.protocol.bedrock.packet.NetworkSettingsPacket;
import org.cloudburstmc.protocol.bedrock.packet.PlayStatusPacket;
import org.cloudburstmc.protocol.bedrock.packet.RequestNetworkSettingsPacket;
import org.cloudburstmc.protocol.bedrock.packet.ResourcePackChunkDataPacket;
import org.cloudburstmc.protocol.bedrock.packet.ResourcePackChunkRequestPacket;
import org.cloudburstmc.protocol.bedrock.packet.ResourcePackClientResponsePacket;
import org.cloudburstmc.protocol.bedrock.packet.ResourcePackDataInfoPacket;
import org.cloudburstmc.protocol.bedrock.packet.ResourcePackStackPacket;
import org.cloudburstmc.protocol.bedrock.packet.ResourcePacksInfoPacket;
import org.cloudburstmc.protocol.bedrock.packet.SetTitlePacket;
import org.cloudburstmc.protocol.common.PacketSignal; import org.cloudburstmc.protocol.common.PacketSignal;
import org.cloudburstmc.protocol.common.util.Zlib; import org.cloudburstmc.protocol.common.util.Zlib;
import org.geysermc.geyser.Constants; import org.geysermc.geyser.Constants;
@ -78,15 +65,12 @@ import java.nio.channels.SeekableByteChannel;
import java.util.ArrayDeque; import java.util.ArrayDeque;
import java.util.Deque; import java.util.Deque;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map;
import java.util.OptionalInt; import java.util.OptionalInt;
import java.util.UUID;
public class UpstreamPacketHandler extends LoggingPacketHandler { public class UpstreamPacketHandler extends LoggingPacketHandler {
private boolean networkSettingsRequested = false; private boolean networkSettingsRequested = false;
private final Deque<String> packsToSent = new ArrayDeque<>(); private final Deque<String> packsToSent = new ArrayDeque<>();
private final Map<UUID, String> brokenResourcePacks = new HashMap<>();
private final CompressionStrategy compressionStrategy; private final CompressionStrategy compressionStrategy;
private SessionLoadResourcePacksEventImpl resourcePackLoadEvent; private SessionLoadResourcePacksEventImpl resourcePackLoadEvent;
@ -317,7 +301,7 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
ResourcePack pack = this.resourcePackLoadEvent.getPacks().get(packet.getPackId().toString()); ResourcePack pack = this.resourcePackLoadEvent.getPacks().get(packet.getPackId().toString());
PackCodec codec = pack.codec(); PackCodec codec = pack.codec();
// If a remote pack ends up here, that usually implies that a platform was not able to download the pack // If a remote pack ends up here, that usually implies that a client was not able to download the pack
if (codec instanceof UrlPackCodec urlPackCodec) { if (codec instanceof UrlPackCodec urlPackCodec) {
ResourcePackLoader.testUrlPack(urlPackCodec); ResourcePackLoader.testUrlPack(urlPackCodec);
} }

Datei anzeigen

@ -171,11 +171,8 @@ public class ResourcePackLoader implements RegistryLoader<Path, Map<String, Reso
*/ */
public static GeyserResourcePack readPack(GeyserUrlPackCodec codec) throws IllegalArgumentException { public static GeyserResourcePack readPack(GeyserUrlPackCodec codec) throws IllegalArgumentException {
Path path = codec.getFallback().path(); Path path = codec.getFallback().path();
ResourcePackManifest manifest = readManifest(path, codec.url()); ResourcePackManifest manifest = readManifest(path, codec.url());
String contentKey = codec.contentKey(); return new GeyserResourcePack(codec, manifest, codec.contentKey());
return new GeyserResourcePack(codec, manifest, contentKey);
} }
private static ResourcePackManifest readManifest(Path path, String packLocation) throws IllegalArgumentException { private static ResourcePackManifest readManifest(Path path, String packLocation) throws IllegalArgumentException {

Datei anzeigen

@ -172,8 +172,8 @@ force-resource-packs: true
# If you enter a link here, Geyser will download the resource pack once to check if it's in a valid format. # If you enter a link here, Geyser will download the resource pack once to check if it's in a valid format.
# See https://wiki.geysermc.org/geyser/packs for more info. # See https://wiki.geysermc.org/geyser/packs for more info.
resource-pack-urls: resource-pack-urls:
# Example: GeyserOptionalPack # GeyserOptionalPack
- "https://ci.opencollab.dev/job/GeyserMC/job/GeyserOptionalPack/job/master/lastSuccessfulBuild/artifact/GeyserOptionalPack.mcpack" - "https://download.geysermc.org/v2/projects/geyseroptionalpack/versions/latest/builds/latest/downloads/geyseroptionalpack"
# Allows Xbox achievements to be unlocked. # Allows Xbox achievements to be unlocked.
# THIS DISABLES ALL COMMANDS FROM SUCCESSFULLY RUNNING FOR BEDROCK IN-GAME, as otherwise Bedrock thinks you are cheating. # THIS DISABLES ALL COMMANDS FROM SUCCESSFULLY RUNNING FOR BEDROCK IN-GAME, as otherwise Bedrock thinks you are cheating.