Time Nick Message 00:10 MinetestBot 02[git] 04sofar -> 03minetest/minetest: Sky: transmit body_orbit_tilt to client. (#13193) 132083252 https://github.com/minetest/minetest/commit/2083252c05ece1e47c1c476fda2b9eda3bf332a0 (152023-02-26T00:08:33Z) 02:07 Yad Is there a preferred pastebin for code examples? 02:13 Yad Ah, looks like `Use a pastebin, such as 0bin if you want to post more than 4 lines (e.g. error messages or code)` 02:21 Yad I'm struggling to understand why a game consisting of this code I wrote, produces output of "ignore" or the wrong node type: https://0bin.net/paste/fm46X4Cn#guaqZLuopsRbhOV9v1pK1Y+7IlO95A2h-ZJ355WG4gY 02:42 * muurkha points at Yad 04:06 fluxionary Yad: i'm not sure what i'm looking at, it's a bunch of base64? 04:09 fluxionary and it's not padded 05:06 Yad fluxionary: Hmm, could there be a problem with decrypting the pastebin? 05:07 fluxionary Yad: yes? but why do i need to decrypt anything? 05:08 Yad fluxionary: Hmm, I don't know...I never used this particular pastebin service before...tried it out today because it's suggested on https://wiki.minetest.net/IRC 05:08 fluxionary i've never used it either, no idea why it's recommended there or whether it's you or me doing something wrong 05:09 fluxionary but if i go to a website and git a gob of binary, i'm certainly not going to put too much work into it 05:09 Yad Let's try this one: https://pastebin.mozilla.org/5JJ0vBmN 05:09 fluxionary ok that i can read 05:09 Yad fluxionary: Nice. :D 05:10 Yad That's the entire game in 18 lines. 05:10 fluxionary Yad: i might be missing some context. what're you trying to do? 05:10 Yad I'm trying to read which node the player is standing on. 05:10 Yad As in the name of the node. 05:11 Yad fluxionary: But somehow it seems to read a node name sometimes but generally not. 05:11 Yad The base texture PNG is just a 1x1 white pixel. 05:12 fluxionary Yad: hm, that *looks* right, but i'm never 100% certain whether player:get_pos().y - 0.5 is the y-coord below the player, or the y-coord of the edge of the player's feet and what's below? 05:13 fluxionary Yad: you might want to do "- 1.0" instead? 05:14 fluxionary yad: also, if you're doing anything "interesting" w/ player models and entity attachments, you might need some more logic 05:18 fluxionary after testing, `vector.offset(player:get_pos(), 0, -0.5, 0)) *should* point at the node below the player's feet, if the player is standing on a full solid node 05:19 Yad fluxionary: Thank you, I'll have to give that a try. 05:19 fluxionary Yad: well, i just replicated what you were doing, nothing new 05:19 fluxionary just verifying the offsets were right. 05:20 fluxionary and they are, i think 05:20 fluxionary anyway, going to bed. hope you figure out what you're trying to do. 07:33 Blockhead256[m] is there a mod where I can easily get priv-protected locked doors? I suppose it wouldn't be hard to homebrew 10:13 MTDiscord the player pos is the feet pos, so you should keep your offset as small as possible 10:13 MTDiscord I'd advise something like 0.01 18:52 MTDiscord I've now pushed a highly experimental b3d to glTF converter to modlib: https://github.com/appgurueu/modlib/commit/f7d2b005e1de385bf298b8e0ad6c8ca8301d1b7e 20:23 fluxionary i've noticed that some parts of the lua_api totally missing from the documentation, e.g. `minetest.on_craft`. should those not be used because they're undocumented, or should they be documented? 20:25 MTDiscord You mean register_on_craft? Thats documented here https://github.com/minetest/minetest/blob/5.6.1/doc/lua_api.txt#L5215-L5222 20:25 fluxionary no, https://github.com/minetest/minetest/blob/2083252c05ece1e47c1c476fda2b9eda3bf332a0/builtin/game/register.lua#L319-L325 20:28 MTDiscord Aha 20:28 MTDiscord Looks like the internal handler for registered_on_crafts 20:29 fluxionary there's several other similar functions, though i've never made a list. i've got reason to use that one currently, which is to invoke all those on_craft callbacks when using the "craft all" button from the unified_inventory_plus mod, but it feels slightly off to use it because it's not documented 20:30 MTDiscord Though less elegant, you could simply duplicate the body of that function 20:30 MTDiscord Actually sorry no, I guess the actual output is handled by the engine 20:31 fluxionary hm? the engine calls that handler when "doing a craft" https://github.com/minetest/minetest/blob/2083252c05ece1e47c1c476fda2b9eda3bf332a0/src/inventorymanager.cpp#L896 20:32 MTDiscord Well if you are handling all of your output manually via the "craft all" button then I guess you can in fact just call the callbacks manually 20:32 MTDiscord The itemstack return was confusing me, sorry 20:33 MTDiscord It would be safest to copy the function body in the event that on_craft is removed, but I dont see it going away any time soon 20:35 fluxionary my hesitation in copying it is that it technically can be over-written by mods currently, which would again result in different behavior when crafting "normally" and when using "craft all"... then again, i really doubt anyone is doing that in practice. 20:36 fluxionary `registered_on_crafts` isn't documented either, for that matter 20:37 MTDiscord Heh, at that point I just say "do whatever", since thats basically the Minetest mentality for documentation :] 20:38 fluxionary alright, yeah. i'll put a note in the unified_inventory_plus code about that in case it becomes a problem in the future 20:57 Eze14Mu #minetast new for now so need some people in 22:19 MinetestBot 02[git] 04lhofhansl -> 03minetest/minetest: Don't expire blocks visible to the client. (#13255) 13fe3ea09 https://github.com/minetest/minetest/commit/fe3ea090d17ced157bd8fdd047b6b635a1413a76 (152023-02-26T22:18:18Z) 22:20 muurkha heh 23:07 Yad fluxionary: Hmm, your idea of using `vector.offset` now produces a table? https://pastebin.mozilla.org/Hgp8SuDE