Overriding on_generated function of the vacuum mod
-
- Member
- Posts: 324
- Joined: Sun Jun 16, 2019 20:17
- Location: x=123, y=120, z=534
Overriding on_generated function of the vacuum mod
I'm working on a mod that depends on vacuum. The vacuum mod has an on_generated function that simply replaces all air blocks with vacuum blocks above a certain y-height. For the mod I am making, there needs to be certain "y-levels" that contain air but are surrounded by vacuum "y-levels." To do this, should I override vacuum's on_generated function, or should I make a second on_generated function that replaces certain vacuum blocks with air blocks?
Currently working on new mods.
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: Overriding on_generated function of the vacuum mod
Registering a new on_generated callback would be the sane solution here. Another option would be to hijack the already registered callbacks and calling them manually before yours depending on the Y value, but I'd not recommend to do that unless you're forced to use plain Lua (no JIT).
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Who is online
Users browsing this forum: No registered users and 7 guests