3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-10-03 00:50:05 +02:00

Fix join game reading

Dieser Commit ist enthalten in:
Nassim Jahnke 2022-05-23 19:32:54 +02:00
Ursprung 08a583526e
Commit dc9fe10779
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -135,7 +135,7 @@ public final class EntityPackets1_19 extends EntityRewriter<Protocol1_18_2To1_19
final CompoundTag dimensionCompound = (CompoundTag) dimension;
final StringTag nameTag = dimensionCompound.get("name");
final CompoundTag dimensionData = dimensionCompound.get("element");
dimensionsMap.put(nameTag.getValue(), dimensionData);
dimensionsMap.put(nameTag.getValue(), dimensionData.clone());
if (!found && nameTag.getValue().equals(dimensionKey)) {
wrapper.write(Type.NBT, dimensionData);
@ -156,6 +156,7 @@ public final class EntityPackets1_19 extends EntityRewriter<Protocol1_18_2To1_19
map(Type.VAR_INT); // Simulation distance
map(Type.BOOLEAN); // Reduced debug info
map(Type.BOOLEAN); // Show death screen
map(Type.BOOLEAN); // Debug
map(Type.BOOLEAN); // Flat
read(Type.OPTIONAL_GLOBAL_POSITION); // Read last death location
handler(worldDataTrackerHandler(1));

Datei anzeigen

@ -29,7 +29,8 @@ public final class DimensionRegistryStorage implements StorableObject {
private Map<String, CompoundTag> dimensions = new HashMap<>();
public @Nullable CompoundTag dimension(final String dimensionKey) {
return dimensions.get(dimensionKey);
final CompoundTag compoundTag = dimensions.get(dimensionKey);
return compoundTag != null ? compoundTag.clone() : null;
}
public void setDimensions(final Map<String, CompoundTag> dimensions) {