From 2d2997df6cbef1ff7a8e4915e1b973dad7ac7671 Mon Sep 17 00:00:00 2001 From: USS-Shenzhou <969840795@qq.com> Date: Wed, 1 Jan 2025 14:01:50 +0800 Subject: [PATCH] fix --- gradle.properties | 2 +- .../signmeup/gui/map/WayPointsPanel.java | 20 ------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/gradle.properties b/gradle.properties index 64be68d..acc43c7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/src/main/java/org/teacon/signmeup/gui/map/WayPointsPanel.java b/src/main/java/org/teacon/signmeup/gui/map/WayPointsPanel.java index 3126976..9b58b5f 100644 --- a/src/main/java/org/teacon/signmeup/gui/map/WayPointsPanel.java +++ b/src/main/java/org/teacon/signmeup/gui/map/WayPointsPanel.java @@ -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; @@ -190,24 +188,6 @@ public static final class MultiVisualWaypoint extends VisualWaypoint { public MultiVisualWaypoint(MapPanel.InnerMapPanel map, Set 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"))))); }