3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-25 07:40:08 +01:00

Timestamp is millis now, fix dimension storage

Dieser Commit ist enthalten in:
Nassim Jahnke 2022-05-13 10:11:26 +02:00
Ursprung 1e0c0ebb2d
Commit fdc73126f7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -218,7 +218,7 @@ public final class Protocol1_18_2To1_19 extends BackwardsProtocol<ClientboundPac
@Override @Override
public void registerMap() { public void registerMap() {
map(Type.STRING); // Message map(Type.STRING); // Message
create(Type.LONG, Instant.now().getEpochSecond()); // Timestamp create(Type.LONG, Instant.now().toEpochMilli()); // Timestamp
create(Type.LONG, 0L); // Salt create(Type.LONG, 0L); // Salt
handler(wrapper -> { handler(wrapper -> {
final String message = wrapper.get(Type.STRING, 0); final String message = wrapper.get(Type.STRING, 0);

Datei anzeigen

@ -129,11 +129,11 @@ public final class EntityPackets1_19 extends EntityRewriter<Protocol1_18_2To1_19
for (final Tag dimension : dimensions) { for (final Tag dimension : dimensions) {
final CompoundTag dimensionCompound = (CompoundTag) dimension; final CompoundTag dimensionCompound = (CompoundTag) dimension;
final StringTag nameTag = dimensionCompound.get("name"); final StringTag nameTag = dimensionCompound.get("name");
dimensionsMap.put(nameTag.getValue(), dimensionCompound); final CompoundTag dimensionData = dimensionCompound.get("element");
dimensionsMap.put(nameTag.getValue(), dimensionData);
if (!found && nameTag.getValue().equals(dimensionKey)) { if (!found && nameTag.getValue().equals(dimensionKey)) {
final CompoundTag compoundTag = dimensionCompound.get("element"); wrapper.write(Type.NBT, dimensionData);
wrapper.write(Type.NBT, compoundTag);
found = true; found = true;
} }
} }