Skip to content

Commit de9b5b9

Browse files
committed
remove unnecessary common dependencies
1 parent 958e9ee commit de9b5b9

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

1.20/src/main/java/io/github/axolotlclient/waypoints/AxolotlClientWaypoints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static List<Waypoint> getCurrentWaypoints() {
133133
public static List<Waypoint> getCurrentWaypoints(boolean dimension) {
134134
var mc = Minecraft.getInstance();
135135
var pos = mc.player.position().toVector3f();
136-
return WAYPOINT_STORAGE.getCurrentlyAvailableWaypoints(dimension ? mc.level.dimension().location().toString() : null).stream()
136+
return WAYPOINT_STORAGE.getCurrentlyAvailableWaypoints(dimension ? mc.level.dimension().location().toString() : null)
137137
.sorted(Comparator.comparingDouble(w -> w.squaredDistTo(pos)))
138138
.toList();
139139
}

1.21.8/src/main/java/io/github/axolotlclient/waypoints/AxolotlClientWaypoints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static List<Waypoint> getCurrentWaypoints() {
123123
public static List<Waypoint> getCurrentWaypoints(boolean dimension) {
124124
var mc = Minecraft.getInstance();
125125
var pos = mc.player.position().toVector3f();
126-
return WAYPOINT_STORAGE.getCurrentlyAvailableWaypoints(dimension ? mc.level.dimension().location().toString() : null).stream()
126+
return WAYPOINT_STORAGE.getCurrentlyAvailableWaypoints(dimension ? mc.level.dimension().location().toString() : null)
127127
.sorted(Comparator.comparingDouble(w -> w.squaredDistTo(pos)))
128128
.toList();
129129
}

1.21/src/main/java/io/github/axolotlclient/waypoints/AxolotlClientWaypoints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static List<Waypoint> getCurrentWaypoints() {
133133
public static List<Waypoint> getCurrentWaypoints(boolean dimension) {
134134
var mc = Minecraft.getInstance();
135135
var pos = mc.player.position().toVector3f();
136-
return WAYPOINT_STORAGE.getCurrentlyAvailableWaypoints(dimension ? mc.level.dimension().location().toString() : null).stream()
136+
return WAYPOINT_STORAGE.getCurrentlyAvailableWaypoints(dimension ? mc.level.dimension().location().toString() : null)
137137
.sorted(Comparator.comparingDouble(w -> w.squaredDistTo(pos)))
138138
.toList();
139139
}

1.8.9/src/main/java/io/github/axolotlclient/waypoints/AxolotlClientWaypoints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static List<Waypoint> getCurrentWaypoints() {
132132
public static List<Waypoint> getCurrentWaypoints(boolean dimension) {
133133
var mc = Minecraft.getInstance();
134134
var player = mc.player;
135-
return WAYPOINT_STORAGE.getCurrentlyAvailableWaypoints(dimension ? String.valueOf(mc.world.dimension.getName()) : null).stream()
135+
return WAYPOINT_STORAGE.getCurrentlyAvailableWaypoints(dimension ? String.valueOf(mc.world.dimension.getName()) : null)
136136
.sorted(Comparator.comparingDouble(w -> w.squaredDistTo(player.x, player.y, player.z)))
137137
.toList();
138138
}

common/build.gradle.kts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ dependencies {
1616
})
1717
testRuntimeOnly(testCompileOnly(compileOnly("io.github.axolotlclient.AxolotlClient-config:AxolotlClientConfig-common:${project.property("config")}")!!)!!)
1818

19-
testRuntimeOnly(compileOnly("com.google.guava:guava:17.0")!!)
20-
testImplementation(compileOnly("org.apache.httpcomponents:httpclient:4.3.3")!!)
2119
testImplementation(compileOnly("com.google.code.gson:gson:2.10")!!)
22-
testRuntimeOnly(compileOnly("commons-io:commons-io:2.4")!!)
23-
testRuntimeOnly(compileOnly("org.apache.commons:commons-lang3:3.3.2")!!)
24-
testRuntimeOnly(compileOnly("org.lwjgl:lwjgl-glfw:3.3.2")!!)
20+
2521
compileOnly("org.joml:joml:1.10.8")
2622
compileOnly("org.slf4j:slf4j-api:1.7.36")
2723
}

common/src/main/java/io/github/axolotlclient/waypoints/waypoints/WaypointStorage.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.nio.file.Path;
2828
import java.util.ArrayList;
2929
import java.util.List;
30+
import java.util.stream.Stream;
3031

3132
import com.google.gson.Gson;
3233
import com.google.gson.GsonBuilder;
@@ -55,8 +56,9 @@ public int getWaypointCount() {
5556
return waypoints.size();
5657
}
5758

58-
public List<Waypoint> getCurrentlyAvailableWaypoints(String dimension) {
59-
return waypoints.stream().filter(w -> dimension == null || w.dimension().equals(dimension)).toList();
59+
public Stream<Waypoint> getCurrentlyAvailableWaypoints(String dimension) {
60+
if (dimension == null) return waypoints.stream();
61+
return waypoints.stream().filter(w -> w.dimension().equals(dimension));
6062
}
6163

6264
private Path getCurrentPath() {

0 commit comments

Comments
 (0)