Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local command_block = peripheral.wrap("right")
- processor_types = {
- "engineering_processor_press",
- "logic_processor_press",
- "silicon_processor_press",
- "calculation_processor_press"
- }
- function exec(cmd)
- command_block.setCommand(cmd)
- command_block.runCommand()
- end
- function setBlockRaw(x, y, z, t)
- exec("setblock "..x.." "..y.." "..z.." "..t)
- end
- function sphere(x, y, z, r, t)
- for i = -r, r, 1 do
- for j = -r, r, 1 do
- for k = -r, r, 1 do
- if math.sqrt(i*i + j*j + k*k) <= r then
- xi = x + i
- yi = y + j
- zi = z + k
- setBlockRaw(xi, yi, zi, t)
- end
- end
- end
- end
- end
- function spawnMeteorAt(x, y, z)
- sphere(x, y, z, math.random(3,5), "appliedenergistics2:sky_stone_block")
- proc_t = processor_types[math.random(4)]
- block="appliedenergistics2:sky_stone_chest{inv:{item0:{id:\"appliedenergistics2:"..proc_t.."\",Count:1b}},up:\"UP\"}"
- setBlockRaw(x, y, z, block)
- end
Advertisement
Add Comment
Please, Sign In to add comment