更改ModID

同步Fabric Mod Template那边的Kotlin DSL官方配置
移除main入口类的`@Deprecated`标记
( 我当初为什么要弃用它?
补全ChangeLog.md
( 已经彻底忘记它的存在了
更新Github Action配置
更新Gradle版本

由于本次更改不存在对玩家具有实质影响的内容,故合并到下一个Mod版本内一并发布
This commit is contained in:
TheWhiteDog9487
2026-06-01 15:14:22 +08:00
parent 37722dcd8f
commit 5cb7a45ff4
21 changed files with 148 additions and 132 deletions

View File

@@ -8,30 +8,23 @@ on: [pull_request, push]
jobs: jobs:
build: build:
strategy: runs-on: ubuntu-24.04
matrix:
# Use these Java versions
java: [
25, # Current Java LTS
]
runs-on: ubuntu-22.04
steps: steps:
- name: checkout repository - name: checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: validate gradle wrapper - name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2 uses: gradle/actions/wrapper-validation@v6
- name: setup jdk ${{ matrix.java }} - name: setup jdk
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
java-version: ${{ matrix.java }} java-version: '25'
distribution: 'microsoft' distribution: 'microsoft'
- name: make gradle wrapper executable - name: make gradle wrapper executable
run: chmod +x ./gradlew run: chmod +x ./gradlew
- name: build - name: build
run: ./gradlew build run: ./gradlew build
- name: capture build artifacts - name: capture build artifacts
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with: with:
name: Artifacts name: Artifacts
path: build/libs/ path: build/libs/

View File

@@ -1,16 +1,17 @@
plugins { plugins {
id("net.fabricmc.fabric-loom") version "1.15-SNAPSHOT" id("net.fabricmc.fabric-loom")
id("maven-publish") `maven-publish`
} }
version = project.extra["mod_version"] as String version = providers.gradleProperty("mod_version").get()
group = project.extra["maven_group"] as String group = providers.gradleProperty("maven_group").get()
base {
archivesName.set(project.extra["archives_base_name"] as String)
}
repositories { repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven { maven {
name = "Xander Maven" name = "Xander Maven"
url = uri("https://maven.isxander.dev/releases") } url = uri("https://maven.isxander.dev/releases") }
@@ -25,68 +26,77 @@ loom {
splitEnvironmentSourceSets() splitEnvironmentSourceSets()
mods { mods {
create("twd-sasf") { register("serveraddressspacefix") {
sourceSet(sourceSets["main"]) sourceSet(sourceSets.main.get())
sourceSet(sourceSets["client"]) sourceSet(sourceSets.getByName("client"))
} }
} }
accessWidenerPath = file("src/main/resources/serveraddressspacefix.classtweaker")
accessWidenerPath = file("src/main/resources/twd-sasf.classtweaker")
} }
dependencies { dependencies {
// To change the versions see the gradle.properties file // To change the versions see the gradle.properties file
minecraft("com.mojang:minecraft:${project.extra["minecraft_version"]}") minecraft("com.mojang:minecraft:${providers.gradleProperty("minecraft_version").get()}")
implementation("net.fabricmc:fabric-loader:${project.extra["loader_version"]}")
implementation("net.fabricmc:fabric-loader:${providers.gradleProperty("loader_version").get()}")
// Fabric API. This is technically optional, but you probably want it anyway. // Fabric API. This is technically optional, but you probably want it anyway.
implementation("net.fabricmc.fabric-api:fabric-api:${project.extra["fabric_api_version"]}") implementation("net.fabricmc.fabric-api:fabric-api:${providers.gradleProperty("fabric_api_version").get()}")
// Uncomment the following line to enable the deprecated Fabric API modules. implementation("com.terraformersmc:modmenu:${providers.gradleProperty("modmenu_version").get()}")
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time. implementation("dev.isxander:yet-another-config-lib:${providers.gradleProperty("yacl_version").get()}")
// "modImplementation"("net.fabricmc.fabric-api:fabric-api-deprecated:${project.extra["fabric_version"]}")
implementation("com.terraformersmc:modmenu:${project.extra["modmenu_version"]}")
implementation("dev.isxander:yet-another-config-lib:${project.extra["yacl_version"]}")
} }
tasks.processResources { tasks.processResources {
inputs.property("version", project.version) val version = version
inputs.property("version", version)
filesMatching("fabric.mod.json") { filesMatching("fabric.mod.json") {
expand("version" to project.version) expand("version" to version)
} }
} }
tasks.withType<JavaCompile> { tasks.withType<JavaCompile>().configureEach {
options.release.set(25) options.release = 25
} }
java { java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar() withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_25 sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25 targetCompatibility = JavaVersion.VERSION_25
} }
tasks.jar { tasks.jar {
from("LICENSE") { val projectName = project.name
rename { "${it}_${project.base.archivesName.get()}" } } inputs.property("projectName", projectName)
// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.Jar:archiveFileName from("LICENSE") {
archiveFileName = "${project.base.archivesName.get()}-${project.version} mc${project.extra["compatible_with"]}.jar"} rename { "${it}_$projectName" }
}
archiveFileName = "ServerAddressSpaceFix-${project.version} mc${providers.gradleProperty("compatible_with").get()}.jar"
}
tasks.named<Jar>("sourcesJar") { tasks.named<Jar>("sourcesJar") {
archiveFileName = "${project.base.archivesName.get()}-${project.version} mc${project.extra["compatible_with"]}-sources.jar"} archiveFileName = "ServerAddressSpaceFix-${project.version} mc${providers.gradleProperty("compatible_with").get()}-sources.jar"}
// configure the maven publication
publishing { publishing {
publications { publications {
create<MavenPublication>("mavenJava") { register<MavenPublication>("mavenJava") {
from(components["java"]) from(components["java"])
} }
} }
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories { repositories {
// Add repositories to publish to here. // Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level. // Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for retrieving dependencies. // The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
} }
} }

View File

@@ -6,6 +6,7 @@ org.gradle.parallel=true
# check these on https://fabricmc.net/develop # check these on https://fabricmc.net/develop
minecraft_version=26.1 minecraft_version=26.1
loader_version=0.18.4 loader_version=0.18.4
loom_version=1.16-SNAPSHOT
# Mod Properties # Mod Properties
mod_version=0.2.2 mod_version=0.2.2

Binary file not shown.

View File

@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
networkTimeout=10000 networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

27
gradlew vendored
View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015-2021 the original authors. # Copyright © 2015 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum
@@ -112,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@@ -145,7 +146,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #( case $MAX_FD in #(
max*) max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045 # shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) || MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit" warn "Could not query maximum file descriptor limit"
esac esac
@@ -153,7 +154,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #( '' | soft) :;; #(
*) *)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045 # shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" || ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD" warn "Could not set maximum file descriptor limit to $MAX_FD"
esac esac
@@ -170,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java # For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" ) JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -202,16 +202,15 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command; # Collect all arguments for the java command:
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# shell script including quotes and variable substitutions, so put them in # and any embedded shellness will be escaped.
# double quotes to make sure that they get re-expanded; and # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# * put everything else in single quotes, so that it's not re-expanded. # treated as '${Hostname}' itself on the command line.
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
org.gradle.wrapper.GradleWrapperMain \
"$@" "$@"
# Stop when "xargs" is not available. # Stop when "xargs" is not available.

54
gradlew.bat vendored
View File

@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@@ -21,8 +23,8 @@
@rem @rem
@rem ########################################################################## @rem ##########################################################################
@rem Set local scope for the variables with windows NT shell @rem Set local scope for the variables, and ensure extensions are enabled
if "%OS%"=="Windows_NT" setlocal setlocal EnableExtensions
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@@ -43,13 +45,13 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail "%COMSPEC%" /c exit 1
:findJavaFromJavaHome :findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=% set JAVA_HOME=%JAVA_HOME:"=%
@@ -57,36 +59,24 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail "%COMSPEC%" /c exit 1
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* @rem endlocal doesn't take effect until after the line is parsed and variables are expanded
@rem which allows us to clear the local environment before executing the java command
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
:end :exitWithErrorLevel
@rem End local scope for the variables with windows NT shell @rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
if %ERRORLEVEL% equ 0 goto mainEnd "%COMSPEC%" /c exit %ERRORLEVEL%
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -4,6 +4,9 @@ pluginManagement {
name = "Fabric" name = "Fabric"
url = uri("https://maven.fabricmc.net/")} url = uri("https://maven.fabricmc.net/")}
mavenCentral() mavenCentral()
gradlePluginPortal() gradlePluginPortal() }
} plugins {
} id("net.fabricmc.fabric-loom") version providers.gradleProperty("loom_version") } }
// Should match your modid
rootProject.name = "serveraddressspacefix"

View File

@@ -13,13 +13,13 @@ public class ModMenu implements ModMenuApi {
@Override @Override
public ConfigScreenFactory<?> getModConfigScreenFactory() { public ConfigScreenFactory<?> getModConfigScreenFactory() {
return parent -> YetAnotherConfigLib.createBuilder() return parent -> YetAnotherConfigLib.createBuilder()
.title(Component.translatable("title.twd-sasf.config")) .title(Component.translatable("title.serveraddressspacefix.config"))
.category(ConfigCategory.createBuilder() .category(ConfigCategory.createBuilder()
.name(Component.translatable("config.twd-sasf.category.general")) .name(Component.translatable("config.serveraddressspacefix.category.general"))
.option(Option.<Boolean>createBuilder() .option(Option.<Boolean>createBuilder()
.name(Component.translatable("option.twd-sasf.ModEnabled")) .name(Component.translatable("option.serveraddressspacefix.ModEnabled"))
.binding(true, () -> Settings.ModEnabled, newVal -> Settings.ModEnabled = newVal) .binding(true, () -> Settings.ModEnabled, newVal -> Settings.ModEnabled = newVal)
.description(OptionDescription.of(Component.translatable("option.twd-sasf.ModEnabled.description"))) .description(OptionDescription.of(Component.translatable("option.serveraddressspacefix.ModEnabled.description")))
.controller(TickBoxControllerBuilder::create) .controller(TickBoxControllerBuilder::create)
.build()) .build())
.build()) .build())

View File

@@ -4,8 +4,9 @@ import net.fabricmc.api.ClientModInitializer;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import static xyz.thewhitedog9487.ServerAddressSpaceFix.ModID;
public class ServerAddressSpaceFixClient implements ClientModInitializer { public class ServerAddressSpaceFixClient implements ClientModInitializer {
public static final String ModID = "twd-sasf";
public static final Logger LOGGER = LoggerFactory.getLogger(ModID); public static final Logger LOGGER = LoggerFactory.getLogger(ModID);
@Override @Override

View File

@@ -5,12 +5,12 @@ import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@Deprecated
public class ServerAddressSpaceFix implements ModInitializer { public class ServerAddressSpaceFix implements ModInitializer {
// This logger is used to write text to the console and the log file. // This logger is used to write text to the console and the log file.
// It is considered best practice to use your mod id as the logger's name. // It is considered best practice to use your mod id as the logger's name.
// That way, it's clear which mod wrote info, warnings, and errors. // That way, it's clear which mod wrote info, warnings, and errors.
public static final Logger LOGGER = LoggerFactory.getLogger("twd-sasf"); public static final String ModID = "serveraddressspacefix";
public static final Logger LOGGER = LoggerFactory.getLogger(ModID);
@Override @Override
public void onInitialize() { public void onInitialize() {

View File

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 453 B

View File

@@ -0,0 +1,10 @@
{
"modmenu.nameTranslation.serveraddressspacefix": "ServerAddressSpaceFix",
"modmenu.descriptionTranslation.serveraddressspacefix": "Fixed the \"unknown host\" bug caused by the server address containing spaces at the beginning and end of the server address when adding a server or connecting directly\nTip: If you need to use the configuration menu, install the YetAnotherConfigLib mod",
"serveraddressspacefix.bilibili": "Bilibili",
"serveraddressspacefix.blog": "Blog",
"title.serveraddressspacefix.config": "ServerAddressSpaceFix",
"config.serveraddressspacefix.category.general": "General",
"option.serveraddressspacefix.ModEnabled": "Whether To Enable The Mod Feature",
"option.serveraddressspacefix.ModEnabled.description": "There is no need to restart the game, and the modification will take effect immediately after it is saved"
}

View File

@@ -0,0 +1,10 @@
{
"modmenu.nameTranslation.serveraddressspacefix": "服务器地址首尾空格修复",
"modmenu.descriptionTranslation.serveraddressspacefix": "修复添加服务器或直接连接时服务器地址首尾包含空格导致的“未知的主机”Bug\n提示如果需要使用配置菜单请安装YetAnotherConfigLib模组",
"serveraddressspacefix.bilibili": "哔哩哔哩主页",
"serveraddressspacefix.blog": "TheWhiteDog9487的博客",
"title.serveraddressspacefix.config": "服务器地址首尾空格修复",
"config.serveraddressspacefix.category.general": "通用",
"option.serveraddressspacefix.ModEnabled": "是否启用模组功能",
"option.serveraddressspacefix.ModEnabled.description": "无需重启游戏,修改并保存后立刻生效"
}

View File

@@ -1,10 +0,0 @@
{
"modmenu.nameTranslation.twd-sasf": "ServerAddressSpaceFix",
"modmenu.descriptionTranslation.twd-sasf": "Fixed the \"unknown host\" bug caused by the server address containing spaces at the beginning and end of the server address when adding a server or connecting directly\nTip: If you need to use the configuration menu, install the YetAnotherConfigLib mod",
"twd-sasf.bilibili": "Bilibili",
"twd-sasf.blog": "Blog",
"title.twd-sasf.config": "ServerAddressSpaceFix",
"config.twd-sasf.category.general": "General",
"option.twd-sasf.ModEnabled": "Whether To Enable The Mod Feature",
"option.twd-sasf.ModEnabled.description": "There is no need to restart the game, and the modification will take effect immediately after it is saved"
}

View File

@@ -1,10 +0,0 @@
{
"modmenu.nameTranslation.twd-sasf": "服务器地址首尾空格修复",
"modmenu.descriptionTranslation.twd-sasf": "修复添加服务器或直接连接时服务器地址首尾包含空格导致的“未知的主机”Bug\n提示如果需要使用配置菜单请安装YetAnotherConfigLib模组",
"twd-sasf.bilibili": "哔哩哔哩主页",
"twd-sasf.blog": "TheWhiteDog9487的博客",
"title.twd-sasf.config": "服务器地址首尾空格修复",
"config.twd-sasf.category.general": "通用",
"option.twd-sasf.ModEnabled": "是否启用模组功能",
"option.twd-sasf.ModEnabled.description": "无需重启游戏,修改并保存后立刻生效"
}

View File

@@ -1,6 +1,6 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"id": "twd-sasf", "id": "serveraddressspacefix",
"version": "${version}", "version": "${version}",
"name": "ServerAddressSpaceFix", "name": "ServerAddressSpaceFix",
"description": "服务器地址首尾空格修复", "description": "服务器地址首尾空格修复",
@@ -13,16 +13,16 @@
"issues": "https://github.com/TheWhiteDog9487/ServerAddressSpaceFix/issues" "issues": "https://github.com/TheWhiteDog9487/ServerAddressSpaceFix/issues"
}, },
"license": "WTFPL", "license": "WTFPL",
"icon": "assets/twd-sasf/icon.png", "icon": "assets/serveraddressspacefix/icon.png",
"environment": "client", "environment": "client",
"entrypoints": { "entrypoints": {
"client": [ "xyz.thewhitedog9487.ServerAddressSpaceFixClient" ], "client": [ "xyz.thewhitedog9487.ServerAddressSpaceFixClient" ],
"modmenu": [ "xyz.thewhitedog9487.ModMenu" ] "modmenu": [ "xyz.thewhitedog9487.ModMenu" ]
}, },
"mixins": [ "mixins": [
"twd-sasf.mixins.json", "serveraddressspacefix.mixins.json",
{ {
"config": "twd-sasf.client.mixins.json", "config": "serveraddressspacefix.client.mixins.json",
"environment": "client" "environment": "client"
} }
], ],
@@ -38,11 +38,11 @@
"custom": { "custom": {
"modmenu": { "modmenu": {
"links": { "links": {
"twd-sasf.bilibili": "https://space.bilibili.com/401746666", "serveraddressspacefix.bilibili": "https://space.bilibili.com/401746666",
"twd-sasf.blog": "www.thewhitedog9487.xyz"}, "serveraddressspacefix.blog": "www.thewhitedog9487.xyz"},
"update_checker": true}}, "update_checker": true}},
"contributors": [ "contributors": [
"JustAlittleWolf" "JustAlittleWolf"
], ],
"accessWidener": "twd-sasf.classtweaker" "accessWidener": "serveraddressspacefix.classtweaker"
} }

View File

@@ -1,3 +1,20 @@
# 0.2.2
时间2026 03 26
1. 新到Minecraft 26.1
2. 由于源码变更,更换了一个新的实现方案,稍微测试了一下没太大毛病,应该还行
# 0.2.1
时间2024 10 30
主要内容:
加大剂量,以前不会对服务器列表中已经保存的服务器地址进行处理,现在只要模组处于启用状态会直接对所有地址进行消除空格替换,确保不留死角。
说人话:未安装或未启用本模组时添加的服务器地址如果有空格,在启用本模组之后会在打开“多人游戏”窗口时被处理掉。
# 0.2.0
时间2024 06 14
主要内容:
1. 更新适配的游戏版本到1.21/1.21.x
2. 翻译键移除thewhitedog9487的命名空间
# 0.1.4 # 0.1.4
时间2024 01 15 时间2024 01 15
主要内容: 主要内容: