FastAsyncWorldEdit

FastAsyncWorldEdit

245k Downloads

NMS relighter outdated lacking support for newer versions

Closed this issue ยท 0 comments

commented

Server Implementation

Spigot

Server Version

1.21.4

Describe the bug

If a block has to be relight above the original height range 0 - 256 there are array out of bounds due to the original code only supporting that range. Look at the set method of NMSRelighter for reference. Furthermore when the array index of out bound occurs FAWE attempts to communicate the error to the actor without doing a null check, which is the case when using world edit through the API instead of ingame commands. Newer vanilla versions have 384 height support but with datapacks the height range can be from -2032 up to 2032 so a 4k block range.

To Reproduce

Perform world edit operations triggering relighting updates above y 256.

Expected behaviour

Would expect the relighter not to through array index out of bounds

Screenshots / Videos

No response

Error log (if applicable)

[19:38:42] [Server thread/WARN]: java.lang.ArrayIndexOutOfBoundsException: Index 52 out of bounds for length 4 [19:38:42] [Server thread/WARN]: at com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter.set(NMSRelighter.java:124) [19:38:42] [Server thread/WARN]: at com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter.addLightUpdate(NMSRelighter.java:137) [19:38:42] [Server thread/WARN]: at com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter.fixSkyLighting(NMSRelighter.java:1054) [19:38:42] [Server thread/WARN]: at com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter.fixSkyLighting(NMSRelighter.java:980) [19:38:42] [Server thread/WARN]: at com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter.fixLightingSafe(NMSRelighter.java:867) [19:38:42] [Server thread/WARN]: at com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter.removeAndRelight(NMSRelighter.java:101) [19:38:42] [Server thread/WARN]: at com.sk89q.worldedit.EditSession.flushQueue(EditSession.java:1308) [19:38:42] [Server thread/WARN]: at com.sk89q.worldedit.EditSession.close(EditSession.java:1225)

Fawe Debugpaste

issuing commands through WE api

Fawe Version

2.12.3

Checklist

Anything else?

No response