Liquid node callbacks

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

Liquid node callbacks

by Termos » Fri Jan 04, 2019 16:07

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: 3063
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Liquid node callbacks

by Inocudom » Wed Jan 23, 2019 05:19

I don't know how to solve the issue that you are having, but I am wondering why nobody gave any advice here.
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

User avatar
TenPlus1
Member
 
Posts: 2611
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Liquid node callbacks

by TenPlus1 » Wed Jan 23, 2019 06:53

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: 191
Joined: Sun Dec 16, 2018 12:50

Re: Liquid node callbacks

by Termos » Wed Jan 23, 2019 18:50

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.
 


Return to Modding Discussion



Who is online

Users browsing this forum: MSN [Bot] and 5 guests