Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit a9bdb36

Browse files
committed
clamp randomly generated stats
- update Trap RegEx
1 parent 5439dab commit a9bdb36

File tree

9 files changed

+10
-24
lines changed

9 files changed

+10
-24
lines changed

1.16.5/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/upgrades/TrapUpgrade.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
public class TrapUpgrade extends TeamUpgrade {
4141

4242
private final static Pattern[] REGEX = {
43-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
44-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
45-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
43+
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap.?\\s*$"),
4644
Pattern.compile("Trap was set (off)!"),
4745
};
4846

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/upgrades/TrapUpgrade.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
public class TrapUpgrade extends TeamUpgrade {
4141

4242
private final static Pattern[] REGEX = {
43-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
44-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
45-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
43+
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap.?\\s*$"),
4644
Pattern.compile("Trap was set (off)!"),
4745
};
4846

1.19.2/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/upgrades/TrapUpgrade.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
public class TrapUpgrade extends TeamUpgrade {
4141

4242
private final static Pattern[] REGEX = {
43-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
44-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
45-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
43+
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap.?\\s*$"),
4644
Pattern.compile("Trap was set (off)!"),
4745
};
4846

1.19.3/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/upgrades/TrapUpgrade.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
public class TrapUpgrade extends TeamUpgrade {
4141

4242
private final static Pattern[] REGEX = {
43-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
44-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
45-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
43+
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap.?\\s*$"),
4644
Pattern.compile("Trap was set (off)!"),
4745
};
4846

1.19.4/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/upgrades/TrapUpgrade.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
public class TrapUpgrade extends TeamUpgrade {
4141

4242
private final static Pattern[] REGEX = {
43-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
44-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
45-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
43+
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap.?\\s*$"),
4644
Pattern.compile("Trap was set (off)!"),
4745
};
4846

1.20/src/main/java/io/github/axolotlclient/mixin/PlayerListHudMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ public abstract class PlayerListHudMixin {
187187
return;
188188
}
189189

190-
render = HypixelAbstractionLayer.getPlayerLevel(playerListEntry2
190+
render = String.valueOf(HypixelAbstractionLayer.getPlayerLevel(playerListEntry2
191191
.getProfile().getId().toString().replace("-", ""),
192-
LevelHeadMode.BEDWARS.toString()) + "☆";
192+
LevelHeadMode.BEDWARS.toString()));
193193
} catch (Exception e) {
194194
return;
195195
}

1.20/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/upgrades/TrapUpgrade.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
public class TrapUpgrade extends TeamUpgrade {
4141

4242
private final static Pattern[] REGEX = {
43-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
44-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
45-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
43+
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap.?\\s*$"),
4644
Pattern.compile("Trap was set (off)!"),
4745
};
4846

1.8.9/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/upgrades/TrapUpgrade.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
public class TrapUpgrade extends TeamUpgrade {
4141

4242
private final static Pattern[] REGEX = {
43-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
44-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
45-
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap\\s*$"),
43+
Pattern.compile("^\\b[A-Za-z0-9_§]{3,16}\\b purchased (.+) Trap.?\\s*$"),
4644
Pattern.compile("Trap was set (off)!"),
4745
};
4846

common/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsPlayerStats.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static BedwarsPlayerStats generateFake(String name) {
9292
}
9393

9494
private static double getGaussian(Random random, float mean, float deviation){
95-
return random.nextGaussian()+mean*deviation;
95+
return Math.max(Math.min(random.nextGaussian()+mean*deviation, mean - deviation*3), mean + deviation*3);
9696
}
9797

9898
@Nullable

0 commit comments

Comments
 (0)