Skip to content
This repository was archived by the owner on Dec 15, 2024. It is now read-only.

Replacing Bedrock

64Terabytes edited this page May 29, 2023 · 4 revisions

Functions to replace bedrock in chunks have been added to make getting down to The Nether via digging possible. However, some functions can cause extreme lag and sometimes crashing on your server when used, resulting in a basically unplayable experience for your players. This guide will help you go for recommended ways to execute this.

The simple but annoying way

If all the steps below seem to advanced for you, this is a way you can do it. A command has been added to the plugin that allows you to replace bedrock in chunks manually, which can be run by server operators or anyone with the permission: dtn.admin, this is done by executing /replacebedrockinchunk in the area the player is standing in. When run, any bedrock will be replaced with the block specified in the plugins config.yml file. Make sure the block is exactly the same as the ones on this list.

# The block that replaces bedrock.
# YOU MUST COPY FROM THIS LIST: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
# Default: OBSIDIAN
bedrock_replacement: OBSIDIAN

The better way

The recommended way is to use a combination of chunk pre-generation, and world borders to prevent players from loading new chunks without your intervention. This will require you to install some chunk pre-generation plugins to accomplish this, I recommend using a combination of Chunky and ChunkyBorder. Your favorite alternative should also work just fine.

For a simple example, lets use Chunky to add a 1000 block border around spawn in the overworld and nether, and pre-generate all the chunks inside it. To start, make sure auto replacing bedrock is turned on by setting it to true in config.yml below.

# If true: All bedrock near the bottom of the world will automatically be replaced with set block when a new chunk is loaded.
# If false: Bedrock will be unchanged.
# Default: false
replace_bedrock_in_new_chunk: true

You can set the block that's replaced by using the same example above. If you join the server and start lagging heavily, just give it some time to settle down and continue.

Now assuming you already have Chunky and ChunkyBorder in your plugins folder and running, start by typing /chunky world YourWorldNameHere to select the world your working on. Then, type /chunky radius 1000 followed by /chunky border add, which will stop players from going outside the border you made in the overworld. Now the laggy part, type /chunky start to begin the pre-loading. Your server will start lagging and most likely kick off any players currently playing on it, that's okay. Now is a good idea to keep an eye on your servers console every now and then to see how things are going with the pre-loading, and start your server back up if it crashes. If the server restarts itself and chunky doesn't resume preloading automatically, type /chunky continue to continue from it's last save. Chunky will periodically send you messages like this to tell you how it's going:

[17:57:03] [Chunky-world Thread/INFO]: [Chunky] Task running for world. Processed: 971 chunks (6.02%), ETA: 0:00:25, Rate: 590.0 cps, Current: 16, 6

The speed will vary based on how powerful your server is, and how much your rendering.

While the preloading is going, you will see alot of messages like these in your console:

[17:57:13] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 33615ms or 672 ticks behind 
[17:57:13] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH  - git-Paper-538 (MC: 1.19.4) ---
[17:57:13] [Paper Watchdog Thread/ERROR]: The server has not responded for 10 seconds! Creating thread dump
[17:57:13] [Paper Watchdog Thread/ERROR]: ------------------------------
[17:57:13] [Paper Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[17:57:13] [Paper Watchdog Thread/ERROR]: [ChunkTaskScheduler] Chunk wait task info below: 
[17:57:13] [Paper Watchdog Thread/ERROR]: [ChunkTaskScheduler] Chunk wait: [( 11,19) in 'world']
[17:57:13] [Paper Watchdog Thread/ERROR]: ------------------------------
[17:57:13] [Paper Watchdog Thread/ERROR]: Current Thread: Server thread
[17:57:13] [Paper Watchdog Thread/ERROR]: 	PID: 27 | Suspended: false | Native: false | State: TIMED_WAITING
[17:57:13] [Paper Watchdog Thread/ERROR]: 	Stack:
[17:57:13] [Paper Watchdog Thread/ERROR]: 		LOTS OF SCARY TEXT WILL BE HERE
[17:57:13] [Paper Watchdog Thread/ERROR]: ------------------------------
[17:57:13] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---

These are completely normal, just be patient and wait for chunky to do it's job.

Once chunky has finished, we need to repeat these steps for the nether. Start typing /chunky world YourWorldNameHere_nether, followed by /chunky radius 1000 and /chunky border add, which will add the same border to the nether. Now type /chunky start again to start pre-loading the nether, keep an eye on your server console while chunky does it's job until finished.

Once done, you should be able to explore your world with less lag then you started with, and digging down in any new chunks you will find bedrock has been turned to the block you set. If there is any chunks that have already been loaded by the server that didn't change, stand in the chunk you want to fix and run: /replacebedrockinchunk.

For more info on Chunky and ChunkyBorder, look through their download pages linked above.

Clone this wiki locally