Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --local range = 8
- local scale = 0.125
- local interval = 0.03
- local xrayBlocks = {
- ["minecraft:gold_ore"] = true,
- ["minecraft:iron_ore"] = true,
- ["minecraft:coal_ore"] = true,
- ["minecraft:lapis_ore"] = true,
- ["minecraft:diamond_ore"] = true,
- ["minecraft:redstone_ore"] = true,
- ["minecraft:emerald_ore"] = true,
- ["minecraft:quartz_ore"] = true,
- ["appliedenergistics2:quartz_ore"] = true,
- ["appliedenergistics2:charged_quartz_ore"] = true,
- ["draconicevolution:draconium_ore"] = true,
- ["immersiveengineering:ore"] = true,
- ["mysticalagriculture:prosperity_ore"] = true,
- ["rftools:dimensional_shard_ore"] = true,
- ["thaumcraft:ore_amber"] = true,
- ["thaumcraft:ore_cinnabar"] = true
- }
- local offset = 0--scale / -2
- local modules = peripheral.wrap("back")
- local canvas3d = modules.canvas3d().create()
- print("Starting xray Program, there should be a way to hide this altogether dammit")
- --parallel.waitForAny(function()
- while true do
- canvas3d.clear()
- canvas3d.recenter()
- local offsetX, _, offsetZ = gps.locate()
- offsetX = offsetX % 1 * 0.5
- offsetZ = offsetZ % 1 * 0.5
- for _, block in pairs(modules.scan()) do
- if xrayBlocks[block.name] then
- canvas3d.addItem({
- (block.x - offsetX) * scale + offset,
- block.y * scale + offset, -- having an offset for y is difficult due to crouching
- (block.z - offsetZ) * scale + offset
- }, block.name,
- 0, scale)
- end
- end
- os.sleep(interval)
- --print("h")
- end
- --[[end,
- function()
- os.pullEvent("key")
- end)]]
- canvas3d.clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement