WorldEdit

WorldEdit

44M Downloads

1.20+ lighting option in //perf is non-functional

brickmonster opened this issue ยท 6 comments

commented

WorldEdit Version

7.2.15

Platform Version

paper-1.20.1-32

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

Disabling lighting updates in the //perf menu is non-functional in 1.20.1.

The option visually toggles and there are no console errors or warnings.

Expected Behavior

No lighting update.

Reproduction Steps

  1. Build a box with no ceiling
  2. Set lighting=off in //perf
  3. Add a solid ceiling with //set stone

Anything Else?

Behaviour is correct in paper-1.19.4-550. I suspect this bug is related to the removal of the NO_LIGHT_UPDATE flag for setBlock in vanilla code.

There still appears to be block update packets with no lighting information required, so hopefully there's a path to fixing this.

I used vanilla clients in both version tests.

commented

We don't use the setBlock method, we apply the block change at a lower level, and then manually apply any of the side effects listed. So this is more likely that something else is forcibly causing a lighting update, rather than setBlock no longer having a flag to not do it.

We directly set the block, then run a lighting update on it if the lighting flag is enabled

commented

Also for what it's worth I did specifically test this before the update was released, due to the lighting changes within vanilla code. Is this reproducible with no other plugins installed? It's possible Paper might have done something to start forcing updates due to a vanilla lighting bug or similar

commented

I tested on a fresh server with only worldedit.

I'll bisect which version broke it.

commented

I've just tried these versions and I get lighting updates on all of them:
1.20:
paper-1.20-1
paper-1.20-17

1.20.1:
paper-1.20.1-18
paper-1.20.1-32
paper-1.20.1-37
paper-1.20.1-38 (released 30 mins ago)
spigot (freshly built)

I tried using a 1.20 client in one of the tests with the same result.

Just to double check my method, I re-tested paper-1.19.4-550 and that works as expected.

commented

I diff'd the entire codebase from 1.19.4 to 1.20.1. Here are some differences that I found:

  • ClientboundSectionBlocksUpdatePacket no longer has a flag for suppressing light updates.
  • ChunkHolder.broadcastChanges no longer checks for a removed flag.
  • ProtoChunk.setBlockState now checks for light properties, rather than light emission.
  • LevelChunk.setBlockState now checks for light properties, whereas in the past it did not.

That last one is particularly important, as worldedit calls this function directly in PaperweightWorldNativeAccess.

I think that's all the help that I can provide.

commented

This issue has been automatically marked as stale because it has not been fully confirmed. It will be closed if no further activity occurs. Thank you for your contributions.