From f38ef71de8a1ea4e84a1226b3e297ede0ce963b7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 20 Oct 2012 21:37:04 +1100 Subject: [PATCH] Micro optimize by using ubyte in skips --- pom.xml | 2 +- src/main/java/net/md_5/mc/protocol/PacketDefinitions.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 57293200..9dbf55f2 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ junit junit - 3.8.1 + 4.10 test diff --git a/src/main/java/net/md_5/mc/protocol/PacketDefinitions.java b/src/main/java/net/md_5/mc/protocol/PacketDefinitions.java index c3dcd20b..d5f230ba 100644 --- a/src/main/java/net/md_5/mc/protocol/PacketDefinitions.java +++ b/src/main/java/net/md_5/mc/protocol/PacketDefinitions.java @@ -1,6 +1,7 @@ package net.md_5.mc.protocol; import java.io.DataInput; +import java.io.DataInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -262,7 +263,7 @@ public class PacketDefinitions { final void skip(DataInput in, int len) throws IOException { for (int i = 0; i < len; i++) { - in.readByte(); + in.readUnsignedByte(); } }