Skip to content

Instantly share code, notes, and snippets.

@Jordach
Jordach / gist:7711006
Last active December 29, 2015 18:29
use gcc clean.c then ./a.out /home/somewhere/.minetest/worlds/world/
/*
* Application to delete empty player files from a minetest world.
* Usage: ./clean /path/to/minetest/world
*
* Criteria for removal of a player file and auth line:
* The player must have nothing in his inventory and mut not have interact.
* This obviously won't work well for servers where interact is granted by
* default, but all you have to do is remove the
* " || strstr(player->privs, "interact")" part for those servers.
*/
jordach@TeslaBolt:~$ ping digitalaudioconcepts.com
PING digitalaudioconcepts.com (173.230.131.206) 56(84) bytes of data.
64 bytes from digitalaudioconcepts.com (173.230.131.206): icmp_req=1 ttl=41 time=263 ms
64 bytes from digitalaudioconcepts.com (173.230.131.206): icmp_req=2 ttl=41 time=251 ms
64 bytes from digitalaudioconcepts.com (173.230.131.206): icmp_req=3 ttl=41 time=253 ms
64 bytes from digitalaudioconcepts.com (173.230.131.206): icmp_req=4 ttl=41 time=259 ms
64 bytes from digitalaudioconcepts.com (173.230.131.206): icmp_req=5 ttl=41 time=259 ms
64 bytes from digitalaudioconcepts.com (173.230.131.206): icmp_req=6 ttl=41 time=263 ms
64 bytes from digitalaudioconcepts.com (173.230.131.206): icmp_req=7 ttl=41 time=257 ms
64 bytes from digitalaudioconcepts.com (173.230.131.206): icmp_req=8 ttl=41 time=277 ms
default.player_register_model("character.b3d", {
animation_speed = 30,
textures = {"character.png", },
animations = {
-- Standard animations.
stand = { x= 0, y= 79, },
lay = { x=162, y=166, },
walk = { x=168, y=187, },
mine = { x=189, y=198, },
walk_mine = { x=200, y=219, },
minetest.register_decoration({
deco_type = "schematic",
place_on = "core:grass",
sidelen = 16,
biomes = {"plains_forest", "plains", "plains_floral"},
fill_ratio = 0.02,
flags = "place_center_x, place_center_z",
schematic = {
size = {x=1, y=1, z=1},
data = {
@Jordach
Jordach / mcore.lua
Last active December 7, 2016 14:00
mcore = {}
-- meshoptions helper function
-- setting meshtypes to:
-- cross is x
-- plus is +
-- croplike is #
-- excroplike is # but the tips are more like a >
-- asterisk is like * but with three faces
@Jordach
Jordach / .lua
Last active January 29, 2017 14:00
local totaldays = minetest.get_day_count()
local totalmonths = 1
local totalyears = years
repeat
totaldays = totaldays - 30
totalmonths = totalmonths + 1
if totalmonths == 13 then
local totaldays = 2982 --minetest.get_day_count()
local totalmonths = 1
local totalyears = 1
while totaldays >= 30 do
totaldays = totaldays - 30
totalmonths = totalmonths + 1
if totalmonths == 13 then
on_place = function(itemstack, placer, pointed_thing)
local stack = ItemStack(":")
local ret = minetest.item_place(stack, placer, pointed_thing)
return ItemStack("newhand:hand "..itemstack:get_count())
end,
2017-02-03 23:49:06: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'digicompute' in callback ScriptApiPlayer::on_playerReceiveFields(): ...release\bin\..\games\great_farm\mods\digicompute/env.lua:94: attempt to index local 'code' (a nil value)
2017-02-03 23:49:06: ERROR[Main]: stack traceback:
2017-02-03 23:49:06: ERROR[Main]: ...release\bin\..\games\great_farm\mods\digicompute/env.lua:94: in function 'run_code'
2017-02-03 23:49:06: ERROR[Main]: ...release\bin\..\games\great_farm\mods\digicompute/env.lua:121: in function 'run_file'
2017-02-03 23:49:06: ERROR[Main]: ...s\great_farm\mods\digicompute/modules/computers/init.lua:528: in function 'run_file'
2017-02-03 23:49:06: ERROR[Main]: ...s\great_farm\mods\digicompute/modules/computers/init.lua:275: in function 'init'
2017-02-03 23:49:06: ERROR[Main]: ...s\great_farm\mods\digicompute/modules/computers/init.lua:113: in function 'handle'
2017-02-03 23:49:06: ERROR[Main]: ...s\great_farm\mods
bucket = {}
bucket.place = {} -- list of liquids to place
bucket.fill = {} -- list of liquids to loop over and set to air
bucket.name = {} -- list of bucket names to return after using the empty bucket
function bucket.give_filled(itemstack2, user2, ltype)
local inv = user2:get_inventory()