Reshuflin'

This commit is contained in:
Olive 2022-09-21 19:37:07 +01:00
parent 997fdf98fe
commit c5da2c9c8f
3 changed files with 35 additions and 21 deletions

View File

@ -10,7 +10,7 @@ A recreation of Cave Game, the earliest version of Minecraft.
Whilst looking like cobble, stone is infact `minecraft:stone`. Whilst looking like cobble, stone is infact `minecraft:stone`.
Technical names `minecraft:nnn` and `nnn` are aliases to the "modern" Minecraft names. Block's ID are aliased to their "modern" Minecraft name.
Select mapgen `singlenode` for a truly flat world. Select mapgen `singlenode` for a truly flat world.
Mapgen v6 unsupported. Mapgen v6 unsupported.

View File

@ -1,5 +1,28 @@
if minetest.get_mapgen_params().mgname == "singlenode" then local mgparams = minetest.get_mapgen_params()
if mgparams.mgname == "v6" then
error("Mapgen 'v6' is not supported by Cave Game.", 0)
end
minetest.register_alias("mapgen_stone", "minecraft:stone")
minetest.register_alias("mapgen_water_source", "air")
minetest.register_alias("mapgen_river_water_source", "air")
-- FIXME: Why dosen't node_top work properly?
minetest.register_biome({
name = "cavegame",
node_dust = "minecraft:grass",
-- node_top = "minecraft:grass",
-- depth_top = 1,
node_stone = "minecraft:stone",
heat_point = 50,
humidity_point = 50,
y_min = -3100, y_max = 3100,
})
if mgparams.mgname == "singlenode" then
local ground_level = tonumber(minetest.settings:get("water_level") or 1) local ground_level = tonumber(minetest.settings:get("water_level") or 1)
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
local stone = minetest.get_content_id("minecraft:stone") local stone = minetest.get_content_id("minecraft:stone")
@ -39,16 +62,4 @@ if minetest.get_mapgen_params().mgname == "singlenode" then
return true return true
end) end)
end end
else
-- FIXME: Why dosen't node_top work properly?
minetest.register_biome({
name = "cavegame",
node_dust = "minecraft:grass",
-- node_top = "minecraft:grass",
-- depth_top = 1,
node_stone = "minecraft:stone",
heat_point = 50,
humidity_point = 50,
y_min = -3100, y_max = 3100,
})
end end

View File

@ -1,11 +1,16 @@
minetest.register_alias("mapgen_stone", "minecraft:stone") minetest.register_on_mods_loaded(function()
minetest.register_alias("mapgen_water_source", "air") for name,def in pairs(minetest.registered_nodes) do
minetest.register_alias("mapgen_river_water_source", "air") if def.order then
minetest.register_alias(tostring(def.order), name)
end
end
end)
minetest.register_alias("1", "minecraft:stone")
minetest.register_alias("minecraft:1", "minecraft:stone") -- nodes --
minetest.register_node(":minecraft:stone", { minetest.register_node(":minecraft:stone", {
order = 1, order = 1,
description = "Stone", description = "Stone",
@ -14,8 +19,6 @@ minetest.register_node(":minecraft:stone", {
is_ground_content = true, is_ground_content = true,
}) })
minetest.register_alias("2", "minecraft:grass")
minetest.register_alias("minecraft:2", "minecraft:grass")
minetest.register_node(":minecraft:grass", { minetest.register_node(":minecraft:grass", {
order = 2, order = 2,
description = "Grass", description = "Grass",