mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2025-02-18 20:12:36 +01:00
fix byte expression
This commit is contained in:
parent
a1c6021da6
commit
0e84169f9e
@ -3,8 +3,8 @@ package gearth.protocol;
|
||||
import gearth.misc.StringifyAble;
|
||||
import gearth.services.packet_info.PacketInfo;
|
||||
import gearth.services.packet_info.PacketInfoManager;
|
||||
import gearth.services.packetrepresentation.InvalidPacketException;
|
||||
import gearth.services.packetrepresentation.PacketStringUtils;
|
||||
import gearth.services.packet_representation.InvalidPacketException;
|
||||
import gearth.services.packet_representation.PacketStringUtils;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package gearth.services.packetrepresentation;
|
||||
package gearth.services.packet_representation;
|
||||
|
||||
public class InvalidPacketException extends Exception {
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package gearth.services.packetrepresentation;
|
||||
package gearth.services.packet_representation;
|
||||
|
||||
import gearth.services.packet_info.PacketInfo;
|
||||
import gearth.services.packetrepresentation.prediction.StructurePredictor;
|
||||
import gearth.services.packet_representation.prediction.StructurePredictor;
|
||||
import gearth.protocol.HPacket;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
@ -231,7 +231,7 @@ public class PacketStringUtils {
|
||||
).append("\"}");
|
||||
else if (c == 'd') builder.append("{d:").append(p.readDouble()).append('}');
|
||||
else if (c == 'f') builder.append("{f:").append(p.readFloat()).append('}');
|
||||
else if (c == 'b') builder.append("{b:").append(p.readByte()).append('}');
|
||||
else if (c == 'b') builder.append("{b:").append((((int)(p.readByte())) + 256) % 256).append('}');
|
||||
else if (c == 'B') builder.append("{b:").append(p.readBoolean()).append('}');
|
||||
else if (c == 'l') builder.append("{l:").append(p.readLong()).append('}');
|
||||
else if (c == 'u') builder.append("{u:").append(p.readShort()).append('}');
|
||||
@ -279,6 +279,9 @@ public class PacketStringUtils {
|
||||
|
||||
HPacket p2 = fromString("{l}{h:4564}{i:3}{i:0}{s:\"hi\"}{i:0}{i:1}{s:\"how\"}{i:3}{b:1}{b:2}{b:3}{i:2}{s:\"r u\"}{i:1}{b:120}{i:2}{b:true}");
|
||||
System.out.println(p2);
|
||||
System.out.println(p2.toExpression());
|
||||
|
||||
System.out.println(new HPacket("{l}{h:4564}{b:180}").toExpression());
|
||||
|
||||
System.out.println(structureEquals(
|
||||
new HPacket("{l}{h:5}{s:\"asdas\"}"),
|
@ -1,7 +1,7 @@
|
||||
package gearth.services.packetrepresentation.prediction;
|
||||
package gearth.services.packet_representation.prediction;
|
||||
|
||||
import gearth.services.packetrepresentation.prediction.checkers.TypeChecker;
|
||||
import gearth.services.packetrepresentation.prediction.checkers.TypeCheckerProducer;
|
||||
import gearth.services.packet_representation.prediction.checkers.TypeChecker;
|
||||
import gearth.services.packet_representation.prediction.checkers.TypeCheckerProducer;
|
||||
import gearth.protocol.HPacket;
|
||||
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package gearth.services.packetrepresentation.prediction.checkers;
|
||||
package gearth.services.packet_representation.prediction.checkers;
|
||||
|
||||
import gearth.protocol.HPacket;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package gearth.services.packetrepresentation.prediction.checkers;
|
||||
package gearth.services.packet_representation.prediction.checkers;
|
||||
|
||||
import gearth.protocol.HPacket;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package gearth.services.packetrepresentation.prediction.checkers;
|
||||
package gearth.services.packet_representation.prediction.checkers;
|
||||
|
||||
import gearth.protocol.HPacket;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package gearth.services.packetrepresentation.prediction.checkers;
|
||||
package gearth.services.packet_representation.prediction.checkers;
|
||||
|
||||
import gearth.protocol.HPacket;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package gearth.services.packetrepresentation.prediction.checkers;
|
||||
package gearth.services.packet_representation.prediction.checkers;
|
||||
|
||||
import gearth.protocol.HPacket;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package gearth.services.packetrepresentation.prediction.checkers;
|
||||
package gearth.services.packet_representation.prediction.checkers;
|
||||
|
||||
import gearth.protocol.HPacket;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package gearth.services.packetrepresentation.prediction.checkers;
|
||||
package gearth.services.packet_representation.prediction.checkers;
|
||||
|
||||
import gearth.protocol.HPacket;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package gearth.services.packetrepresentation.prediction.checkers;
|
||||
package gearth.services.packet_representation.prediction.checkers;
|
||||
|
||||
import gearth.protocol.HPacket;
|
||||
|
Loading…
x
Reference in New Issue
Block a user