Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ar = peripheral.wrap("right")
- pd = peripheral.wrap("top")
- WIDTH <const> = 520
- HEIGHT <const> = 1000
- function getPos()
- return pd.getPlayerPos("StaticShadow")
- end
- ar.clear()
- function drawDot(rotation)
- x = math.floor(WIDTH/360*((360+180-rotation)%360))
- print(x)
- ar.drawItemIconWithId("ind", "minecraft:diamond", x, 250)
- end
- while true do
- local timer = os.startTimer(.01)
- local event, id
- repeat
- event, id = os.pullEvent("timer")
- until id == timer
- pos = getPos()
- rotation = math.floor(pos.yaw+180)
- drawDot(rotation)
- end
Add Comment
Please, Sign In to add comment