Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bind(player_interact,null,array(item: data_values(sponge)),@event,
- if(or(equals(@event['action'],'left_click_block'),equals(@event['action'],'left_click_air'))){
- call_alias('/type')
- }
- if(or(equals(@event['action'],'right_click_block'),equals(@event['action'],'right_click_air'))){
- call_alias('/spot')
- }
- cancel()
- )
- *:/spot = >>>
- assign(@proc,_spot())
- msg('That block is:')
- msg(@proc[0] @proc[1] @proc[2])
- <<<
- *:/type = >>>
- assign(@proc,_spot())
- msg('That block is:')
- msg(@proc[5] @proc[4])
- <<<
- proc(_spot,
- try(
- assign(@spot,pcursor(player()))
- if(equals(@spot[1],0),
- throw(RangeException,'You spoted outside the world')
- )
- ,#CATCH
- die('That block is too far away or is not a valid block')
- )
- assign(@output,@spot)
- array_push(@output,get_block_at(@spot))
- array_push(@output,data_name(@output[4]))
- return(@output)
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement