ServerAddressSpaceFix

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 0.2.3
本资源为搬运资源,原资源地址: https://modrinth.com/mod/serveraddressspacefix
资源信息

Minecraft 版本: 26.1 26.1.1 26.1.2

平台: fabric

标签: optimization

资源介绍
Note: This document was originally written in Chinese. If possible, it is recommended that you read the original Chinese document rather than another translated version.
简体中文 (GitHub)     简体中文 (Gitea)     English (GitHub)     English (Gitea)

Introduction

This mod aims to fix a bug that was reported on 26 November 2021 but has still not been fixed.
Bug tracker link

Features

If the server address you enter on the “Add Server” or “Direct Connect” screen contains spaces at the beginning, end, or in the middle, this mod will automatically remove them.
This prevents the “Unknown host” bug mentioned above.

Why this mod exists
        A few months ago, I wanted to play on a server. I copied the address from the server’s official website, pasted it into “Server Address”, and saved it — only to get “Unknown host”.
        No panic; this clearly meant DNS had not resolved the corresponding address, so I pinged it first.
        Ping could resolve the domain’s address, and then I suspected the Great Firewall might be doing something odd again, so I tested it with the tool on Chinaz, and every result matched mine.
        That was rather odd.
        After fiddling with it for a while, I found the problem.
        There was a space at the end of the server address I had copied.
        That was really infuriating. After messing around for a bit longer and confirming that the issue could be reproduced reliably, I submitted a bug to the tracker.
        And what do you think happened? 
        The issue I filed on the bug tracker
        The comment below
        An even earlier bug report
        My English is absolutely terrible, so I did not keep going; the problem description was written using translation tools.
        But deep down, I still thought this was rather absurd.
        Since your address is a String, how hard can it be to call trim afterwards?
        And as a player, when you tell me, “This was all your own carelessness; it does not even count as a bug,” I cannot accept that.
        So, this mod came to be.
    

Configuration

  • If you have version isolation enabled, it should be located at .minecraft\versions\<version name>\config\serveraddressspacefix.json5
  • If you do not have version isolation enabled, it should be at .minecraft\config\serveraddressspacefix.json5

This is just a regular JSON text file, except that JSON5 supports extra features such as comments.
All properties are annotated, including their purpose, range of values, type, default value, and so on.
You can open it in a plain text editor and modify it.
You can edit the config file while the game is running; once saved, the changes will be applied in-game automatically.

Known issues

All known issues have been fixed; if you find any new ones, please let me know.
If anyone is willing to help me fix the bug, please submit a PR ╰(°▽°)╯

Licence

I use the more radical WTFPL rather than MIT.

📥 下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Black Inventory Gui

价格:0 墨喵币
下载量:0

查看详情
CobbleTowns: Continued [Cobblemon 1.6.1]

价格:0 墨喵币
下载量:0

查看详情
Reinforced Obsidian

价格:0 墨喵币
下载量:0

查看详情
Boss Checklist

价格:0 墨喵币
下载量:0

查看详情