Liquid node callbacks

Post Reply
Termos
Member
Posts: 417
Joined: Sun Dec 16, 2018 12:50

Liquid node callbacks

by Termos » Post

I'm trying to get some code to run when liquid floods an air node. I tried on_construct on flowing water node but it doesn't seem to work for liquids, verified this by running the same code except with 'dirt' and it worked.
on_flood on the other hand, the docs say it doesn't work for air nodes.

Is there any way to intercept the event that an air(&like) node is replaced by liquid?

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Liquid node callbacks

by Inocudom » Post

I don't know how to solve the issue that you are having, but I am wondering why nobody gave any advice here.

User avatar
TenPlus1
Member
Posts: 3721
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Liquid node callbacks

by TenPlus1 » Post

The only callback you could possibly use is on_flood which you would need to override 'air' node and insert, but this may be slow.

Termos
Member
Posts: 417
Joined: Sun Dec 16, 2018 12:50

Re: Liquid node callbacks

by Termos » Post

Thanks, alas, on_flood is useless as well.

I was asking in context of this

Finally I used active block modifiers, which is the wrong way technically speaking, but there seems to be no other way.
Surprisingly, there's no noticeable impact on performance.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests