Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Created September 2, 2012 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilzAdam/3602512 to your computer and use it in GitHub Desktop.
Save PilzAdam/3602512 to your computer and use it in GitHub Desktop.
player:set_inventory_formspec("size[13,7.5]"..
--"image[6,0.6;1,2;player.png]"..
"list[current_player;main;5,3.5;8,4;]"..
"list[current_player;craft;8,0;3,3;]"..
"list[current_player;craftpreview;12,1;1,1;]"..
"list[detached:creative;main;0.3,0.5;4,6;"..tostring(start_i).."]"..
"label[2.0,6.55;"..tostring(pagenum).."/"..tostring(pagemax).."]"..
"button[0.3,6.5;1.6,1;creative_prev;<<]"..
"button[2.7,6.5;1.6,1;creative_next;>>]"..
"label[6,1.5;Trash:]"..
"list[detached:trash;main;6,2;1,1;]")
-- and
local trash = minetest.create_detached_inventory("trash", {
allow_put = function(inv, listname, index, stack, player)
return -1
end,
})
trash:set_size("main", 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment