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

Check for dimension equality after adding/replacing new fields

Dieser Commit ist enthalten in:
Nassim Jahnke 2022-07-28 11:47:12 +02:00
Ursprung e194d27bea
Commit a88747d904
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -218,10 +218,9 @@ public final class EntityPackets extends EntityRewriter<Protocol1_19To1_18_2> {
final CompoundTag dimensionCompound = (CompoundTag) dimension;
final CompoundTag element = dimensionCompound.get("element");
final String name = (String) dimensionCompound.get("name").getValue();
addMonsterSpawnData(element);
dimensionDataMap.put(name, new DimensionDataImpl(element));
dimensionsMap.put(element.clone(), name);
addMonsterSpawnData(element);
}
tracker(wrapper.user()).setDimensions(dimensionDataMap);
@ -310,6 +309,7 @@ public final class EntityPackets extends EntityRewriter<Protocol1_19To1_18_2> {
private static void writeDimensionKey(final PacketWrapper wrapper, final DimensionRegistryStorage registryStorage) throws Exception {
// Find dimension key by data
final CompoundTag currentDimension = wrapper.read(Type.NBT);
addMonsterSpawnData(currentDimension);
String dimensionKey = registryStorage.dimensionKey(currentDimension);
if (dimensionKey == null) {
if (!Via.getConfig().isSuppressConversionWarnings()) {