02-07-2013, 04:34 AM
So, I'd like to add a few things to the API, so that plugins can be made more powerful. For starters, I think some generator injecting could be useful, so that plugins may enhance the generated world using the OnChunkGenerating() or OnChunkGenerated() hooks. But for that to work, two things are essential:
- cChunkDesc must be able to have a cBlockArea written to it
- cBlockArea needs file IO, so that "models" can be loaded and saved from files
Also, useful stuff:
- cBlockArea:Crop() to crop along either of the axes
- cBlockArea:Expand() to expand itself in either of the axes
- cBlockArea:RotateCW() and RotateCCW() to rotate by 90 degrees along the vertical axis
- cBlockArea:MirrorX(), MirrorY(), MirrorZ() to mirror by the specified axis
I started by cBlockArea:Crop(), just to get the feel of the things. And I discovered quite a nasty bug in cBlockArea::MakeIndex that could have caused weird memory overwrite bugs.
- cChunkDesc must be able to have a cBlockArea written to it
- cBlockArea needs file IO, so that "models" can be loaded and saved from files
Also, useful stuff:
- cBlockArea:Crop() to crop along either of the axes
- cBlockArea:Expand() to expand itself in either of the axes
- cBlockArea:RotateCW() and RotateCCW() to rotate by 90 degrees along the vertical axis
- cBlockArea:MirrorX(), MirrorY(), MirrorZ() to mirror by the specified axis
I started by cBlockArea:Crop(), just to get the feel of the things. And I discovered quite a nasty bug in cBlockArea::MakeIndex that could have caused weird memory overwrite bugs.