Time |
Nick |
Message |
00:15 |
|
dhasenan_ joined #minetest-mods |
00:41 |
|
rmilan joined #minetest-mods |
04:48 |
|
Miner_48er joined #minetest-mods |
06:23 |
|
Miner_48er joined #minetest-mods |
06:47 |
|
LazyJ joined #minetest-mods |
08:30 |
|
jin_xi joined #minetest-mods |
11:19 |
|
PilzAdam joined #minetest-mods |
13:24 |
|
dhasenan_ joined #minetest-mods |
14:53 |
|
Taoki joined #minetest-mods |
17:10 |
|
dhasenan_ joined #minetest-mods |
17:26 |
|
Miner_48er joined #minetest-mods |
18:12 |
dhasenan_ |
I'm trying to get dropped items near a block (throw things into a crucible, get a new item out). find_nodes_in_area only gives me players, and get_objects_in_radius only gets players. I'm not seeing anything in the API that will give me dropped items. |
18:12 |
dhasenan_ |
Any pointers of where to look? |
18:12 |
dhasenan_ |
I've been through most of the lua_api.txt document. |
18:25 |
Zefram_Fysh |
get_objects_in_radius is the correct way. you can recognise dropped-item entities by (object:get_luaentity() and object:get_luaentity().name == "__builtin:item") |
18:26 |
Zefram_Fysh |
if you're not seeing the items you expect, try increasing the radius a bit: maybe your idea of the item's coordinates is a bit off |
18:28 |
Zefram_Fysh |
see the item_tweaks mod for example code. it has logic that makes players attract nearby dropped items |
18:39 |
dhasenan_ |
Thanks. I was getting confused because everything it returned showed "<userdata>" when I tried printing it out. |
19:32 |
|
Collectiv joined #minetest-mods |
19:36 |
|
Collectiv left #minetest-mods |
20:53 |
|
Ritchie joined #minetest-mods |
21:02 |
|
phantombeta joined #minetest-mods |
21:34 |
|
jin_xi joined #minetest-mods |
21:39 |
|
DuDraig joined #minetest-mods |