Using register_on_punchnode with pointed_thing

Post Reply
User avatar
qwrwed
Member
Posts: 325
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

Using register_on_punchnode with pointed_thing

by qwrwed » Post

I am trying to make a tool that will place a node when you use it on a certain node (similar to how buckets used to be), but I would like to be able to dig with it on all other nodes. Looking at the buckets code, I see that was achieved by using pointed_node.above, but it was on_use and on-rightclick - is there any equivalent for register_on_punchnode?

User avatar
Casimir
Member
Posts: 1189
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Post

As far as I know and as far as I understand your problem, it is currently not possible to do that. But you can use on_place for right click, so you could still dig with left.

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

Why can't you use on_use and check what pointed_thing is? You might have to give more detail.

User avatar
qwrwed
Member
Posts: 325
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Post

Basically, I need to make a tool. This is just an example, but when you punch default:stone with it, it places default:sand in front of it. However, you can still dig things that aren't default:stone, but on_use doesn't allow this.

Post Reply

Who is online

Users browsing this forum: Dragonop, freshreplicant, SFENCE and 7 guests