3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-07-30 00:58:13 +02:00

Enderchest and Invisible Players fix. (#506)

* Fix EnderChests not showing on legacy servers (Hypixel)
Fix NPCs/Players sometimes being invisible

* Remove unused import

* Fix standard
Dieser Commit ist enthalten in:
James Harrison 2020-05-08 03:49:44 +01:00 committet von GitHub
Ursprung f11bae0bf0
Commit 2355c503c9
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -63,8 +63,9 @@ public class JavaPlayerListEntryTranslator extends PacketTranslator<ServerPlayer
);
}
session.getEntityCache().addPlayerEntity(playerEntity);
playerEntity.setPlayerList(true);
playerEntity.setValid(true);
session.getEntityCache().addPlayerEntity(playerEntity);
translate.getEntries().add(SkinUtils.buildCachedEntry(entry.getProfile(), playerEntity.getGeyserId()));
} else {

Datei anzeigen

@ -3,7 +3,6 @@ package org.geysermc.connector.utils;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.Position;
import com.nukkitx.math.vector.Vector3i;
import com.nukkitx.protocol.bedrock.packet.BlockEntityDataPacket;
import org.geysermc.connector.network.session.GeyserSession;
import org.geysermc.connector.network.translators.Translators;
import org.geysermc.connector.network.translators.world.block.entity.BlockEntityTranslator;
@ -13,13 +12,16 @@ public class BlockEntityUtils {
private static final BlockEntityTranslator EMPTY_TRANSLATOR = Translators.getBlockEntityTranslators().get("Empty");
public static String getBedrockBlockEntityId(String id) {
// This is the only exception when it comes to block entity ids
// These are the only exceptions when it comes to block entity ids
if (id.contains("piston_head"))
return "PistonArm";
if (id.contains("trapped_chest"))
return "Chest";
if (id.contains("EnderChest"))
return "EnderChest";
id = id.toLowerCase()
.replace("minecraft:", "")
.replace("_", " ");