mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-22 12:16:21 +01:00
Timestamp is millis now, fix dimension storage
This commit is contained in:
parent
1e0c0ebb2d
commit
fdc73126f7
@ -218,7 +218,7 @@ public final class Protocol1_18_2To1_19 extends BackwardsProtocol<ClientboundPac
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.STRING); // Message
|
||||
create(Type.LONG, Instant.now().getEpochSecond()); // Timestamp
|
||||
create(Type.LONG, Instant.now().toEpochMilli()); // Timestamp
|
||||
create(Type.LONG, 0L); // Salt
|
||||
handler(wrapper -> {
|
||||
final String message = wrapper.get(Type.STRING, 0);
|
||||
|
@ -129,11 +129,11 @@ public final class EntityPackets1_19 extends EntityRewriter<Protocol1_18_2To1_19
|
||||
for (final Tag dimension : dimensions) {
|
||||
final CompoundTag dimensionCompound = (CompoundTag) dimension;
|
||||
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)) {
|
||||
final CompoundTag compoundTag = dimensionCompound.get("element");
|
||||
wrapper.write(Type.NBT, compoundTag);
|
||||
wrapper.write(Type.NBT, dimensionData);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user