Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local i, found, slotItem, oneRemaining, present, entity = 1, false, nil, false, turtle.inspectDown();
- while true do
- present, entity = turtle.inspectDown();
- while present do
- if entity.state.age == 3 then
- if not turtle.digDown() then term.clear(); assert(false, "No tool to dig with, dummy. To think I left the assembly lines for this... Halting."); end
- found, i = false, 1;
- while not found and i < 16 do
- slotItem = turtle.getItemDetail(i);
- if slotItem and slotItem.name == "minecraft:nether_wart" then
- found = true;
- else
- i = i + 1;
- end
- end
- if found then
- turtle.select(i);
- turtle.placeDown();
- oneRemaining = false;
- for i = 1, 16 do
- turtle.select(i);
- if oneRemaining then turtle.dropUp(); end
- while not oneRemeaining and turtle.getItemCount() > 1 do
- turtle.dropUp((turtle.getItemCount() - 1));
- oneRemaining = true;
- end
- end
- else
- assert(false, "No Nether Wart in inventory. Halting...");
- end
- else
- term.clear();
- print("Not mature yet.");
- --print(entity);
- print(textutils.serialize(entity));
- end
- present, entity = turtle.inspectDown();
- end
- end
Add Comment
Please, Sign In to add comment