Disable selection box on specific blocks?

Post Reply
User avatar
Joseph16
Member
Posts: 310
Joined: Tue Dec 06, 2016 05:35
In-game: smb3

Disable selection box on specific blocks?

by Joseph16 » Post

Maybe add a new parameter like ShowSelectionBox = true or false. This would be nice for grass and water were a if box around it when it is under your cursor looks weird.
Testin' mines since 1989

User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Disable selection box on specific blocks?

by Sergey » Post

You can pick grass and it should be selected to do it.
Water node can be selected only when you hold bucket.

So I don't think selection feature should be disabled for specific nodes.
Last edited by Sergey on Wed May 31, 2017 14:07, edited 2 times in total.

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: Disable selection box on specific blocks?

by octacian » Post

https://rubenwardy.com/minetest_modding ... ister_node

Look for the "pointable" option. If set to false, selection box will not be shown on that node.

A non-pointable Node:

Code: Select all

minetest.register_node("mymod:node", {
  description = "My Non-pointable Node",
  tiles = {"mymod_node.png"},
  groups = {cracky = 3},
  pointable = false,
})
The above is a very basic node definition that could be used to test the concept. However, if pointable is set to false, it will mean that when you point at the node and try to break it, you'll just break the node under it. The only somewhat reliable way to hide the selection box while still being able to break the node is to set the "selection_box" property to be just a tiny bit smaller than the node itself.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests