TheGrandCurator / Cheddar-BratWurst7

Minecraft Wurst Hacked Client v7
https://www.wurstclient.net/
GNU General Public License v3.0
6 stars 0 forks source link

Serverfinder revamp #66

Closed TheGrandCurator closed 2 years ago

TheGrandCurator commented 2 years ago

Original PR #319

Description

cropbob: General improvement of server finder netcode and addition of a few new server finder features.

Previously the server finder did not use an event-based pinging system and consequently needed a thread to be constantly spinning and checking for completed pings. This is no longer the case. The old server finder would also mark pings as done before they had time to fetch server metadata (version, player count, etc). The new event-based system will wait until requests are done fetching the metadata, or until they time out. Related to the previous point, filtering based on version and player count is now possible. UI has been added for version filtering. Multiple versions can be included in the filter as long as they are separated by semicolons. I didn't add player count filtering because the UI is already packed, but adding it would be trivial. Many server hosts will not only host sequentially over the last 2 octets of the IP but over ports as well. Port scanning is now available. If selected, it will scan a 200-port range about port 25565 on each scanned IP for which port 25565 is open. This is dependent on the host, but I've seen it lead to as many as 20x as many servers being found. It is now possible to save the servers in your server list as a plaintext file (servers.txt under the wurst folder in .minecraft) using the "Save to File" button. Duplicate entries are prevented in amortized O(n) time using a hashset. A message is displayed indicating how many new servers were saved to the list. Useful if you want to know whether you've already visited the servers that were found.