Advertisement
melzneni

Turti program destroy

Aug 31st, 2023 (edited)
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. #import: iT4NKZfx;
  2. #import: mWBVHmn0;
  3.  
  4. main: {
  5. configureItemSwitch(15, "left");
  6. pos = locate();
  7. minHeight = pos[1];
  8.  
  9. blocks = [pos];
  10. handled = {};
  11.  
  12. while (blocks.length>0) {
  13. block = blocks.removeAt(blocks.length - 1);
  14. identifier = block[0]+"."+block[1]+"."+block[2];
  15.  
  16. if (handled[identifier]==null){
  17. print(block);
  18. handled[identifier] = true;
  19.  
  20. moveTo(block, getDirection());
  21.  
  22. for (direction=0;direction<4;direction++) {
  23. pos = getPosInDirection(block, direction);
  24. pos_identifier = pos[0] + "." + pos[1] + "."+pos[2];
  25. if (handled[pos_identifier]==null){
  26. setDirection(direction);
  27. name = inspectName();
  28. if (name!=null && name!="minecraft:chest" && name!="minecraft:spawner"){
  29. dig();
  30. blocks.add(pos);
  31. } else {
  32. handled[pos_identifier] = true;
  33. };
  34.  
  35. name = inspectNameUp();
  36. if (name!=null && name!="minecraft:chest" && name!="minecraft:spawner"){
  37. digUp();
  38. blocks.add(getPosInDirection(block, 4));
  39. };
  40. if (block[1]>minHeight){
  41. name = inspectNameDown();
  42. if (name!=null && name!="minecraft:chest" && name!="minecraft:spawner"){
  43. digDown();
  44. blocks.add(getPosInDirection(block, 5));
  45. }
  46. }
  47. };
  48. };
  49. };
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement