parent
99b83ddc25
commit
e90ce3c6f3
|
@ -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.
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# Bedrock [`bedrock2`]
|
||||
|
||||
Version 1.2.2
|
||||
|
||||
## Description
|
||||
This mod adds an indestructible bedrock layer at the bottom of the world.
|
||||
|
||||
## Configuration
|
||||
This mod recognizes the following minetest.conf setting:
|
||||
|
||||
* `bedrock2_y`: Sets the Y coordinate on which the bedrock layer will be created (default: -30912).
|
|
@ -0,0 +1,3 @@
|
|||
default_override
|
||||
intllib?
|
||||
mesecons_mvps?
|
|
@ -0,0 +1 @@
|
|||
Adds an indestructable bedrock layer at the bottom of the world.
|
|
@ -0,0 +1,38 @@
|
|||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S
|
||||
if minetest.get_modpath("intllib") then
|
||||
S = intllib.Getter()
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
|
||||
local bedrock = {}
|
||||
|
||||
bedrock.layer = -64 -- determined as appropriate by experiment
|
||||
bedrock.node = {name = "default_override: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("default_override: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)
|
|
@ -0,0 +1,2 @@
|
|||
Bedrock = Grundgestein
|
||||
Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer. = Grundgestein ist sehr hart. Es kann nicht gegraben, verändert, zerstört oder bewegt werden. Es taucht am Boden der Welt in einer flachen Ebene auf.
|
|
@ -0,0 +1,2 @@
|
|||
Bedrock
|
||||
Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer.
|
|
@ -0,0 +1 @@
|
|||
name = bedrock2
|
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
|
@ -0,0 +1,2 @@
|
|||
# Sets the height (Y) at which the bedrock layer will be created.
|
||||
bedrock2_y (Bedrock height) int -64
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 327 B |
|
@ -1 +0,0 @@
|
|||
Subproject commit 5fe9e87b97f9654dde7141938836c8d7e23f2616
|
Loading…
Reference in New Issue