Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-09-08 22:02:50 +02:00
Fix invisible chests for 1.18 clients on very old servers
Fixes #2744
Dieser Commit ist enthalten in:
Ursprung
22d546edc0
Commit
02f9e87233
@ -118,11 +118,24 @@ public final class WorldPackets {
|
|||||||
final NumberTag yTag = tag.get("y");
|
final NumberTag yTag = tag.get("y");
|
||||||
final NumberTag zTag = tag.get("z");
|
final NumberTag zTag = tag.get("z");
|
||||||
final StringTag idTag = tag.get("id");
|
final StringTag idTag = tag.get("id");
|
||||||
if (xTag == null || yTag == null || zTag == null || idTag == null) {
|
if (xTag == null || yTag == null || zTag == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String id = idTag.getValue();
|
final String id;
|
||||||
|
if (idTag == null) {
|
||||||
|
// Thank you 1.8, very cool (might have to be moved somewhere else)
|
||||||
|
if (tag.get("Chest") instanceof StringTag) {
|
||||||
|
id = "minecraft:chest";
|
||||||
|
} else if (tag.get("EnderChest") instanceof StringTag) {
|
||||||
|
id = "minecraft:ender_chest";
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
id = idTag.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
final int typeId = protocol.getMappingData().blockEntityIds().getInt(id.replace("minecraft:", ""));
|
final int typeId = protocol.getMappingData().blockEntityIds().getInt(id.replace("minecraft:", ""));
|
||||||
if (typeId == -1) {
|
if (typeId == -1) {
|
||||||
Via.getPlatform().getLogger().warning("Unknown block entity: " + id);
|
Via.getPlatform().getLogger().warning("Unknown block entity: " + id);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren