Invisible Node

Post Reply
User avatar
X17
Member
Posts: 32
Joined: Sat Apr 24, 2021 17:44

Invisible Node

by X17 » Post

My mod wall adds a wall node that can use for game borders. I want that it is invisible, but when I use a empty picture, the node will be black.
How I can make an invisible node?
And I want that no player can dig it. That funktioned, but it can destroyed by TNT.
What can I do that it can't destroyed by TNT?

X17

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: Invisible Node

by Nathan.S » Post

Use an transparent texture, and set the correct alpha option in the node def for the block to be invisible. To prevent it from being exploded check out the on_blast callback.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
X17
Member
Posts: 32
Joined: Sat Apr 24, 2021 17:44

Re: Invisible Node

by X17 » Post

what is the correct alpha option?

User avatar
v-rob
Developer
Posts: 971
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: Invisible Node

by v-rob » Post

I would suggest that you add drawtype = "airlike" in your node definition, which will render your node invisible, no need for extra textures. To stop TNT from blowing it up, use on_blast = function() end, which should stop the majority of TNT mods.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests