add quantum entangler code

This commit is contained in:
LordMZTE 2022-03-20 00:19:24 +01:00
parent 35b3f6d15b
commit 5fcc972a99
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6

View file

@ -0,0 +1,36 @@
local tnt = peripheral.wrap "right"
local singularity = peripheral.wrap "left"
local ender_dust = peripheral.wrap "minecraft:dropper_0"
local vac = peripheral.wrap "thermal:device_collector_0"
local function item_count(list)
local count = 0
for _, v in pairs(list) do
count = count + v.count
end
return count
end
while true do
if
#vac.list() == 0
and item_count(tnt.list()) >= 1
and item_count(singularity.list()) >= 5
and item_count(ender_dust.list()) >= 5
then
local i = 0
while i < 5 do
i = i + 1
redstone.setOutput("left", true)
os.sleep(0.1)
redstone.setOutput("left", false)
os.sleep(0.1)
end
os.sleep(1)
redstone.setOutput("right", true)
os.sleep(0.1)
redstone.setOutput("right", false)
end
os.sleep(25)
end