Block info on hud?

Post Reply
mase
Member
Posts: 91
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Block info on hud?

by mase » Post

Hi!
Is there a mod, which displays the kind of block I am pointing to?
I don't want to leave the debug info activated all the time.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Block info on hud?

by burli » Post

I only now the identify mod, but it is not very nice and it is a bit verbose.

dawgdoc
Member
Posts: 260
Joined: Mon Feb 27, 2017 01:10
GitHub: dawgdoc

Re: Block info on hud?

by dawgdoc » Post

Check out viewtopic.php?f=11&t=15912&hilit=lookup+tool by Wuzzy. It has a Lookup Tool that goes into your inventory that is activated punching a block.
Give a man a fish, feed him for a day. Give a kid a fish, it's going to die.

User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Block info on hud?

by Wuzzy » Post

Sadly, it doesn't display the block name by merely pointing the block. :-(

mase
Member
Posts: 91
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: Block info on hud?

by mase » Post

I was looking for a permanent info display of the node I am pointing to.
Permanent, not craftable, and without any mouse clicking.
However this mod is also useful.

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Block info on hud?

by sorcerykid » Post

mase wrote:I was looking for a permanent info display of the node I am pointing to.
Permanent, not craftable, and without any mouse clicking.
I don't think what you are describing is even possible because to my knowledge server-side mods can only obtain the position of the pointed node by means of a callback (such as eating, digging, placing, etc.).

mase
Member
Posts: 91
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: Block info on hud?

by mase » Post

So the only solution seems to be keeping the debug info on.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Block info on hud?

by burli » Post

sorcerykid wrote:I don't think what you are describing is even possible because to my knowledge server-side mods can only obtain the position of the pointed node by means of a callback (such as eating, digging, placing, etc.).
It is possible. Take a look at the identify mod I mentioned before. Maybe I need to upload it somewhere because I can't find it myself.

This mod does exactly what you want, but looks ugly. Look at the bottom right corner

Image

If I have time maybe I will make something that looks more like this. I want that myself

Image
Attachments
Bildschirmfoto vom 2017-03-01 20-35-29.png
Bildschirmfoto vom 2017-03-01 20-35-29.png (42.13 KiB) Viewed 815 times
screenshot_20170301_203406.jpg
screenshot_20170301_203406.jpg (269.95 KiB) Viewed 815 times

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Block info on hud?

by sorcerykid » Post

What function returns the pointed node? I searched the API docs, and can't find it.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Block info on hud?

by burli » Post

sorcerykid wrote:What function returns the pointed node? I searched the API docs, and can't find it.
Finally this code uses "get_node()", but the calculation is complex to get the coordinate of the node. The mod has over 800 lines. Maybe it is now a bit easier to do that

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Block info on hud?

by sorcerykid » Post

That's kind of what I figured. It seems the only way to determine the pointed node is with a lot of calculations possibly involving minetest.line_of_sight( ). Perhaps that is what the mod in question is doing.

From my research pointed node information is only passed to the server during user interaction (punching, digging, etc.) by the client via the Server::handleCommand_Interact(NetworkPacket* pkt) method in network/serverpackethandler.cpp. So it is built into the client-server protocol. There is no way to natively obtain the pointed node coordinates exclusively from the server-side without a lot of hacking.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Block info on hud?

by burli » Post

I think, with client side modding it won't be a problem

mase
Member
Posts: 91
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: Block info on hud?

by mase » Post

But with the debug info activated, you get this info without a
special interaction. Maybe the api does not provide this info.

User avatar
MetaNomad
Member
Posts: 27
Joined: Sat Apr 10, 2021 09:58
In-game: MetaNomad

Re: Block info on hud?

by MetaNomad » Post

I was looking for the same, and I found it !

I think THIS is what you are looking for

mase
Member
Posts: 91
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: Block info on hud?

by mase » Post

Thx! I will look into it.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Nicu and 7 guests