3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-28 09:00:09 +01:00

Fix named sound packets and old block entities

Dieser Commit ist enthalten in:
Nassim Jahnke 2021-09-16 15:41:14 +02:00
Ursprung 9ffa737a4d
Commit 5a90c8374c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
3 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -42,7 +42,7 @@ public final class Protocol1_18To1_17_1 extends AbstractProtocol<ClientboundPack
final SoundRewriter soundRewriter = new SoundRewriter(this);
soundRewriter.registerSound(ClientboundPackets1_17_1.SOUND);
soundRewriter.registerSound(ClientboundPackets1_17_1.NAMED_SOUND);
soundRewriter.registerSound(ClientboundPackets1_17_1.ENTITY_SOUND);
final TagRewriter tagRewriter = new TagRewriter(this);
tagRewriter.registerGeneric(ClientboundPackets1_17_1.TAGS);

Datei anzeigen

@ -108,6 +108,10 @@ public final class WorldPackets {
final List<BlockEntity> blockEntities = new ArrayList<>(oldChunk.getBlockEntities().size());
for (final CompoundTag tag : oldChunk.getBlockEntities()) {
if (!tag.contains("x") || !tag.contains("y") || !tag.contains("z") || !tag.contains("id")) {
continue;
}
final int x = ((NumberTag) tag.get("x")).asInt();
final int z = ((NumberTag) tag.get("z")).asInt();
final byte packedXZ = (byte) ((x & 15) << 4 | (z & 15));

Datei anzeigen

@ -4,7 +4,6 @@ enableFeaturePreview("VERSION_CATALOGS")
dependencyResolutionManagement {
// configures repositories for all projects
repositories {
mavenLocal()
maven("https://repo.viaversion.com")
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://oss.sonatype.org/content/repositories/snapshots/")