Time Nick Message 07:29 DrFrankenstone Is there a way in lua for a node to know when a block next to it has changed (like BUD switches in Minecraft), or would this be achieved with ABM polling? 07:31 sfan5 polling sounds like a bad idea performance-wise, using register_on_placenode/dignode might be better 07:32 sfan5 (though that won't cover all possible changes, so polling is the last alternative) 07:36 DrFrankenstone register_on_placenode can probably be bent to the task 11:36 andirc8000 Can someone help me please I want a node to be destroyed with a single punch (and only one node and not the nodes behind it) so here is my modification of oneclick mod (or is it the original one (?)): https://hastebin.com/veruyoyujo.lua it works fine but it destroys sometimes 2 nodes at once 11:38 andirc8000 what If I "punched" a node with "almost infinite" strength instead? Would it still unnecessarily destroy the node behind it? 11:39 andirc8000 instead of using remove_node(pos) * 13:25 andirc8000 anyone? 14:22 tggt #minetest 14:22 tggt #minetest-ctf 14:24 tggt ##minetest-ctf 14:24 ANAND ?? 14:24 tggt how to go on ctf IRC? 15:52 greeter greetings. got a mod's question. a friend of mine and i are both running our own servers. on his, he can dye stone bricks different colors, but on mine i can't. i thought unifieddyes was the mod i was missing but it still doesn't work. any ideas how to get that working? 15:55 Krock greeter, craft a colored stone brick on his server and use the F5 information to find out how the node is called 15:55 Shara greeter: half-guessing, but maybe colormachine? 15:56 Krock that will also tell you the mod which is required to add the colored stone (usually) 15:56 greeter ah great thank you kindly 15:56 Shara I was going to say that, then realise it might be registering it through something, so not showing the right name :P 15:57 Shara You can also check which mods are running on their server 15:58 greeter i'm looking at that, but i have almost all the same mods they do, the ones that are different have nothing to do with colors 15:59 greeter at first i thought maybe they had a more up to date unifieddyes but that update didn't work lol 15:59 Shara Are both servers public? 15:59 greeter no, mine is but his is locally run 16:00 Krock also watch out for mod conflicts or errors in your server's debug.txt - maybe some dependencies weren't satisfied 16:00 Krock i.e. mods weren't loaded even though you marked them as to-load in the world configuration file 16:03 Shara Can I ask which is yours? (randomly curious) 16:04 greeter i'll notice you the details. also i'll check that out Krock 16:10 Krock Shara, it's a secret..? :P 16:11 Shara Seems like :) 16:11 Krock Shara, heh, looks like you've found him 16:11 Krock ravenchat creative ? 16:12 Shara Who knows? 16:13 Krock Me! 16:19 greeter yeah that's it, i just didn't want it to be construed as spamming is all, but it's no secret 16:20 Shara I don't think it's spamming when directly asked :) 16:22 greeter https://forum.minetest.net/viewtopic.php?id=2574 umm i think there's a problem with the images here :\ 17:04 Vanta Hey guys, I have this tiny code snippet https://pastebin.com/F37kG3CN I'm trying to decorate underground caverns with schematics, but for some reason they never spawn, though function returns true 17:04 Vanta I mean it's just an example code 17:04 Vanta There are 2 lines, one replaces blocks and seconds spawns schematics. Block replacement works just fine 17:23 Krock Vanta, A problem I can see there is the mod security: If you run this code outside of the default mod, then it may not have access to that file. 17:26 Vanta It would report that, that it can't access the file 17:26 Vanta Instead, function finishes without any problems and returns true value 17:29 Krock just looked up the code. it doesn't check whether the mod has access to the schematic or not 17:29 Krock but you're only passing "vm" to the placement function 17:29 Krock this means "data" stays unlatered 17:30 Krock *unaltered 17:30 Krock afterwards you're kinda overwriting the placement: vm:set_data(data) 17:31 Krock i.e. you can't use data[vi] = foobar and place_schematic_on_vmanip in the same loop 17:32 Krock ^ Vanta (just to notify) 17:34 Vanta Well I put data[vi] just for example, it didn't work anyway without it, anyway place_schematic_on_vmanip should overwrite that action anyway 17:36 Krock well yes. should, but doesn't because the code tells otherwise 17:38 Krock "data" is Lua-only and the C++ side does not update it when placing a schematic directly into the vmanip 17:38 Vanta I see 17:45 Vanta So I should make another separate loop that doesn't write anything to voxel manipulator, for spawning schematics? 17:46 Vanta I mean not setting vm data and neither writes anything to map 17:49 Krock To still get the same effect, you can 1) get the vm data 2) data[vi] = foobar in the loop & cache the positions to a new table 3) set data 4) discard data 5) loop through the cached positions 17:49 Krock .. and place the schematics 17:50 Vanta I see, I guess that's why people place empty nodes with schematic spawning abms instead, haha 17:51 Krock they should rather use node timers instead of abms - it also spreads the load on the server, i.e. reduces the on-generate lag 17:59 Vanta Big thanks for help 18:00 Krock !next 18:00 MinetestBot Another satisfied customer. Next! 18:59 Vanta Another question: how can I do operations (for example cave decoration) after it's already been generated? Here is an example snippet, https://pastebin.com/vZrAyZpj 18:59 Vanta It never passes the check if node is air 18:59 Vanta I can only assume that at the moment of execution caves are not generated yet and everything is stone 19:20 paramat Vanta see https://github.com/paramat/planets/blob/c325020d994644786a51967d3776b97d82f46029/init.lua#L396 for an example 19:22 paramat use 'place schem on vmanip' between 'set data' and 'write to map', and create a table of positions between 'get data' and 'set data' 19:22 paramat as Krock advised 19:24 swift110 hey all 19:28 paramat Vanta in your 2nd code paste, you are not changing 'ivm' in the y loop 19:29 paramat the loop is better in ZYX order, then you can just do ivm = ivm + 1 in the x loop 19:33 Vanta Yes, I've noticed, I just copypasted this from somewhere 19:34 Vanta It still wouldn't work though, because I'm testing if content_id is default:air 19:34 Vanta While it should be just "air" 19:34 paramat yes 19:35 paramat anyway, in 'on generated' everything has been generated, including caves 19:35 Vanta Well, I had "working" snippet before that did detect stone but didn't detect air, so I came to this false conclusion that caves are generated later 19:36 Vanta And tried altering the code, searched for examples, came up with the snipped you've seen, but all this time I've been checking for wrong node id 19:38 Vanta Why I should just make another loop only for placing decorations? Perfomance reasons? 19:38 Vanta should'nt* 19:38 Vanta I mean schematics 19:40 paramat because 'place on vmanip' adds a schem to 'vm', not 'data'. so in your paste when you did 'set data (to vm)' you were overwriting the schems you had added to 'vm' 19:40 Vanta No, I mean completely separate loop that just does place_schematic_on_vmanip 19:40 Vanta Without setting and writing to map vm data 19:45 Vanta https://pastebin.com/QZ0jdCdU 19:45 Vanta This for example 19:45 Vanta It works for me 19:45 paramat ah you mean using 'place schematic' instead? 19:45 Vanta no, using place_schematic_on_vmanip 19:47 paramat ok yes just saw the paste 19:48 paramat i can't see how that paste works, you never write the vm to map after adding the schematics 19:49 Vanta I don't know either, but it does exactly what I want, on first loop it adds floating bush leaves to air, on second loop it spawns trees on stone nodes 19:50 paramat plus you have already looped through the mapchunk already, doing it twice may be pointless, might as well create a table of positions n the first loop 19:50 paramat hm weird :) 19:51 Vanta Well yes that's why I had doubts about that eariler 19:55 Vanta https://imgur.com/a/eDnSeWY it's dark and trees are too dense (1/5 chance of spawn) but they are clearly spawned 20:03 Krock don't pass "data" to write_to_map 20:03 Krock and move write_to_map below the 2nd 3D-loop 20:03 Krock that should solve the lighting issues IIRC 20:10 paramat "don't pass "data" to write_to_map" yes, that's a common mistake started by a mistake in hmmmm's lvm example 20:11 paramat even if it works it's still bad code ;) 20:12 Vanta Well anyway now I have read voxel manipulator wiki page and seen methods 20:14 Gael-de-Sailly you should define your content_id once, at beginning 20:14 Gael-de-Sailly avoid using it in the loop, it takes time 20:14 Vanta It's just a test example 20:31 paramat the wiki page is probably out of date and misleading. i made a thread in the news forum with a good example 22:23 MineLord Is there a way to have multiple admin accounts for a server? 22:28 ThomasMonroe yes 22:28 ThomasMonroe just grant them 'all' :P 22:32 MineLord Thanks