Skip to content

Instantly share code, notes, and snippets.

mg.register_ore({
name = "air",
seeddiff = 1234,
maxhdistance = 70,
maxvdistance = 70,
maxheight = -3,
seglenghtn = 10,
seglenghtdev = 4,
segincln = 0.2,
segincldev = 0.6,
commit b4373e3d749760a592d11316d843fb087d10ad46
Author: Novatux <nathanael.courant@laposte.net>
Date: Tue Feb 17 12:11:34 2015 +0100
Remove old entities from 0.3, and silence their errror messages.
diff --git a/src/activeobject.h b/src/activeobject.h
index 7689328..ad3f199 100644
--- a/src/activeobject.h
+++ b/src/activeobject.h
commit 082787c1377478fb1852eb3e9ef58d08cea00d70
Author: Novatux <nathanael.courant@laposte.net>
Date: Tue Feb 17 15:01:54 2015 +0100
Ignore old entities from 0.3.
diff --git a/src/activeobject.h b/src/activeobject.h
index 7689328..48f078d 100644
--- a/src/activeobject.h
+++ b/src/activeobject.h
commit 804d65a8ecdb70acf868e0a5a9b6c670b473a70c
Author: Novatux <nathanael.courant@laposte.net>
Date: Wed Feb 18 16:48:58 2015 +0100
Add modname convention checking
Fixes #2037
diff --git a/builtin/mainmenu/dlg_config_world.lua b/builtin/mainmenu/dlg_config_world.lua
index a15e4c1..4d13fae 100644
screwdriver.wallmounted = function(pos, node, user, mode, new_param2)
if mode ~= screwdriver.ROTATE_AXIS then return false end
minetest.set_node(pos, {name = node.name, param2 = (node.param2 + 1) % 6})
return true
end
local achievements_file=minetest.get_worldpath() .. "/achievements"
function read_file(filename)
local f = io.open(filename, "r")
if f==nil then return {} end
local t = f:read("*all")
f:close()
if t=="" or t==nil then return {} end
return minetest.deserialize(t)
end
local achievements_file=minetest.get_worldpath() .. "/achievements"
function read_file(filename)
local f = io.open(filename, "r")
if f==nil then return {} end
local t = f:read("*all")
f:close()
if t=="" or t==nil then return {} end
return minetest.deserialize(t)
end
local CRAFT_TABLE_SIZE = 4
local update_craft_table_inv = function(inv)
inv:set_stack("craftpreview", 1, minetest.get_craft_result({method = "normal", items = inv:get_list("craft"), width = CRAFT_TABLE_SIZE}).item)
end
local update_craft_table = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
update_craft_table_inv(inv)
minetest.register_on_craft(function(itemstack, player, old_craft_list, craft_inv)
for i = 1,9 do
if i~=5 and old_craft_list[i]:get_count() > 0 then
return
end
end
local s = old_craft_list[5]
if s:get_name() == "default:steel_ingot" and s:get_count() >= 9 then
local st = s:to_table()
st.count = st.count - 9
minetest.register_on_generated(function(minp, maxp, seed)
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local a = VoxelArea:new{
MinEdge={x=emin.x, y=emin.y, z=emin.z},
MaxEdge={x=emax.x, y=emax.y, z=emax.z},
}
local va = VoxelArea:new{MinEdge=minp, MaxEdge=maxp}
for _, ore_sheet in ipairs(mg.registered_ore_sheets) do
local sidelen = maxp.x - minp.x + 1