aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon
diff options
context:
space:
mode:
authorTrương Hoàng Long <longtruong2411@gmail.com>2023-03-30 04:41:29 +0200
committerGitHub <noreply@github.com>2023-03-30 04:41:29 +0200
commit3074075c1561163606f441f1a8f582b79082c311 (patch)
tree16471bf0b37058a12de339dc3544d8c4d8af47bb /src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon
parent71d1c240fbde9372afa8e2a2388218fff33eb04b (diff)
parent5e8a9fdac35232c5b8326250781cc38bb2eb88d2 (diff)
downloadSkyblocker-3074075c1561163606f441f1a8f582b79082c311.tar.gz
Skyblocker-3074075c1561163606f441f1a8f582b79082c311.tar.bz2
Skyblocker-3074075c1561163606f441f1a8f582b79082c311.zip
Merge pull request #123 from kevinthegreat1/master
Support for 1.19.4 & Cleanup
Diffstat (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon')
-rw-r--r--src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java12
-rw-r--r--src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Reparty.java23
2 files changed, 17 insertions, 18 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 c836e4f3..37320c92 100644
--- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java
+++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java
@@ -21,14 +21,18 @@ public class OldLever {
return FLOOR_SHAPE;
} else if (wallMountLocation == WallMountLocation.WALL) {
switch (direction) {
- case EAST:
+ case EAST -> {
return EAST_SHAPE;
- case WEST:
+ }
+ case WEST -> {
return WEST_SHAPE;
- case SOUTH:
+ }
+ case SOUTH -> {
return SOUTH_SHAPE;
- case NORTH:
+ }
+ case NORTH -> {
return NORTH_SHAPE;
+ }
}
}
return null;
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 19f13c32..42fcc36a 100644
--- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Reparty.java
+++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Reparty.java
@@ -1,8 +1,5 @@
package me.xmrvizzy.skyblocker.skyblock.dungeon;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
import me.xmrvizzy.skyblocker.SkyblockerMod;
import me.xmrvizzy.skyblocker.chat.ChatFilterResult;
import me.xmrvizzy.skyblocker.chat.ChatPatternListener;
@@ -13,6 +10,9 @@ import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.text.Text;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
public class Reparty extends ChatPatternListener {
private static final MinecraftClient client = MinecraftClient.getInstance();
private static final SkyblockerMod skyblocker = SkyblockerMod.getInstance();
@@ -26,17 +26,12 @@ public class Reparty extends ChatPatternListener {
public Reparty() {
super("^(?:You are not currently in a party\\.|Party (?:Membe|Moderato)rs(?: \\(([0-9]+)\\)|:( .*)))$");
this.repartying = false;
- ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> {
- dispatcher.register(ClientCommandManager.literal("rp").executes(context -> {
- if (!Utils.isOnSkyblock || this.repartying || client.player == null) return 0;
- this.repartying = true;
- client.player.networkHandler.sendCommand("p list");
- return 0;
- }));
- });
-
-
-
+ ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> dispatcher.register(ClientCommandManager.literal("rp").executes(context -> {
+ if (!Utils.isOnSkyblock || this.repartying || client.player == null) return 0;
+ this.repartying = true;
+ client.player.networkHandler.sendCommand("p list");
+ return 0;
+ })));
}
@Override