Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import: NK0bGHwZ; // Importieren der GPS-Bibliothek
- #import: AAMw1hB3; // Math
- #import: mWBVHmn0; // Item Switch
- digDown: {
- moved = 0;
- while (true) {
- name = inspectNameDown();
- if (name != nil && (findText(name, '_ore') || name == 'minecraft:bedrock')){
- break;
- };
- mvDown();
- moved = moved + 1;
- };
- mvUp(moved);
- };
- clearInventory:{
- # {
- for (i=0; i < 16; i++){
- name = getItemName(i);
- if (name!=null && findText(name, 'coal') == null) {
- drop(i, 64);
- }
- }
- }
- };
- checkFuel():{
- if (getFuelLevel() < 500){
- clearInventory();
- pos = locate();
- direction = getDirection();
- faceToward($posFuel$);
- for(i=0;i<5;i++) {
- suck(15, 64);
- };
- refuel();
- while (getFuelLevel()<700) {
- input("Bitte Treibstoff-Kiste auffüllen ("+getFuelLevel()+")");
- for(i=0;i<5;i++) {
- suck(15, 64);
- };
- refuel();
- };
- moveTo(pos, direction);
- };
- };
- main: {
- print("Pickaxe links");
- print("Kohle Kiste hinten");
- configureItemSwitch(15, "left");
- w, d = splitText(input("w,d"), ",");
- w = tonumber(w);
- d = tonumber(d);
- pos = locate();
- direction = getDirection();
- $posFuel$ = getPosInDirection(pos, (direction + 2) % 4);
- pos1 = getPosInDirection(pos, direction, w - 1);
- pos2 = getPosInDirection(pos, (direction + 1) % 4, d - 1);
- xMin = min(pos[0], pos1[0], pos2[0]);
- xMax = max(pos[0], pos1[0], pos2[0]);
- y = pos[1];
- zMin = min(pos[2], pos1[2], pos2[2]);
- zMax = max(pos[2], pos1[2], pos2[2]);
- for (x = xMin; x <= xMax; x++){
- for (z = zMin; z <= zMax; z++){
- moveToRuthless([x, y, z], 0);
- digDown();
- checkFuel();
- };
- };
- moveTo(pos);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement