/> />

Improving Connection Issues with RandomPatches

Mods & Plugins

·

Nov 2, 2024

RandomPatches is a Forge and Fabric mod that can aid with connection issues on modded servers, especially where the connection may be unstable such as on mobile data.

For instance, RandomPatches enables you to configure the conditions for Connection Timeouts and Packet Size Limits which in many cases allows for a much more stable connection.

Installing RandomPatches

The steps below will guide you through installing RandomPatches on both your Client and Server.

Installing RandomPatches on your Client

1:

Download RandomPatches for either Forge or Fabric.

Installing RandomPatches on your Server

1:

Download RandomPatches for either Forge or Fabric.

3:

Once installed, Start your server to generate the config files.

important

In many cases, simply installing RandomPatches will be enough to resolve connection issues!

Configuring RandomPatches

By default, RandomPatches will be pre-configured with more optimised connection settings than Vanilla Minecraft. However, there are many other settings you can configure to your liking.

1:

On your control panel, Stop your server.

2:

Access your server’s File Directory.

3:

Navigate to config and click on randompatches.toml.

Now that you have access to the configuration file, you can proceed to the next section of this article.


Modifying the Configuration File to Mitigate Connection Issues

There are numerous options within RandomPatches that can help to resolve any connection issues you are facing. The following steps will walk you through modifying the config file to improve your connection.

Important

We recommend using Ctrl+F to search for the config file settings below.

Configuring [connection_timeouts]

Navigate to the [connection_timeouts] section of the config file. There are three important options in this section, shown below:

  • read_timeout_seconds determines how long the server will wait after receiving no response while the player is connecting. Higher is better on unreliable connections (mobile data).

  • login_timeout_ticks determines how long the server will wait for a player to log in. Higher is better on slower connections.

  • keep_alive_timeout_seconds determines how long the server waits for a player to return a KeepAlive packet before disconnecting them. Higher is better on slower connections.

Adjust these values to your liking and click Save.

Configuring [packet_size_limits]

These options are less important to resolving connection issues than the above settings, however, in some cases, they can prove essential.

Simply navigate to the [packet_size_limits] section of the config file to begin adjusting these settings.

  • max_compressed_packet_size determines the largest packet that can be sent to or from the server. Some large datapack’s may prevent the player from connecting if this is set too low.

  • max_nbt_compound_tag_packet_size determines the maximum packet size of an NBT compound tag packet. Raising this value can help prevent players from being disconnected.

  • max_client_custom_payload_packet_size determines the maximum custom payload packet size. Adjusting this is much more relevant to large modded servers. Raising the value may help in preventing disconnects.

Adjust these values to your liking and click Save.


Other RandomPatches Settings

There are many other settings that can be adjusted (and further fixes pre-included) in RandomPatches which are not relevant to this article.

You can find a full list of these on the RandomPatches GitHub.


minecraft pfp
Jay Miller

Game Experience Engineer @ Shockbyte