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:
Ursprung
1e0c0ebb2d
Commit
fdc73126f7
@ -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);
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren