Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local hologram = component.hologram
- function setVoxel(x, y, z, value)
- local current = hologram.get(x, z)
- local positiveMask = bit32.lshift(1, y - 1)
- if value then
- hologram.set(x, z, bit32.bor(current, positiveMask))
- else
- local negativeMask = bit32.bnot(positiveMask)
- hologram.set(x, z, bit32.band(current, negativeMask))
- end
- end
- local args = {...}
- setVoxel(tonumber(1), tonumber(1), tonumber(1), true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement