Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
USS-Shenzhou committed Jan 1, 2025
1 parent 0c1a51a commit 2d2997d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod_name=Sign Me Up
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=BSD-3-Clause
# The mod version. See https://semver.org/
mod_version=0.6.19
mod_version=0.6.20
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
Expand Down
20 changes: 0 additions & 20 deletions src/main/java/org/teacon/signmeup/gui/map/WayPointsPanel.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package org.teacon.signmeup.gui.map;

import cn.ussshenzhou.t88.gui.util.HorizontalAlignment;
import cn.ussshenzhou.t88.gui.widegt.TImage;
import cn.ussshenzhou.t88.gui.widegt.TLabel;
import cn.ussshenzhou.t88.gui.widegt.TPanel;
import cn.ussshenzhou.t88.network.NetworkHelper;
import com.mojang.brigadier.tree.CommandNode;
Expand Down Expand Up @@ -190,24 +188,6 @@ public static final class MultiVisualWaypoint extends VisualWaypoint {
public MultiVisualWaypoint(MapPanel.InnerMapPanel map, Set<Waypoint> waypoints) {
super(IMAGE);
this.waypoints = waypoints;

int count = waypoints.size();
double x = 0D, z = 0D;
for (Waypoint waypoint : waypoints) {
x += waypoint.pos().x;
z += waypoint.pos().z;
}
Vector2i pos = map.worldToGui(x / count, z / count);
pos.sub(DOT_SIZE / 2, DOT_SIZE / 2);

TLabel number = new TLabel();
number.setAbsBounds(pos.x, pos.y, DOT_SIZE, DOT_SIZE);
number.setHorizontalAlignment(HorizontalAlignment.CENTER);
number.setFontSize(TLabel.STD_FONT_SIZE * 0.75f);
number.setText(Component.literal(String.valueOf(count)));
add(number);

setAbsBounds(pos.x, pos.y, DOT_SIZE, DOT_SIZE);
setTooltip(Tooltip.create(Component.literal(waypoints.stream().map(Waypoint::name).collect(Collectors.joining("\n")))));
}

Expand Down

0 comments on commit 2d2997d

Please sign in to comment.