WorldEdit

WorldEdit

43M Downloads

Restoring from a snapshot fails with invalid block state table entry

Johnibur opened this issue ยท 5 comments

commented

Versions

WorldEdit version: Bukkit-Official(7.2.0-SNAPSHOT+5102-732c11c)
Platform version: git-Paper-27 (MC:1.16.1)

Describe the bug

When trying to restore a selection from a snapshot, the action fails and returns error involving block state table entry. A number is given for the entry. Depending on the selection this number is different.

To Reproduce

I have attached a world with a template build and a snapshot. The screenshot shows what's exactly happening as described below.

  1. Use world.zip as world
  2. Use 2020-06-30-17-35-00.zip as snapshot
  3. Go to -7, 69, 278 (should be the spawnpoint)
  4. Take the red wool pillar as your selection
  5. Select the snapshot and restore

Expected behavior

The restore would succeed without error.

Screenshots

2020-06-30_17 36 04

Additional context

world.zip
2020-06-30-17-35-00.zip

commented

Super preliminary look because I don't have time to do math right now:
Error is in chunk section y=1, somehow the deserialization math doesn't like whatever is in that section. Replacing that section with the palette/block array of y=0 allows the section to load, and then everything works ok up until the ground level section, where it doesn't error but loads like this: (moved up 128 blocks so i could see the entire chunk)

I am guessing it's not supposed to look like that, so somehow that block state array is being read incorrectly now.
Restoring other things also seems to get the same block state table entry issues, at varying chunk sections.
The weirdest part is that most chunk sections work just fine:
It's just some random sections that either have an error, or end up with really weird misarrangements.

commented

image
I'm not getting anything more specific than this anywhere even with debug on, this was the result of setting an area to dirt and then restoring from a backup. Some chunks just didn't work and others worked, but left one block of dirt behind.

2020-07-01_12 38 07

commented

Please test https://builds.enginehub.org/job/worldedit/last-successful?branch=bugfix/1.16-chunk-format when possible. Testing on 1.13-1.15 Bukkit as well would be appreciated.

commented

The fix is working fine in 1.16 on a map using a large set of different blocks.

commented

It's working in 1.15.2 as well!