Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import: iT4NKZfx;
- #import: mWBVHmn0;
- main: {
- configureItemSwitch(15, "left");
- pos = locate();
- minHeight = pos[1];
- blocks = [pos];
- handled = {};
- while (blocks.length>0) {
- block = blocks.removeAt(blocks.length - 1);
- identifier = block[0]+"."+block[1]+"."+block[2];
- if (handled[identifier]==null){
- print(block);
- handled[identifier] = true;
- moveTo(block, getDirection());
- for (direction=0;direction<4;direction++) {
- pos = getPosInDirection(block, direction);
- pos_identifier = pos[0] + "." + pos[1] + "."+pos[2];
- if (handled[pos_identifier]==null){
- setDirection(direction);
- name = inspectName();
- if (name!=null && name!="minecraft:chest" && name!="minecraft:spawner"){
- dig();
- blocks.add(pos);
- } else {
- handled[pos_identifier] = true;
- };
- name = inspectNameUp();
- if (name!=null && name!="minecraft:chest" && name!="minecraft:spawner"){
- digUp();
- blocks.add(getPosInDirection(block, 4));
- };
- if (block[1]>minHeight){
- name = inspectNameDown();
- if (name!=null && name!="minecraft:chest" && name!="minecraft:spawner"){
- digDown();
- blocks.add(getPosInDirection(block, 5));
- }
- }
- };
- };
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement