This is a peripheral that scans a block at a given position and returns the id, the recipie is:
SDS S = Stone
SMS D = Diamond
SSS M = Map(used)
Functions (mapper is the wrapped peripheral):
mapper.getBlockId(x, y, z)
I'm expecting people to ask why it is so expensive, the reason is the possibilites, the right know-how will have you end up with a turtle that can automatically navigate to diamond ore blocks and mine them.
By the way, thanks to all of the people who helped me make this, you have helped me reach the minecraft modding milestone of my life. :)/>/>
Download: https://www.dropbox....f/CCMappers.zip
SRC: https://www.dropbox....Mappers_SRC.zip
EDIT: Complementary program, cause' I'm nice like that:
Spoiler
mapper = peripheral.wrap("left")
tw, tl = term.getSize()
id = {
-- Index + colour for identification, for example to make dirt (id 3) display as brown do:
-- [3] = colours.brown
}
term.clear()
term.setCursorPos(1,1)
-- Input starting co-ords
term.write("XPOS: ")
sx = tonumber(read())
term.write("YPOS: ")
sy = tonumber(read())
term.write("ZPOS: ")
sz = tonumber(read())
-- Amount of blocks to move on each key press
term.write("Sensitivity: ")
sen = tonumber(read())
function draw()
for i = 0, tw do
for n = 0, tl do
sid = mapper.getBlockId((sx-(tw/2)+i), sy, (sz-(tl/2)+n))
paintutils.drawPixel(i+1, n+1, id[sid])
end
end
paintutils.drawPixel(tw/2, tl/2, colours.red)
term.setBackgroundColour(colours.black)
term.setCursorPos(1,1)
term.write("X: " .. sx .. " Y: " .. sy .. " Z: " .. sz)
end
-- Space and shift moves up/down
-- Arrow keys move according to direction (up arrow is north, etc...)
function waitForKey()
event, key = os.pullEvent("key")
if key == 200 then
sz = sz - sen
elseif key == 208 then
sz = sz + sen
elseif key == 203 then
sx = sx - sen
elseif key == 205 then
sx = sx + sen
elseif key == 57 then
sy = sy + 1
elseif key == 42 then
sy = sy - 1
end
end
while true do
draw()
waitForKey()
end
NOTICE: I will probably ditch this now as there is a much better available peripheral availiable at: http://www.computerc...layer-and-more/