Dungeon Labs generating torches in wrong coordinates, outside of dungeon
MaineQat opened this issue ยท 2 comments
Dungeon Labs are erroneously generating some of their torches at a coordinate of "x,x" rather than "x,z".
Line 152 in DungeonLabs.java:
WorldGenPrimitive.setBlock(world, x + 3, y + 1, x + 3, Blocks.torch);
The result is chunks being generated at locations unrelated to the dungeon. For example, a dungeon generated around 1258,-285 resulted chunks generated around 1224,1224 and 1272,1272.
The extraneous chunks show up when using Dynmap and flying in a straight line to the east or west; eventually a dungeon will be generated and the Dynmap webpage will (when the map renderer catches up) show the erroneous chunk, which will lie along a diagonal line running from NW to SE through 0,0.
Wow.. nice find. How in the world did you spot that?
My new way of writing the code for dungeons is far less prone to these bugs, but that code has been around for a long time. I've been going back and rewriting some of those old rooms to get rid of this kind of stuff.
I saw a handful of chunks rendering on our Dynmap (web-based graphical map) that were not attached to other chunks, in a diagonal line rendering from north-west to south-east. I noticed that they were (roughly) in-line north/south with roguelike towers.
I used mcedit to look in the errant chunk to see what block was out of place, and saw a torch, then searched your github for use of torches.
I had seen (and reported, as well as bytecode fixed) this type of issue once before with Chococraft (chocobos) where it was accidentally checking an x,x coordinate rather than x,z when testing height to spawn in the new plant.