Block info on hud?

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

Block info on hud?

by mase » Sun Feb 26, 2017 16:53

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: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Block info on hud?

by burli » Sun Feb 26, 2017 17:37

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

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

Re: Block info on hud?

by dawgdoc » Mon Feb 27, 2017 01:19

Check out https://forum.minetest.net/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.
 

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

Re: Block info on hud?

by Wuzzy » Tue Feb 28, 2017 02:54

Sadly, it doesn't display the block name by merely pointing the block. :-(
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

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

Re: Block info on hud?

by mase » Tue Feb 28, 2017 11:08

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: 219
Joined: Fri Aug 26, 2016 15:36
In-game: Nemo

Re: Block info on hud?

by sorcerykid » Wed Mar 01, 2017 18:40

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: 39
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: Block info on hud?

by mase » Wed Mar 01, 2017 19:03

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

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

Re: Block info on hud?

by burli » Wed Mar 01, 2017 19:38

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 2343 times
screenshot_20170301_203406.jpg
screenshot_20170301_203406.jpg (269.95 KiB) Viewed 2343 times
 

User avatar
sorcerykid
Member
 
Posts: 219
Joined: Fri Aug 26, 2016 15:36
In-game: Nemo

Re: Block info on hud?

by sorcerykid » Wed Mar 01, 2017 19:57

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

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

Re: Block info on hud?

by burli » Wed Mar 01, 2017 20:05

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: 219
Joined: Fri Aug 26, 2016 15:36
In-game: Nemo

Re: Block info on hud?

by sorcerykid » Wed Mar 01, 2017 21:59

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: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Block info on hud?

by burli » Thu Mar 02, 2017 05:39

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

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

Re: Block info on hud?

by mase » Thu Mar 02, 2017 11:05

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


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 87 guests

cron