thanks 0xCC

This commit is contained in:
sirjonasxx 2020-12-28 17:03:48 +01:00
parent a5f4abba80
commit 23648cf8bd

View File

@ -39,6 +39,9 @@ public class PacketStringUtils {
packet = replaceAll(packet, "\\{i:(-?[0-9]+)}", packet = replaceAll(packet, "\\{i:(-?[0-9]+)}",
m -> toString(ByteBuffer.allocate(4).putInt(Integer.parseInt(m.group(1))).array())); 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]*)}", packet = replaceAll(packet, "\\{d:(-?[0-9]*\\.[0-9]*)}",
m -> toString(ByteBuffer.allocate(8).putDouble(Double.parseDouble(m.group(1))).array())); m -> toString(ByteBuffer.allocate(8).putDouble(Double.parseDouble(m.group(1))).array()));