How to configure different nodes to have hardness?

Post Reply
Badkraft
Member
Posts: 28
Joined: Wed Jan 27, 2021 13:44

How to configure different nodes to have hardness?

by Badkraft » Post

In MC, blocks have hardness which is what causes one block to be more difficult to break with an appropriate tool than others. An obsidian block takes significantly more hits to break with a diamond pick than a stone block. I want to introduce something similar.

I'm trying to figure out if it's possible as is or if I need to perform some function in a callback.
Last edited by Badkraft on Tue Feb 16, 2021 09:35, edited 1 time in total.

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

Re: How to configure different nodes to have hardness?

by Nathan.S » Post

It is very possible to do this, read up on tool caps. At the time of posting this link takes you to that section in the API.
https://github.com/minetest/minetest/bl ... .txt#L1876
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

Badkraft
Member
Posts: 28
Joined: Wed Jan 27, 2021 13:44

Re: How to configure different nodes to have hardness?

by Badkraft » Post

Read the info at the link. Looks like I might be able to do what I want which is to modify damage to the tool based on the node's hardness. Hardness is not a property of node, though.

I may be thinking too much on this aspect. I'll play around with the cracky value and such to see if I can tune the results.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest