Page 1 of 1

How do I define my own group?

PostPosted: Tue Jun 24, 2014 20:46
by drkwv
I need to create a block that:
1. is diggable by bare hands
2. but sounds like a stone upon digging (like a stone that is being digged by axe)
3. and has some custom crack pattern (if that possible)

Probably I need to define my own group for this, but how do I do this? Maybe there is some mods that have custom groups I can look into?

Re: How do I define my own group?

PostPosted: Tue Jun 24, 2014 21:11
by RHR
You do not need an own group for that:

1. is diggable by bare hands
oddly_breakable_by_hand = 3

2. but sounds like a stone upon digging (like a stone that is being digged by axe)
has nothing to do with tool, just use the stone sound:
sounds = default.node_sound_stone_defaults()

3. and has some custom crack pattern (if that possible)
change the crack_anylength.png texture to your custom crack pattern.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("YourModName:YourBlockName", {
   tiles = {"YourTexture.png"},
   groups = {oddly_breakable_by_hand = 3}, -- or: groups = {oddly_breakable_by_hand = 3, choppy = 3},
   sounds = default.node_sound_stone_defaults(),
})


Please post your future modding questions here:
viewtopic.php?f=9&t=4668&p=146064#p146064

Re: How do I define my own group?

PostPosted: Sun Jun 29, 2014 18:07
by Calinou
Only one crack pattern can be used at a time; it's currently not possible to change the crack texture based on the block being dug.