Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Define an array with plant names and their final growth stages
- local plants = {
- ["minecraft:wheat"] = 7,
- ["minecraft:carrots"] = 7,
- ["minecraft:potatoes"] = 7,
- ["minecraft:beetroots"] = 3,
- ["minecraft:nether_wart"] = 3,
- ["minecraft:cocoa"] = 2,
- ["minecraft:pumpkin_stem"] = 7,
- ["minecraft:melon_stem"] = 7,
- -- Add more plants if needed
- }
- -- Function to check if the plant is fully grown
- local function isFullyGrown(plantName, growthStage)
- -- Look up the plant in the array
- finalStage = plants[plantName]
- if finalStage then
- return growthStage == finalStage
- else
- return false
- end
- end
- while true do
- -- Main program
- success, data = turtle.inspectDown()
- if success then
- plantName = data.name
- growthStage = data.state.age
- if isFullyGrown(plantName, growthStage) then
- length = 16
- width = 16
- simpleQuarry.quarry(width, length, 1)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement