From 23648cf8bd8b500d896f4a481a965d10daf1deb2 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Mon, 28 Dec 2020 17:03:48 +0100 Subject: [PATCH] thanks 0xCC --- .../gearth/misc/packetrepresentation/PacketStringUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/G-Earth/src/main/java/gearth/misc/packetrepresentation/PacketStringUtils.java b/G-Earth/src/main/java/gearth/misc/packetrepresentation/PacketStringUtils.java index 42b5dc3..adbafe8 100644 --- a/G-Earth/src/main/java/gearth/misc/packetrepresentation/PacketStringUtils.java +++ b/G-Earth/src/main/java/gearth/misc/packetrepresentation/PacketStringUtils.java @@ -39,6 +39,9 @@ public class PacketStringUtils { packet = replaceAll(packet, "\\{i:(-?[0-9]+)}", m -> toString(ByteBuffer.allocate(4).putInt(Integer.parseInt(m.group(1))).array())); + packet = replaceAll(packet, "\\{l:(-?[0-9]+)}", + m -> toString(ByteBuffer.allocate(8).putLong(Integer.parseInt(m.group(1))).array())); + packet = replaceAll(packet, "\\{d:(-?[0-9]*\\.[0-9]*)}", m -> toString(ByteBuffer.allocate(8).putDouble(Double.parseDouble(m.group(1))).array()));