Making a node give you a different block when broken?
-
- New member
- Posts: 3
- Joined: Thu Aug 11, 2022 16:36
- GitHub: connorhedgehog
- IRC: connorhedgehog
- In-game: connorhedgehog
- Contact:
Making a node give you a different block when broken?
title explains it all, how exactly do i do this? minetest game lets you put drop: whatever when registering the node, but it seems to be exclusive since that doesn't work in my own game. how do i implement this? im extremely curious
- Desour
- Member
- Posts: 1472
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: Making a node give you a different block when broken?
Just set the drop field in the node def accordingly... :P
https://github.com/minetest/minetest/bl ... 8244-L8297
https://github.com/minetest/minetest/bl ... 8244-L8297
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
-
- New member
- Posts: 3
- Joined: Thu Aug 11, 2022 16:36
- GitHub: connorhedgehog
- IRC: connorhedgehog
- In-game: connorhedgehog
- Contact:
Re: Making a node give you a different block when broken?
turns out i just made a few typos, thank you!DS-minetest wrote: ↑Fri Sep 09, 2022 17:28Just set the drop field in the node def accordingly... :P
https://github.com/minetest/minetest/bl ... 8244-L8297
- j0j0n4th4n
- Member
- Posts: 250
- Joined: Tue Jan 26, 2021 06:45
Re: Making a node give you a different block when broken?
I have a similar question, if a node has two drops is it possible for the two to be exclusive from one another like a XOR ?
cdb_894a100ddd76
- Desour
- Member
- Posts: 1472
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: Making a node give you a different block when broken?
I haven't used the advanced drop thing myself yet, but it should be something like this:j0j0n4th4n wrote: ↑Wed Sep 28, 2022 23:36I have a similar question, if a node has two drops is it possible for the two to be exclusive from one another like a XOR ?
Code: Select all
drop = {
max_items = 1, -- only drop one of the lists
items = {
{rarity = 2, items = {"mymod:myitem1"}}, -- chance 1/2: drop this
{rarity = 1, items = {"mymod:myitem2"}}, -- otherwise: drop this
},
}
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Who is online
Users browsing this forum: Bing [Bot], Bla and 12 guests