This tutorial is set by the author's setting without permission.
This tutorial uses OC for related automation
GTNH version: 2.6.1
The automation process includes five parts
Ritual activation, item throwing (completed by OC robot)
Mining activation and rock cleaning (by OC computer, GT mining machine, BC filling machine (clear mode))
Prevent OC robots in the mining prevention of the starring star (OC computer sends a mining mining signal and transmits it to OC robots)
Mining activation after the fall (OC robot sends a mining activation signal and transmits it to OC computers)
Rock cleanup activation (OC robot issues a cleaner activation signal, transmits it to gold and door, and activates the BC filling machine)
OC computer code URL: TRASD-S-OC-OCDE-in-GTNH/ AT OC · Transdapers/ Transd-S-OC-OCDE-In-gtnh (github.com) (github.com) (github.com)
OC Robot Code URL: Trasd-S-OC-OCDE-in-GTNH/ROBOT.LUA AT OC · Transdapers/Transd-S-OC-OCDE-In-gtnh (github.com) (github.com) (github.com)
Considering that some players may not be able to open the URL, they will be uploaded at the end of the tutorial.
Robotic part
The necessary components of the robot (upgrade of the item bar, the interactive upgrade of the item bar, the redstone card, the T1 graphics card, the T1 display, the memory, the CPU, the hard disk, etc.)
Related block:
Redstone transmitted by wireless transmission (for transmission of mining activation, mining machine occupies redstone signals)
Robot charger
The robot is placed on the main ceremony stone, and the activist stone is held in the wake -up ceremony.
The ritual throwing items plugged into the robotic character bar, or the pipe can be imported.
Related configuration
See Robot.Lua, mainly configuration (SIDE) related configuration
OC computer part
Component components (red stone card/red stone components, T1 graphics cards, T1 display, memory, CPU, hard disk, etc.)
Related block:
Redstone transmitted by wireless transmission (for transmission of mining activation, mining machine occupation, and rock cleaning redstone signal)
Battery box (Energy reserves, may be available, there is supply)
The adapter (with MFU binding mining machines or mining vents or directly contacting the mining machine/mining owner control block) (note that the MFU distance is limited)
BC construction machine (responsible for the rock cleaning after mining)
Golden pipeline (carried gold and door-Redstone signal activation circulating redstone signal is not closed)
Related configuration
See Star.LUA, mainly configured with SIDE, and secondly, you need to pay attention to Clearn_time.
Other part
The fall point control (the fall point should be higher than the ceremony point of 30, the hardness should be -1 degree, you can use the mysterious core: the guardian right-clicking the block/placed the guard box to achieve this effect)
BC mining (the total range should contain a cube range of 25 grids outward at the center of the pendant point. It can be divided into 8 mining machines to be carried out and can be reduced.
Part of the mining machine (placed above the square area and does not involve the 3*3 area where the fall point is located.
Note: You need to place the card position (hardness -1) in the 50-63 grid below the mining machine to get stuck the mining pipeline in time, otherwise it will be stretched down, or it is suspended because the mining pipeline is not enough.50-63 squares below, the location of the stone picking machine, so that only one set of mining pipes are placed in the mining verge without adding it.
Preliminary code
Related block location and configuration reference
Here is the OC robot code:
-[[[Star Automation-OC Robot Script Section
GTNH version: 2.6.1 (Note: The old version is not compatible, this version of the mining opportunity is automatically recycled, the old version needs to be added to the completion of the closing function)
Written by Transd --- 2024.8.10
Note: It is necessary to ensure that the LP and power supply must be sufficient. Generally, the time of mining time is greater than the time required for the LP supplement. Therefore, only one ritual is set to start testing normally.
]]--
LOCAL Component = Require ("Component")
local os = Require ("OS")
LOCAL SIDES = Require ("Sides")
robot = request ("robot")
-[[[[[[[[[[[
-Absolute direction--
East (E): Sides.east South (S): Sides.south (W): Sides.west North (N): Sides.north
Part: Sides.up: Sides.down
-relative direction (not recommended)--
Former: Sides.front after: Sides.back
Left: Sides.left Right: Sides.richt
Part: Sides.up: Sides.down
Note: The relative direction is relative to the robot.When facing the machine, the front and back are opposite to it.
Robot box icon surface is the back.
]]--
-Configuration part--
local redstone_occupy_side = sides.front-this surface determines whether the mining place is occupied (occupied as activated state)-
LOCAL Redstone_active_side = Sides.Back-
LOCAL WAIT_TIME1 = 120-Waiting time for mining place (should not be too short)-
LOCAL ACTIVE_TIME = 60-the duration of the activation signal of the mining place (should not be too short)-
local find_time = 60-robot finding items interval (should not be too short)-
Local ritual_time = 60-After the ritual activation failed, the interval was activated again-
Local Throw_time = 60-After the ritual activation is successful, the waiting time is thrown (consumed by the activation ceremony for the activation ceremony to prevent the limit LP mission from causing the star falls)-
LOCAL FALL_TIME = 20-Meteorite landing waiting time-
local main_time = 60-main program circulation time--
-Configuration part--
LOCAL LOCATION_ITEM = 1-Sound Index of the Slot Slot of the Star Mission Item-
Function is_occupy (Redstone_occupy_side, WAIT_TIME1)-determine whether the mining space is occupied-
While Component.redstone.Getinput (redstone_occupy_side) == 15 do
Print ("Mining machine is occupied ... (Occuping ...)"))
OS.SLEEP (WAIT_TIME1)-Waiting--
End
Os.sleep (1)
end
function find_item (locally_item, find_time) -Find the slot index of the slot of the star falls-
While (robot.count (localate_item) == 0) do
If (local_item == 16) then-slot index overdue protection-
Location_item = 0
End
Local_item = local_item+1
End
Os.sleep (1)
Robot.select (locally_item)
end
function activity_ritual (ritual_time, throw_time)-activation ceremony-activation ceremony--
While (robot.usedown (0) == False) Do-the activation ritual and detect whether the activation is successful-
Print ("Ritual activation failed, please check the integrity of the ritual structure and whether the LP stock is sufficient")
Os.sleep (ritual_time)
End
Print ("Ritual activation success")
OS.SLEEP (Throw_time)
end
Function Throw_item (Redstone_ACTIVE_SIDE, FALL_TIME, Active_time) -This Star Mission Item Through and Releases Mining Activation Signals-
Robot.dropdown (1)
Print ("Pib has been completed")
OS.SLEEP (Fall_time)
Component.redstone.setoutput (redstone_active_side, 15)-Release the mineral activation signal-
OS.SLEEP (Active_time)
Component.redstone.setoutput (redstone_active_side, 0) -Cose off the mining place activation signal-
end
Function main (main_time)-main program-
While true do
Is_occupy (redstone_occupy_side, wait_time1)
Find_item (Location_item, Find_time)
Active_ritual (ritual_time, throw_time)
Throw_item (Redstone_active_side, LOCATION_ITEM, FALL_TIME, Active_time)
OS.SLEEP (main_time)
End
end
main (main_time)-The program runs here-
Here is OC computer code
-[[[Star Automation-OC computer script part
GTNH version: 2.6.1 (Note: The old version is not compatible, this version of the mining opportunity is automatically recycled, the old version needs to be added to the completion of the closing function)
Written by Transd --- 2024.8.10
Note: It is necessary to ensure sufficient LP and power supply. This script only detects the status of a built -in machine activity (available for detecting power and drilling solution)
]]--
LOCAL Component = Require ("Component")
local os = Require ("OS")
LOCAL SIDES = Require ("Sides")
LOCAL GT_MACHINE = {}-Storage mining machine address-
-[[[[[[[[[[[
-Absolute direction--
East (E): Sides.east South (S): Sides.south
West (W): Sides.west North (N): Sides.north
Part: Sides.up: Sides.down
-Staters--
Former: Sides.front after: Sides.back
Left: Sides.left Right: Sides.richt
Part: Sides.up: Sides.down
Note: The relative direction is relative to red stone components.When facing the machine, the front and back are opposite to it.
]]--
-Configuration part--
LOCAL Redstone_active_side = Sides.front- (relative direction) Mining activation surface is in the direction of redstone components (red stone components ("red stone I/O port"/"basic red stone card")---
LOCAL Redstone_occupy_side = Sides.Back- (relative direction) mining feedback surface.The mining machine will continue to activate after the mining machine is free-
local redstone_claern_side = sides.left- (relative direction) rock cleaning activation surface-
LOCAL WAIT_TIME1 = 10-Mining machine activation signal detection interval (affecting message swipe speed)-
LOCAL WAIT_TIME2 = 120-detection interval between the completion of the mining machine (affecting message swipe speed)-
LOCAL CLEARN_TIME = 1200-Cleaning the time of the quarry machine (should not be too short)-
-Configuration part--
Function get_address (GT_MACHINE)-Get the mining machine address-
Local n = 1
For, j in pairs (component.list ()) do
If (j == "gt_machine") then
Print ("Find Host:", I, J)
Gt_machine [n] = i
N = n+1
End end
end
Function wait_redstone (redstone_active_side, wait_time1)-Waiting for the mining machine activation signal-
While Component.redstone.getinput (redstone_active_side) == 0 do
Print ("mining machine is waiting for activation ... (wait ...)")
OS.SLEEP (WAIT_TIME1)-Waiting--
End
end
function active_gt (GT_MACHINE, Redstone_occupy_side)-Activating the mining machine ---
Component.redstone.SetoutPut (redstone_occupy_side, 15) -theveled by the mining machine occupation signal-
For, J in Pairs (GT_MACHINE) do
Local gt = componit.proxy (j)
Gt.setworkallowed (true)
Print ("Active Host:", I, J)
End
end
Function State_GT (GT_MACHINE)-Machine activity status detection-
LOCAL State = 0
While (state == 0) do
Os.sleep (5)
State = 1
For, J in Pairs (GT_MACHINE) do
Local gt = componit.proxy (j)
If (GT.ISWORKALOWED () == False) then
State = 0
Print ("The machine runs a failure, please maintain manually"))
End
OS.SLEEP (10)-Waiting ---
End
End
Print ("The machine is running normally")
end
Function Wait_finish (GT_MACHINE, WAIT_TIME2, Redstone_occupy_side) -The completion of the mining task-
LOCAL TASK = 0
While (task == 0) do
Print ("" Mining Mission Complete ") task = 1
For, J in Pairs (GT_MACHINE) do
Local gt = componit.proxy (j)
If (GT.ISWORKALOWED () == TRUE) then
Task = 0;
End
End
OS.SLEEP (WAIT_TIME2)-Waiting--
End
Print ("Mining Mission has been completed")
end
Function Clearn (Redstone_claern_side, Clearn_time, Redstone_occupy_side)-Rock cleaning-
Component.redstone.setoutput (redstone_claern_side, 15)-Activating the quarry signal-
Print ("Start Rock Cleaning")
OS.SLEEP (Clearn_time)
Component.redstone.setoutput (redstone_claern_side, 0)-Close the quarry signal-
Os.sleep (3)
Component.redstone.SetoutPut (redstone_occupy_side, 0) -Colt the mining machine occupation signal-
Print ("Clean up")
end
Function main ()
Get_address (GT_MACHINE)
While true do
WAIT_REDSTONE (redstone_active_side, wait_time1)-Waiting for activation-
Active_GT (gt_machine, redstone_occupy_side)-activated mining machine-
State_GT (GT_MACHINE)-Machine activity status detection--
Os.sleep (60)
WAIT_FINISH (GT_MACHINE, WAIT_TIME2, RedStone_occupy_side) -The completion of the mining task--
Clearn (redstone_claern_side, clearn_time, redstone_occupy_side)-rock cleaning-
End
end
main ()-The program runs here