Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *This is the first API I have personally created. If this API had a larger impact other than for fun I would consider going back and separating a lot of the key elements such as the functions inside buildTower*
- The Following Code is intended for Minecraft's Computercraft Code and is actively in progress. (computercraft is a mod for the video game minecraft that allow for lua scripts to run on devices in game. The term turtle is used to refer to the in-game robots that can automate tasks) Keep in mind this code was written while attending university as a passion project, with the help of generative ai for monotonous code elements.
- please see import code as directory to any code specified below. (The "bTMEix03" in the import function specifies the end of the url. So this readme file would be import("bTMEix03", "readme") for the url https://pastebin.com/edit/bTMEix03)
- As of right now the code does the following (contents inside the Parentheses are the files to be run to have the code work in game assuming that its api is imported):
- Libraries:
- Predict Turtle Pathing (predictpath in BasicMovement or MdxeX0DF)
- - This library is used to predict the following:
- - Fuel costs to make sure a turtle doesn't shut down mid job (potentially losing the turtle as its location is unknown)
- - Turtle Pathing to prevent any uncessary destruction. Path is written to a text file on the turtle that can be compared to a server database of forbidden areas for a turtle to dig into.
- Manual:
- Turtle Delivery (turtleOneTrip in BasicMovement or 68wFPyAZ)
- - Must be loaded first, but can head to desired coordinates. Can deliver to chests, but this feature is still technically in progress.
- - To avoid unnecessary destruction, turtle will fly as close to the skybox as possible
- Turtle Fill (fillBlock in BuildFunctions or S34iHEKx)
- - Will fill any size hole as long as enough fuel and blocks are provided in advance
- - Will return to start if prompted
- Turtle Refuel (TurtleRefuel in BasicFunctions or er0pq47H)
- - Basic program designed to refuel the turtle with all fuel currently in inventory.
- Turtle Lava Refuel (turtleGetLava in Utility or H1w4vh0f)
- - Turtle gathers all lava below with buckets provided, determined by dimensions given by the user.
- - Turtle will store filled buckets in one chest, and gather new empty buckets from another chest.
- - Turtle returns to start after collecting all lava in dimensions mentioned.
- Turtle Building (buildTower in BuildFunctions or n5jujFA1)
- - Semi-customizable auto-building
- - Building material must be inputted into the turtle manually
- - Primarily used for skyscrapers (can use any two blocks in building creation; One for Floors, ceilings, and Supports, the second for walls)
- Turtle Quarry (smartManualQuarry in BasicQuarry or hV6x6tNr)
- - Will dig any size quarry hole as long as enough fuel is provided in advance
- - Will dump resources in provided chests at drone start location if quarry volume is larger than turtle inventory
- - returns to drone starting position
- Turtle Quarry Strip-mine (manualQuarryShaft in BasicQuarry or yk8MCctB)
- - Repeats steps for quarry multiple times
- - Great for mining deep for rare resources
- - Will quarry endlessly if provided enough fuel and chests
- Remote:
- (in progress)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement