aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon
diff options
context:
space:
mode:
authorSerhan <serhanduzce@gmail.com>2022-06-16 12:34:35 +0300
committerGitHub <noreply@github.com>2022-06-16 12:34:35 +0300
commit5f323aaf6f26aba3a2f33eea9ed88e1ee40cc4f9 (patch)
tree856b91f6a6c8632b24ef05d1898c0ba1f847585b /src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon
parent4afe31dca21b94c102099549800d4fa1cb1bbe6d (diff)
parent6c268d4f5b5d9447d9cd7ca4cb5afe2066198c97 (diff)
downloadSkyblocker-5f323aaf6f26aba3a2f33eea9ed88e1ee40cc4f9.tar.gz
Skyblocker-5f323aaf6f26aba3a2f33eea9ed88e1ee40cc4f9.tar.bz2
Skyblocker-5f323aaf6f26aba3a2f33eea9ed88e1ee40cc4f9.zip
Merge branch 'SkyblockerMod:master' into master
Diffstat (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon')
-rw-r--r--src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java2
-rw-r--r--src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Reparty.java43
-rw-r--r--src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java17
3 files changed, 25 insertions, 37 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java
index fc26f913..c836e4f3 100644
--- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java
+++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java
@@ -14,7 +14,7 @@ public class OldLever {
protected static final VoxelShape WEST_SHAPE;
public static VoxelShape getShape(WallMountLocation wallMountLocation, Direction direction) {
- if (!SkyblockerConfig.get().locations.dungeons.oldLevers)
+ if (!SkyblockerConfig.get().general.hitbox.oldLeverHitbox)
return null;
if (wallMountLocation == WallMountLocation.FLOOR) {
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Reparty.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Reparty.java
index c3da7c18..3af82b6e 100644
--- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Reparty.java
+++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Reparty.java
@@ -16,7 +16,7 @@ public class Reparty extends ChatPatternListener {
private static final MinecraftClient client = MinecraftClient.getInstance();
private static final SkyblockerMod skyblocker = SkyblockerMod.getInstance();
public static final Pattern PLAYER = Pattern.compile(" ([a-zA-Z0-9_]{2,16}) ●");
- private static final int BASE_DELAY = 20;
+ private static final int BASE_DELAY = 10;
private String[] players;
private int playersSoFar;
@@ -24,12 +24,11 @@ public class Reparty extends ChatPatternListener {
public Reparty() {
super("^(?:You are not currently in a party\\.|Party (?:Membe|Moderato)rs(?: \\(([0-9]+)\\)|:( .*)))$");
- repartying = false;
+ this.repartying = false;
ClientCommandManager.DISPATCHER.register(
ClientCommandManager.literal("rp").executes(context -> {
- if (!Utils.isOnSkyblock || repartying || client.player == null)
- return 0;
- repartying = true;
+ if (!Utils.isOnSkyblock || this.repartying || client.player == null) return 0;
+ this.repartying = true;
client.player.sendChatMessage("/p list");
return 0;
})
@@ -38,52 +37,42 @@ public class Reparty extends ChatPatternListener {
@Override
public ChatFilterResult state() {
- return repartying ? ChatFilterResult.FILTER : ChatFilterResult.PASS;
+ return this.repartying ? ChatFilterResult.FILTER : ChatFilterResult.PASS;
}
@Override
public boolean onMatch(Text message, Matcher matcher) {
if (matcher.group(1) != null) {
- playersSoFar = 0;
- players = new String[Integer.parseInt(matcher.group(1)) - 1];
+ this.playersSoFar = 0;
+ this.players = new String[Integer.parseInt(matcher.group(1)) - 1];
} else if (matcher.group(2) != null) {
Matcher m = PLAYER.matcher(matcher.group(2));
while (m.find()) {
- players[playersSoFar++] = m.group(1);
+ this.players[playersSoFar++] = m.group(1);
}
} else {
- repartying = false;
+ this.repartying = false;
return false;
}
- if (playersSoFar == players.length)
- reparty();
+ if (this.playersSoFar == this.players.length) reparty();
return false;
}
private void reparty() {
ClientPlayerEntity playerEntity = client.player;
if (playerEntity == null) {
- repartying = false;
+ this.repartying = false;
return;
}
sendCommand(playerEntity, "/p disband", 1);
- StringBuilder sb = new StringBuilder();
- int invites = (players.length - 1) / 5 + 1;
- for (int i = 0; i < invites; i++) {
- sb.setLength(0);
- sb.append("/p invite");
- for (int j = 0; j < 5 && i * 5 + j < players.length; j++) {
- sb.append(' ');
- sb.append(players[i * 5 + j]);
- }
- sendCommand(playerEntity, sb.toString(), i + 2);
+ for (int i = 0; i < this.players.length; ++i) {
+ String command = "/p invite " + this.players[i];
+ sendCommand(playerEntity, command, i + 2);
}
- skyblocker.scheduler.schedule(() -> repartying = false, invites + 2);
+ skyblocker.scheduler.schedule(() -> this.repartying = false, this.players.length + 2);
}
private void sendCommand(ClientPlayerEntity player, String command, int delay) {
- skyblocker.scheduler.schedule(() ->
- player.sendChatMessage(command), delay * BASE_DELAY
- );
+ skyblocker.scheduler.schedule(() -> player.sendChatMessage(command), delay * BASE_DELAY);
}
}
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java
index 673797d4..7f22f59b 100644
--- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java
+++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java
@@ -60,16 +60,15 @@ public class Trivia extends ChatPatternListener {
answers.put("What is the status of Thorn?", new String[]{"Shaman Necromancer"});
answers.put("What is the status of Livid?", new String[]{"Master Necromancer"});
answers.put("What is the status of Sadan?", new String[]{"Necromancer Lord"});
- answers.put("What is the status of Maxor?", new String[]{"Young Wither"});
- answers.put("What is the status of Goldor?", new String[]{"Wither Soldier"});
- answers.put("What is the status of Storm?", new String[]{"Elementalist"});
- answers.put("What is the status of Necron?", new String[]{"Wither Lord"});
- answers.put("How many total Fairy Souls are there?", new String[]{"227 Fairy Souls"});
+ answers.put("What is the status of Maxor?", new String[]{"The Wither Lords"});
+ answers.put("What is the status of Goldor?", new String[]{"The Wither Lords"});
+ answers.put("What is the status of Storm?", new String[]{"The Wither Lords"});
+ answers.put("What is the status of Necron?", new String[]{"The Wither Lords"});
+ answers.put("How many total Fairy Souls are there?", new String[]{"238 Fairy Souls"});
answers.put("How many Fairy Souls are there in Spider's Den?", new String[]{"19 Fairy Souls"});
answers.put("How many Fairy Souls are there in The End?", new String[]{"12 Fairy Souls"});
- answers.put("How many Fairy Souls are there in The Barn?", new String[]{"7 Fairy Souls"});
- answers.put("How many Fairy Souls are there in Mushroom Desert?", new String[]{"13 Fairy Souls"});
- answers.put("How many Fairy Souls are there in Blazing Fortress?", new String[]{"19 Fairy Souls"});
+ answers.put("How many Fairy Souls are there in The Farming Islands?", new String[]{"20 Fairy Souls"});
+ answers.put("How many Fairy Souls are there in Crimson Isle?", new String[]{"29 Fairy Souls"});
answers.put("How many Fairy Souls are there in The Park?", new String[]{"11 Fairy Souls"});
answers.put("How many Fairy Souls are there in Jerry's Workshop?", new String[]{"5 Fairy Souls"});
answers.put("How many Fairy Souls are there in Hub?", new String[]{"79 Fairy Souls"});
@@ -83,7 +82,7 @@ public class Trivia extends ChatPatternListener {
answers.put("What is the name of the person that upgrades pets?", new String[]{"Kat"});
answers.put("What is the name of the lady of the Nether?", new String[]{"Elle"});
answers.put("Which villager in the Village gives you a Rogue Sword?", new String[]{"Jamie"});
- answers.put("How many unique minions are there?", new String[]{"55 Minions"});
+ answers.put("How many unique minions are there?", new String[]{"58 Minions"});
answers.put("Which of these enemies does not spawn in the Spider's Den?", new String[]{"Zombie Spider", "Cave Spider", "Wither Skeleton",
"Dashing Spooder", "Broodfather", "Night Spider"});
answers.put("Which of these monsters only spawns at night?", new String[]{"Zombie Villager", "Ghast"});