This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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:]".. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| minetest.register_alias("mapgen_air", "air") | |
| minetest.register_alias("mapgen_stone", "air") | |
| minetest.register_alias("mapgen_tree", "air") | |
| minetest.register_alias("mapgen_leaves", "air") | |
| minetest.register_alias("mapgen_apple", "air") | |
| minetest.register_alias("mapgen_water_source", "air") | |
| minetest.register_alias("mapgen_dirt", "air") | |
| minetest.register_alias("mapgen_sand", "air") | |
| minetest.register_alias("mapgen_gravel", "air") | |
| minetest.register_alias("mapgen_clay", "air") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| minetest.register_node("mod:name", { | |
| -- other stuff here | |
| on_construct = function(pos) | |
| minetest.env:remove_node(pos) -- delete the node | |
| minete.env:add_item(pos, "wallpaper:roller") -- add the item | |
| end, | |
| -- other stuff here | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[prop.visual = "wielditem" | |
| prop.textures = {itemname} | |
| prop.visual_size = {x=0.20, y=0.20} | |
| prop.automatic_rotate = math.pi * 0.25]] | |
| prop.visual = "cube" | |
| if minetest.registered_items[itemname] and minetest.registered_items[itemname].tiles then | |
| prop.textures = minetest.registered_items[itemname].tiles | |
| for i=6,#minetest.registered_items[itemname].tiles,-1 do | |
| prop.textures[i] = minetest.registered_items[itemname].tiles[#minetest.registered_items[itemname].tiles] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if minetest.setting_getbool("313hummer_fan") and minetest.setting_get("music_frequency") and tonumber(minetest.setting_get("music_frequency")) then | |
| local music = { | |
| {name="313hummer_music_echos", length=26+2*60}, | |
| {name="313hummer_music_", length=0}, | |
| {name="313hummer_music_", length=0}, | |
| {name="313hummer_music_", length=0}, | |
| {name="313hummer_music_", length=0}, | |
| {name="313hummer_music_", length=0}, | |
| {name="313hummer_music_", length=0}, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| minetest.register_chatcommand("spawn", { | |
| params = "", | |
| description = "Rewspawn at spawnpoint", | |
| privs = {}, | |
| func = function(name, param) | |
| local file = io.open(minetest.get_worldpath().."/spawn", "r") | |
| if not file then | |
| minetest.chat_send_player(name, "No spawnpoint found") | |
| return | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local SPAMS_UNTIL_KILL = 3 | |
| local spams = {} | |
| minetest.register_on_chat_message(function(name, message) | |
| if message == string.upper(message) then | |
| if spams[name] then | |
| spams[name] = spams[name]+1 | |
| if spams[name] == SPAMS_UNTIL_BAN then | |
| minetest.chat_send_all(name.." gets killed because of to many spam messages!") | |
| minetest.env:get_player_by_name(name):set_hp(0) | |
| local inv = minetest.env:get_player_by_name(name):get_inventory() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| minetest.register_chatcommand("afk", { | |
| params = "", | |
| description = "Teleport to the spawn point", | |
| privs = {}, | |
| func = function(name, param) | |
| position = minetest.env:get_player_by_name(name):getpos() | |
| minetest.chat_send_player(name, name.." IS NOW AFK AT: "..dump(position)) | |
| test = function() | |
| print("test") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| minetest.register_privilege("creatíve", { | |
| description = "Creative Mode", | |
| give_to_singleplayer = true | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- DEBUG | |
| xp = function(self) | |
| local p = self.object:getpos() | |
| p.x = p.x + 5 | |
| self.moveto(self, p, 1, function(self) | |
| zm(self) | |
| end) | |
| end | |
| xm = function(self) | |
| local p = self.object:getpos() |
OlderNewer