Program: 97834
Project: 97834
Buggy source:
private final void buildStairWell(final SnipeData v){
  final int _brushSize=v.getBrushSize();
  final int _voxelMaterialId=v.getVoxelId();
  final int[][][] _spiral=new int[2 * _brushSize + 1][_height][2 * _brushSize + 1];
  if (v.getVoxelHeight() < 1) {
    v.setVoxelHeight(1);
    v.sendMessage(ChatColor.RED + "String_Node_Str");
  }
  final int _height=v.getVoxelHeight();
  int _startx=0;
  int _startz=0;
  int _y=0;
  int _xoffset=0;
  int _zoffset=0;
  int _toggle=0;
  if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
    if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=0;
      _startz=2 * _brushSize;
    }
 else     if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=0;
      _startz=0;
    }
 else     if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=2 * _brushSize;
      _startz=0;
    }
 else {
      _startx=2 * _brushSize;
      _startz=2 * _brushSize;
    }
  }
 else {
    if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=0;
      _startz=0;
    }
 else     if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=2 * _brushSize;
      _startz=0;
    }
 else     if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=2 * _brushSize;
      _startz=2 * _brushSize;
    }
 else {
      _startx=0;
      _startz=2 * _brushSize;
    }
  }
  while (_y < _height) {
    if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
      _spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
      _y++;
    }
 else     if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
switch (_toggle) {
case 0:
        _toggle=2;
      _spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
    break;
case 1:
  _toggle=2;
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
break;
case 2:
_toggle=1;
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=2;
_y++;
break;
default :
break;
}
}
if (_startx + _xoffset == 0) {
if (_startz + _zoffset == 0) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
}
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
_xoffset++;
}
 else {
_zoffset++;
}
}
 else if (_startz + _zoffset == 2 * _brushSize) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
}
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
_zoffset--;
}
 else {
_xoffset++;
}
}
 else {
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=5;
_y++;
}
_zoffset--;
}
 else {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=4;
_y++;
}
_zoffset++;
}
}
}
 else if (_startx + _xoffset == 2 * _brushSize) {
if (_startz + _zoffset == 0) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
}
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
_zoffset++;
}
 else {
_xoffset--;
}
}
 else if (_startz + _zoffset == 2 * _brushSize) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
}
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
_xoffset--;
}
 else {
_zoffset--;
}
}
 else {
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=4;
_y++;
}
_zoffset++;
}
 else {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=5;
_y++;
}
_zoffset--;
}
}
}
 else if (_startz + _zoffset == 0) {
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=2;
_y++;
}
_xoffset++;
}
 else {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=3;
_y++;
}
_xoffset--;
}
}
 else {
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=3;
_y++;
}
_xoffset--;
}
 else {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=2;
_y++;
}
_xoffset++;
}
}
}
final Undo _undo=new Undo(this.getTargetBlock().getWorld().getName());
for (int _x=2 * _brushSize; _x >= 0; _x--) {
for (int _i=_height - 1; _i >= 0; _i--) {
for (int _z=2 * _brushSize; _z >= 0; _z--) {
switch (_spiral[_x][_i][_z]) {
case 0:
if (_i != _height - 1) {
if (!((this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) && _spiral[_x][_i + 1][_z] == 1)) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 0) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(0,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
}
}
 else {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 0) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(0,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
}
break;
case 1:
if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != _voxelMaterialId) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(_voxelMaterialId,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
}
 else if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 44) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(44,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData(v.getData());
}
 else if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i - 1,this.getBlockPositionZ() - _brushSize + _z) != _voxelMaterialId) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i - 1,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(_voxelMaterialId,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i - 1,this.getBlockPositionZ() - _brushSize + _z);
}
break;
case 2:
if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 43) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(43,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData(v.getData());
}
 else if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 53) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(53,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData((byte)0);
}
 else if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 67) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(67,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData((byte)0);
}
break;
default :
if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 53) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(53,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData((byte)(_spiral[_x][_i][_z] - 2));
}
 else if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 67) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(67,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData((byte)(_spiral[_x][_i][_z] - 2));
}
break;
}
}
}
}
v.storeUndo(_undo);
}

Fixed version (ground truth):
private final void buildStairWell(final SnipeData v){
  if (v.getVoxelHeight() < 1) {
    v.setVoxelHeight(1);
    v.sendMessage(ChatColor.RED + "String_Node_Str");
  }
  final int _height=v.getVoxelHeight();
  final int _brushSize=v.getBrushSize();
  final int _voxelMaterialId=v.getVoxelId();
  final int[][][] _spiral=new int[2 * _brushSize + 1][_height][2 * _brushSize + 1];
  int _startx=0;
  int _startz=0;
  int _y=0;
  int _xoffset=0;
  int _zoffset=0;
  int _toggle=0;
  if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
    if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=0;
      _startz=2 * _brushSize;
    }
 else     if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=0;
      _startz=0;
    }
 else     if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=2 * _brushSize;
      _startz=0;
    }
 else {
      _startx=2 * _brushSize;
      _startz=2 * _brushSize;
    }
  }
 else {
    if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=0;
      _startz=0;
    }
 else     if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=2 * _brushSize;
      _startz=0;
    }
 else     if (this.sopen.equalsIgnoreCase("String_Node_Str")) {
      _startx=2 * _brushSize;
      _startz=2 * _brushSize;
    }
 else {
      _startx=0;
      _startz=2 * _brushSize;
    }
  }
  while (_y < _height) {
    if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
      _spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
      _y++;
    }
 else     if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
switch (_toggle) {
case 0:
        _toggle=2;
      _spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
    break;
case 1:
  _toggle=2;
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
break;
case 2:
_toggle=1;
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=2;
_y++;
break;
default :
break;
}
}
if (_startx + _xoffset == 0) {
if (_startz + _zoffset == 0) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
}
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
_xoffset++;
}
 else {
_zoffset++;
}
}
 else if (_startz + _zoffset == 2 * _brushSize) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
}
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
_zoffset--;
}
 else {
_xoffset++;
}
}
 else {
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=5;
_y++;
}
_zoffset--;
}
 else {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=4;
_y++;
}
_zoffset++;
}
}
}
 else if (_startx + _xoffset == 2 * _brushSize) {
if (_startz + _zoffset == 0) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
}
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
_zoffset++;
}
 else {
_xoffset--;
}
}
 else if (_startz + _zoffset == 2 * _brushSize) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=1;
}
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
_xoffset--;
}
 else {
_zoffset--;
}
}
 else {
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=4;
_y++;
}
_zoffset++;
}
 else {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=5;
_y++;
}
_zoffset--;
}
}
}
 else if (_startz + _zoffset == 0) {
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=2;
_y++;
}
_xoffset++;
}
 else {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=3;
_y++;
}
_xoffset--;
}
}
 else {
if (this.sdirect.equalsIgnoreCase("String_Node_Str")) {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=3;
_y++;
}
_xoffset--;
}
 else {
if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
_spiral[_startx + _xoffset][_y][_startz + _zoffset]=2;
_y++;
}
_xoffset++;
}
}
}
final Undo _undo=new Undo(this.getTargetBlock().getWorld().getName());
for (int _x=2 * _brushSize; _x >= 0; _x--) {
for (int _i=_height - 1; _i >= 0; _i--) {
for (int _z=2 * _brushSize; _z >= 0; _z--) {
switch (_spiral[_x][_i][_z]) {
case 0:
if (_i != _height - 1) {
if (!((this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) && _spiral[_x][_i + 1][_z] == 1)) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 0) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(0,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
}
}
 else {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 0) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(0,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
}
break;
case 1:
if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != _voxelMaterialId) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(_voxelMaterialId,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
}
 else if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 44) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(44,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData(v.getData());
}
 else if (this.stairtype.equalsIgnoreCase("String_Node_Str") || this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i - 1,this.getBlockPositionZ() - _brushSize + _z) != _voxelMaterialId) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i - 1,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(_voxelMaterialId,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i - 1,this.getBlockPositionZ() - _brushSize + _z);
}
break;
case 2:
if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 43) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(43,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData(v.getData());
}
 else if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 53) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(53,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData((byte)0);
}
 else if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 67) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(67,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData((byte)0);
}
break;
default :
if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 53) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(53,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData((byte)(_spiral[_x][_i][_z] - 2));
}
 else if (this.stairtype.equalsIgnoreCase("String_Node_Str")) {
if (this.getBlockIdAt(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z) != 67) {
_undo.put(this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z));
}
this.setBlockIdAt(67,this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z);
this.clampY(this.getBlockPositionX() - _brushSize + _x,this.getBlockPositionY() + _i,this.getBlockPositionZ() - _brushSize + _z).setData((byte)(_spiral[_x][_i][_z] - 2));
}
break;
}
}
}
}
v.storeUndo(_undo);
}