Added //regen to regenerate an area.

This commit is contained in:
sk89q
2011-03-12 16:37:07 -08:00
parent 0fa675cecc
commit 1b670a1c98
6 changed files with 167 additions and 66 deletions

View File

@@ -249,6 +249,20 @@ public class EditSession {
return smartSetBlock(pt, block);
}
/**
* Insert a contrived block change into the history.
*
* @param pt
* @param existing
* @param block
*/
public void rememberChange(Vector pt, BaseBlock existing, BaseBlock block) {
BlockVector blockPt = pt.toBlockVector();
original.put(blockPt, existing);
current.put(pt.toBlockVector(), block);
}
/**
* Set a block with a pattern.
*
@@ -286,7 +300,7 @@ public class EditSession {
* @param block
* @return
*/
private boolean smartSetBlock(Vector pt, BaseBlock block) {
public boolean smartSetBlock(Vector pt, BaseBlock block) {
if (queued) {
// Place torches, etc. last
if (BlockType.shouldPlaceLast(block.getType())) {