Java Edition.png

Java Edition:Chunk Savestating

From Minecraft Discontinued Features Wiki
Jump to navigation Jump to search
Chunk Resetting.PNG

Gear.gif
This article is a work in progress. 
Please help in the creation of this article/section by expanding or improving it.
This article is about reverting chunk to last save. For other uses, see Chunk.

Chunk savestating, commonly known as the "Chunk Dupe", is an extremely powerful method to reset a chunk to its last saved state. This exploit does not cause any block updates, allowing all sorts of discontinued block combinations to be created as long as they are set up on chunk boundaries. This, along with update suppression, is considered one of the most useful tools to create block discontinued features. In 1.12 and below, this can also be used to repopulate chunks while retaining their contents, which can be used for a variety of very powerful exploits.

Behavior

After performing any of the methods listed on this page, one must then unload the chunk. The game will not crash, but instead any changes made to these chunks will simply be forgotten, when the chunk gets reloaded. Otherwise impossible block configurations can be achieved by overloading the chunk, creating a build across a chunk border (e.g. redstone block in overloaded chunk, repeater outside of said chunk receiving power), and then reloading to remove part of the build. Blocks, items and entities can be duplicated by placing in enough data, moving the entities, blocks, or items out, and then reloading the chunk.

McRegion Size Check Methods

As a failsafe introduced with the implementation of the McRegion save format to Beta 1.3, any chunk whose size is more than 1044474 bytes after compression will not be saved to disk. This works until 19w35a (1.15 snapshot).

Books

Filling the chunk with books in chests full of random Unicode text is generally the best way to overflow the storage and cause a chunk to reset since the snapshot books were added, 12w17a. When placed into shulkers, this can allow one to quickly savestate a chunk for population exploits.

To savestate a chunk with books, follow these steps:

  1. Craft 2 book and quills (Book A & Book B) to copy/paste pages into.
  2. Book A: Go to this website and copy/paste the pages from the website into a book (copy paste one page at a time) then sign and name the book.
  3. Book B: Repeat step 3 but with a new book and different pages. Then sign and name the book something different to the 1st book.
  4. Create 22 copies of Book A and 21 copies of Book B.
  5. In a single chunk place a chest with a hopper facing into it with a chest above it. Lock the hopper, and fill 1 chest with 8 of Book A in this pattern:

A|E|A|E|A|E|A|E|A
E|A|E|A|E|A|E|E|E
E|E|E|E|E|E|E|E|E

  1. Use an anvil to rename 7 copies of Book B to unique names such that they do not stack. Place them into the chest above the hopper.
  2. In another chest, put the remaining books in an alternating pattern.

A|B|A|B|A|B|A|B|A
B|A|B|A|B|A|B|A|B
A|B|A|B|A|B|A|B|A

  1. Currently, the chunk is stored in a way which is saveable. However, when you unlock the hopper, the chunk becomes too big for the game to save. In this state, anything you do in the chunk will not be saved.
  2. After you have edited the chunk in the ways you desire, reload the chunk, either by relogging, changing dimensions, or travelling away from it. The chunk will be as it was before you unlocked the hoppers!
  3. Note: if you are savestating a chunk that is loaded by spawn chunks, you will have to close the server / world for a rollback to occur.

A video by EarthComputer explaining the bug can be found here. A more in depth guide from the Minecraft Wiki

Chests with random items

This is the only viable method of achieving a chunk reset before 12w17a. By filling chests with random items of random quantities and damage values, it is possible to cause a chunk reset. However, the amount of items needed is impractical. Initial testing suggests 169837 stacks of items are needed, filling 6265 chests, or roughly a quarter of the chunk's volume. The number of items drops with the addition of NBT tags on items in the 1.9 pre-releases, but exact numbers are not known.

Signs with random text

This method is possible, but difficult as placing signs eventually becomes near impossible due to the immense amount of lag from rendering thousands of signs. By filling signs with random characters, it is possible to have enough data to cause a chunk save fail. However, this appears to be impossible on current hardware. At 15 characters per line, roughly 22600 signs of random text (A-Z, a-z, 0-9) are needed, taking up ~70% of the chunk's volume.

This can be made more practical in 14w25a (1.8 snapshot) and above by using the Force Unicode Font option. This will shrink the display size of characters, which will allow one to type more than the 15 character limit in 14w21a and below.

This becomes even more practical in 1.13[test] and above, where one can use a resource pack to change the font size to 0.0001, allowing one to place 384 characters per line in multiplayer. See this method for singleplayer.

Other Save Error Methods

Large Sign (Singleplayer Only)

This method works from 1.13[test] to 19w03c.
Using a font resource pack where you change the font size to 0.0001 you are able to type a string (or paste it in 18w45a+) that's at least 65523 characters long into the sign. This prevents the chunk from saving. The changes made to chunk saving made in 19w04a (1.14 snapshot) results in this producing chunk regeneration instead.

One can find a premade resource pack to change the font size to 0.0001 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.

Out Of Memory Save Error (Easier Method)

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

WARNING! - Attempting this may lead to item loss via chunk regeneration!!!

This method works from 19w36a (1.15 snapshot) to 24w20a (present). By filling a chunk with ~200-300 megabytes of data and saving and quitting the world, if the game's RAM is low enough to fail in the serialization of a chunk, a specific error may be produced. Due to the game failing to serialize the NBT of the chunk, the chunk simply will fail to save, and will revert to the last saved instance. Easy methods of filling the chunk with enough data include books with very large amounts of unicode characters, or utilizing the Ghost NBT properties of overfilled bundles.

This is most easily accomplished when the game's RAM is set to 1-2 gigabytes, but this may lead to other issues and crashes, and may not work universally.

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

[22:31:52] [Server thread/INFO]: Saving chunks for level 'ServerLevel[World]'/minecraft:overworld
[22:32:01] [IO-Worker-24/ERROR]: Caught exception in thread Thread[IO-Worker-24,10,main]
java.lang.OutOfMemoryError: Java heap space

Please note that the specific time, world name, dimension, and thread IDs may be different.

Out Of Memory Save Error (Guaranteed Method)

This method works from 19w36a (1.15 snapshot) to 24w20a (present). By filling a chunk with over 2.147 gigabytes of data after serialization (depending on the data stored in the chunk and its compressibility, this usually requires about 4 gigabytes of raw data before compression to accomplish) and saving and quitting the world, the game will always fail to save the chunk due to exceeding 2,147,483,647 bytes. This occurs due to the storage of the raw bytes to be written to disk in an array, and having over the integer limit of bits to write causes an integer overflow, throwing the exception. Easy methods of filling the chunk with enough data include books with very large amounts of unicode characters, or utilizing the Ghost NBT properties of overfilled bundles.

The specific error message that will be printed to the game's log is as follows:

[19:10:30] [IO-Worker-27/ERROR]: Caught exception in thread Thread[IO-Worker-27,10,main]
java.lang.OutOfMemoryError: Required array length 2147483639 + 152 is too large

Please note that the specific time, array length, and thread IDs may be different.

Possible Blocks

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

These are the possible discontinued block combinations using this method.

Unconnected Corner Stairs

From 1.3.1 to 24w20a (present), using Chunk Savestating its possible to get corner stairs that are not connected to any other stairs. This is not normally possible as to achieve corner stairs, 1-2 stairs need to be placed adjacent to the first stair depending on the model of the stair that is wanted. By placing the adjacent stairs in another chunk, and then Chunk Savestating that chunk it is possible to leave an Unconnected Corner Stair.

See also

References