Initial commit, version 1.0.0

master
Wuzzy 2015-07-01 20:19:02 +02:00
commit 83890e2deb
9 changed files with 73 additions and 0 deletions

14
COPYING Normal file
View File

@ -0,0 +1,14 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

10
README.txt Normal file
View File

@ -0,0 +1,10 @@
Bedrock mod.
Version 1.0.0
This mod adds an indestructible bedrock layer at the bottom of the world.
This mod recognizes the following minetest.conf setting:
* `bedrock2_y`: Sets the Y coordinate on which the bedrock layer will be created (default: -30912).

1
depends.txt Normal file
View File

@ -0,0 +1 @@
mesecons_mvps?

1
description.txt Normal file
View File

@ -0,0 +1 @@
Adds an indestructable bedrock layer at the bottom of the world.

47
init.lua Normal file
View File

@ -0,0 +1,47 @@
local bedrock = {}
bedrock.layer = -30912 -- determined as appropriate by experiment
bedrock.node = {name = "bedrock2:bedrock"}
local depth = tonumber(minetest.setting_get("bedrock2_y"))
if depth ~= nil then
bedrock.layer = depth
end
minetest.register_on_generated(function(minp, maxp)
if maxp.y >= bedrock.layer and minp.y <= bedrock.layer then
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local data = vm:get_data()
local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
local c_bedrock = minetest.get_content_id("bedrock2:bedrock")
for x = minp.x, maxp.x do
for z = minp.z, maxp.z do
local p_pos = area:index(x, bedrock.layer, z)
data[p_pos] = c_bedrock
end
end
vm:set_data(data)
vm:calc_lighting()
vm:update_liquids()
vm:write_to_map()
end
end)
minetest.register_node("bedrock2:bedrock", {
description = "Bedrock",
tiles = {"bedrock2_bedrock.png"},
groups = {immortal=1, not_in_creative_inventory=1},
sounds = { footstep = { name = "bedrock2_step", gain = 1 } },
is_ground_content = false,
on_blast = function() end,
on_destruct = function () end,
can_dig = function() return false end,
diggable = false,
drop = "",
})
if minetest.get_modpath("mesecons_mvps") ~= nil then
mesecon:register_mvps_stopper("bedrock2:bedrock")
end

BIN
sounds/bedrock2_step.1.ogg Normal file

Binary file not shown.

BIN
sounds/bedrock2_step.2.ogg Normal file

Binary file not shown.

BIN
sounds/bedrock2_step.3.ogg Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B