Skip to content

Commit 4a22c65

Browse files
committed
fix offline mode bug (null uuid parsed)
rename 1.19.1 to 1.19.1 / 1.19.2
1 parent 2559c3c commit 4a22c65

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Minecraft 1.8 - 1.19 AFK Fishing bot
1+
Minecraft 1.8 - 1.19.2 AFK Fishing bot
22
=============
33
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/22e2d15847fb4deaaed97efc3b755ebd)](https://www.codacy.com/gh/MrKinau/FishingBot/dashboard?utm_source=github.com&utm_medium=referral&utm_content=MrKinau/FishingBot&utm_campaign=Badge_Grade)
44
[![GitHub issues](https://img.shields.io/github/issues/MrKinau/FishingBot)](https://github.com/MrKinau/FishingBot/issues)
@@ -68,6 +68,8 @@ A list of all commands can be found in the wiki ([here](https://github.com/MrKin
6868
- 1.18.1
6969
- 1.18.2
7070
- 1.19
71+
- 1.19.1
72+
- 1.19.2
7173

7274
## Discord
7375
To follow the project, get support or request features or bugs you can join my Discord: https://discord.gg/xHpCDYf

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<groupId>systems.kinau</groupId>
1313
<artifactId>FishingBot</artifactId>
14-
<version>2.8.0</version>
14+
<version>2.9.1</version>
1515
<name>FishingBot</name>
1616
<description>An AFK fishing bot for Minecraft</description>
1717

src/main/java/systems/kinau/fishingbot/network/protocol/ProtocolConstants.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public static String getVersionString(int protocolId) {
118118
case MINECRAFT_1_18: return "1.18 / 1.18.1";
119119
case MINECRAFT_1_18_2: return "1.18.2";
120120
case MINECRAFT_1_19: return "1.19";
121-
case MINECRAFT_1_19_1: return "1.19.1";
121+
case MINECRAFT_1_19_1: return "1.19.1 / 1.19.2";
122122
default: return "Unknown version";
123123
}
124124
}
@@ -161,7 +161,9 @@ public static int getProtocolId(String versionString) {
161161
case "1.18 / 1.18.1": return MINECRAFT_1_18;
162162
case "1.18.2": return MINECRAFT_1_18_2;
163163
case "1.19": return MINECRAFT_1_19;
164-
case "1.19.1": return MINECRAFT_1_19_1;
164+
case "1.19.1":
165+
case "1.19.2":
166+
case "1.19.1 / 1.19.2": return MINECRAFT_1_19_1;
165167
default: return MINECRAFT_1_8;
166168
}
167169
}

src/main/java/systems/kinau/fishingbot/network/protocol/login/PacketOutLoginStart.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void write(ByteArrayDataOutput out, int protocolId) {
4747
.replaceFirst(
4848
"(\\p{XDigit}{8})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}+)", "$1-$2-$3-$4-$5"
4949
));
50-
} catch (IllegalArgumentException ignore) {
50+
} catch (Exception ignore) {
5151
}
5252
out.writeBoolean(uuid != null);
5353
if (uuid != null) {

src/main/java/systems/kinau/fishingbot/network/protocol/play/PacketOutChatMessage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void write(ByteArrayDataOutput out, int protocolId) {
3535
.replaceFirst(
3636
"(\\p{XDigit}{8})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}+)", "$1-$2-$3-$4-$5"
3737
));
38-
} catch (IllegalArgumentException ignore) {}
38+
} catch (Exception ignore) {}
3939

4040
if (keys == null || signer == null) {
4141
out.writeLong(System.currentTimeMillis()); // timestamp

0 commit comments

Comments
 (0)