WorldEdit icon indicating copy to clipboard operation
WorldEdit copied to clipboard

Pyramid command error

Open mathiascode opened this issue 7 years ago • 4 comments

The //pyramid command doesn't always work. When running //pyramid stone 50 after a server startup, this happens:

[23:18:10] Player Wither_Skeleton is executing command "//pyramid stone 50" in world "flatlands" at world age 8261.
[23:18:10] Write: Requesting datatypes not present in the cBlockArea. Got only 0x00, requested 0x23
[23:18:10] Parameters on the stack
[23:18:10] LUA: Write: Requesting datatypes not present in the cBlockArea. Got only 0x00, requested 0x23
[23:18:10] Stack trace:
[23:18:10]   [C](-1): Write
[23:18:10]   Plugins/WorldEdit Plugin/Commands/Generation.lua(352): (no name)
[23:18:10] Stack trace end
[23:18:10] Error in <attached> calling function <callback>()

mathiascode avatar Aug 22 '17 21:08 mathiascode

The issue seems to be that ChunkStay isn't used in the pyramid command.

mathiascode avatar Aug 22 '17 21:08 mathiascode

It's cBlockArea again, all the Write-calls has to be corrected. In my plugin SkyBlock I had to add the 3 to the function Write to correct it.

Seadragon91 avatar Aug 23 '17 05:08 Seadragon91

The problem seems to be that no info is available (0x00), which after a quick change in the code to use ChunkStay seemed to fix the issue.

The recent changes in cBlockArea might have started causing it though, I don't remember.

mathiascode avatar Aug 23 '17 07:08 mathiascode

Finally a case where the new stricter cBlockArea API has found an actual problem with the plugin code :D

@Seadragon91 Please don't use naked number. Ideally, use blockArea:GetDataTypes() as the param; or if you have specific needs, use the named constants cBlockArea.baTypes, cBlockArea.baMetas etc., added together using +.

madmaxoft avatar Aug 23 '17 09:08 madmaxoft