Java Edition.png

Java Edition:Chunk Regeneration

From Minecraft Discontinued Features Wiki
(Redirected from Java Edition:Chunk Deletion)
Jump to navigation Jump to search
SavestatingCheckerboard.png

Chunk Regeneration

TNT 2.png
Warning: Destruction 
This feature can destroy parts of your world. Perform at your own risk.
This article is about regenerating a chunk freshly from world generation. For other uses, see Chunk.

Various methods exist to allow a chunk to be regenerated freshly from world generation as if it never existed.

Methods

Air Item

Barrier.png
Warning: Game Crash 
This feature can crash your game. Perform at your own risk.

Picking up the air item in 13w01a will crash the game. After reloading, the chunk where the air item was previously will be regenerated.

Jukebox

Destroying empty jukebox that was previously saved and reloading the world will cause chunk it's in to regenerate from 1.4.7 to 13w02b.[1][test]

Horse Saddles

Updating horse saddle items in entity form from 13w16a - 13w17a to 13w18a - 1.7 regenerates chunk. In 1.7.1 to 14w31, it will instead be converted to stone.

Loading Block Items

Barrier.png
Warning: Game Crash 
This feature can crash your game. Perform at your own risk.

From 13w37a to 1.7 loading any block item as an entity that was removed in 13w37a, will cause the chunk to regenerate. This can still be done without upgrading. Player must mine lit redstone lamp with Silk Touch pickaxe and exit the game at the same tick the lamp broke. After relogging the chunk will get regenerated.

tile.air.name

In 13w38b when player kills a non-baby villager, bat, silverfish, or size 2 and 3 slimes they drop tile.air.name. If updated in an item entity form to 1.7 and below, they regenerate chunk they were in.

Villager With Cooked Fished Trade

Updating villagers from 1.7.10[test]-1.7.10 [test] to 1.9.1-pre3 incorrectly converts cooked fish .[2] Villager with this trade updated to 1.14[test]-1.16[test] regenerates the chunk they are in.

Enderman Holding IDV Container

In 14w28a (1.8 snapshot), upgrading an enderman holding certain data values on some blocks resulted in the chunk being regenerated. The block IDs 54 (chest), 61 (furnace), or 62 (lit furnace) with data value 0, 1, 6, 7, 12, or 13 caused this regeneration. In order to obtain this enderman, first, indev transmutation could be used from Indev 0.31 20100124 to Indev 0.31 20100205 or [[Java Edition:Block Transmutation#Preserved Data Value Transmutation|preserved data value transmutation]] could be used in Infdev 20100327, in order to get the data value onto these blocks. Random indev transmutation works on all three of the blocks while preserved data value transmutation only works on chests because furnaces & lit furnaces reset the data value. Once the correct data value is obtained on one of these blocks, it must be updated to Beta 1.8 Pre-release to Beta 1.8 Pre-release 2 ;) in order for the enderman to pick up the block. Now if that enderman is updated to 14w28a, it will cause the chunk it is inside to regenerate.

Enderman Spawn Egg

Upgrading an enderman spawn egg from version range 1.12[test]-1.12[test] to 1.13-pre5[test]-1.13-pre5[test] will regenerate the chunk it's in.[3]

Large Sign (Singleplayer Only)

This method works from 1.14 to 1.19 Pre-release 4.
Using a font resource pack where you change the font size to 0.0001 you are able to paste a string that's at least 65523 characters long into the sign. This will cause an error to be thrown while writing NBT, which will cause an incomplete write of the chunk's data. When the game detects this upon reloading, it is unable to correctly load the chunk, and will fall back to regenerating it. [4]
This was patched in the result of fixing [5].

One can find a premade resource pack to change the font size to 0.0001 here.

Due to the fix of a bug[6] in 22w03a (a 1.18.2 snapshot), the zero width non-joiner character (Unicode U+200C) was given a default width of 0, allowing this method to be done without the use of a resource pack. You can copy this character here.

Warning

  • Sign with this many characters creates a lot of lag.
  • Trying to perform this in multiplayer causes the player to get kicked from the server and does not save the text on the sign.
  • Attempting to perform this from 19w04a to 19w04b crashes the game while reloading chunks where the sign is in and from 19w05a to 1.14 Pre-Release 5 causes the reloading process to get stuck at a dead point.

Written Books and JSON Abuse

From 1.14 to 21w20a (1.17 snapshot), one could abuse cross server packets to create books with invalid NBT tags that would throw an exception upon attempting to write to disk.

Cross server packets rely on a bug[7] introduced in 14w02a (1.8 snapshot) that exists within the server connection code that allows one to send and receive packets to and from multiple servers. If a connection is initiated to a multiplayer server, canceled quickly, and another server is joined, the client will be connected to two servers at once. The client will send packets to one, but receive packets from both. To be able to reasonably pull off the race condition, one must have a fair amount of lag (500+ms) in the connection to both servers. Programs such as clumsy can be used to create artificial network lag.

Utilizing this exploit, one can override their player's inventory client side in one server with a second server's inventory, allowing for any book to be spoofed client side, as the book from the second server does not have to be made with legitimate methods (i.e. you can use commands to create it to bypass the client GUI limits). Opening the GUI of the spoofed book, making an edit, and clicking "Done" will send the spoofed book's data to the server, regardless of it breaking the client side limitations.

To create a book that throws this error, specific characters must be placed into a single page of the spoofed book that will be escaped in JSON parsing into more than 65,536 characters. Such characters include the Unicode Control characters (codepoints U+0000 to U+001F) and Unicode characters with codepoints greater than U+07FF. Each control character will be parsed into 6x more characters, and each character with a code point greater than U+07FF will be parsed into 3x more characters. By placing between 21,846 and 32,767 Unicode characters with codepoints greater that U+07FF into a single book page, upon signing, a written book with invalid NBT will be created. By quickly pressing Q after signing the spoofed book before being kicked from the game for receiving invalid packets from the book, it may be dropped as an item entity, resulting in the chunk's regeneration due to a failed NBT write.

A video demonstrating this can be found here.

Beehives

By filling a chunk with hundreds of beehives that have blocked entrances, and they are attempting to exit the hive (must be day, not raining, etc.) from 19w34a (1.15 snapshot) to 1.17.1[test], unloading the chunk can cause a ConcurrentModificationException due to the bee hives attempting to modify the entityData tag of the chunk while the game is saving it on a separate thread. This will lead to the chunk regenerating.

Video by Comedy here.

Out Of Memory Save Error

Barrier.png
Warning: Game Crash 
This feature can crash your game. Perform at your own risk.

This method works from 1.14[test] to 24w38a (present). By filling a chunk with ~200-300 megabytes of data and saving and quitting the world, if the game's RAM is high enough to create the save file, but not to copy it again into memory, a specific error may be produced. This error occurs during the write of the chunk's NBT to disk, causing it to be corrupted and regenerate upon next loading the chunk, as the tag was not fully written. Easy methods of filling the chunk with enough data include books with very large amounts of randomized Unicode characters (so that the data does not compress well), or utilizing the ghost NBT properties of overfilled bundles.

An example of the specific error messages that will be printed to the game's log are as follows:

[13:15:43] [IO-Worker-30/WARN]: Saving oversized chunk [2, 0] (265315564 bytes} to external file C:\Users\Person\Desktop\MultiMC\instances\1.19\.minecraft\saves\overload\region\c.2.0.mcc
[13:15:43] [IO-Worker-30/ERROR]: Caught exception in thread Thread[IO-Worker-30,10,main]
java.lang.OutOfMemoryError: Java heap space

Note that the specific time, byte size, chunk position, file directory, and thread IDs may be different.

Another error that may be produced alongside this form of chunk regeneration is chunk savestating.

External Storage Disconnection

Barrier.png
Warning: Game Crash 
This feature can crash your game. Perform at your own risk.

Gear.gif
This section is a work in progress. 
Please help in the creation of this article by expanding or improving it.

Tested in 13w36a, likely possible from 1.2[test] to 1.12.2[test].
Using this method, it is possible to mass regenerate chunks. An external storage which can be disconnected, such as a USB stick, is necessary.

  1. Create an instance with its directory set to an external storage.
  2. Load the instance.
  3. Put the desired world into the saves folder on the external storage.
  4. Open the world.
  5. Disconnect and reconnect the external storage.
  6. All chunks loaded from that point on will be regenerated.

Travelling to new unloaded regions will load as intended.[test]

Uses

Gear.gif
This section is a work in progress. 
Please help in the creation of this article by expanding or improving it.

Forced Spawner Generation

Spawner with Chest Data

Gallery

References

  1. MC-2711. bugs.mojang.com.
  2. MC-99945. bugs.mojang.com.
  3. MC-132242. bugs.mojang.com.
  4. Resource pack can be found here. String generator
  5. MC-220067. bugs.mojang.com.
  6. MC-226359. bugs.mojang.com.
  7. MC-74984. bugs.mojang.com.