Compare commits

..

36 Commits

Author SHA1 Message Date
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 ee2418f91c Merge pull request 'mapgen mod compatibility' (#409) from FaceDeer/MineClone5:mapgen_mod_compatibility into master
Reviewed-on: MineClone5/MineClone5#409
2022-09-16 18:10:14 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 56b915d51d Merge pull request 'Fix Smoker and Blast Furnace Aliases, and potatoes can now be cooked in the smoker.' (#413) from smoker_blast_furnace_fixes into master
Reviewed-on: MineClone5/MineClone5#413
2022-09-07 17:48:09 +00:00
PrairieWind ba47414a95 Fixed Smoker and Blast Furnace Aliases, and potatoes can now be cooked in the smoker. 2022-09-03 10:19:49 -06:00
3raven 52d311119f Merge pull request 'cohésion/fix translation' (#411) from 3raven-patch-2 into master
Reviewed-on: MineClone5/MineClone5#411
2022-08-24 04:36:37 +00:00
3raven 3cee342f1f cohésion/fix translation 2022-08-24 04:35:35 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 15ac28d000 Merge pull request 'Beacons from MineClone2' (#395) from chmodsayshello/MineClone5:mcl5_beacons into master
Reviewed-on: MineClone5/MineClone5#395
2022-08-16 17:59:16 +00:00
FaceDeer 7e0cfed1b5 Add a log warning wrapper to calls to register_on_generated, as discussed in MineClone5/MineClone5#399 2022-08-15 11:06:48 -06:00
chmodsayshello 19df0fb5d7 update init.lua 2022-08-13 10:03:06 +00:00
FaceDeer 5cc0288a03 found a typo 2022-08-13 02:22:46 -06:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 a50255cb97 Merge pull request 'Make dirt head debugging an option, and disable head_code by default if has_head is not defined.' (#402) from fbievan/MineClone5:fix-heads into master
Reviewed-on: MineClone5/MineClone5#402
2022-08-10 18:15:20 +00:00
Your Name 841789f010 removed soemthing i was messing with lmao 2022-08-09 12:43:46 -05:00
Your Name 7270094619 Moved variable to align with other ones 2022-08-09 12:42:16 -05:00
Your Name 3a77a97e2d moved identetion of debug_head variable 2022-08-09 12:36:22 -05:00
Your Name 384e5ece67 Moved debug_head above function. 2022-08-08 15:50:30 -05:00
Your Name da81f0b5b4 Cache output of function to variable then call it 2022-08-08 10:32:32 -05:00
Your Name 6ac082aff7 add indent 2022-08-08 09:53:31 -05:00
FaceDeer eef5c0dc46 add an override setting for rail tunnel heights 2022-08-07 18:00:26 -06:00
Your Name cdb881ff9a Fixed formatting (I think?) 2022-08-07 17:36:12 -05:00
Your Name cce8dcce97 remove newline 2022-08-07 10:45:51 -05:00
Your Name 71f0d9364a Fix formatting 2022-08-07 10:44:21 -05:00
Your Name 2b39a1b9bf Make debugging head dirt an option 2022-08-07 10:25:46 -05:00
Your Name e6cb2c48b7 make has_head actaully do something, and if not has_head is not defined disable head code for mob 2022-08-07 10:04:28 -05:00
FaceDeer ae60960a00 add callbacks mapgen mods can use to alter locally-saved copies of settings, reveal register_on_generated 2022-08-06 20:27:44 -06:00
chmodsayshello d4da512309 mcl_beacons: textures 2/2 2022-08-02 14:01:18 +00:00
chmodsayshello 3a36593612 mcl_beacons: textures 1/2 2022-08-02 14:00:55 +00:00
chmodsayshello a506ae9fff mcl_beacons: german translation 2022-08-02 13:58:08 +00:00
chmodsayshello 82cd2be6b7 mcl_beacons: add translation template 2022-08-02 13:57:01 +00:00
chmodsayshello 368f891746 mcl_beacons: mod.conf 2022-08-02 13:56:01 +00:00
chmodsayshello c53055c472 mcl_beacons: init.lua 2022-08-02 13:55:25 +00:00
chmodsayshello 5507303deb mcl_achievements: update german translation 2022-08-02 13:53:58 +00:00
chmodsayshello e98be27138 mcl_achievements: update translation template 2022-08-02 13:53:21 +00:00
chmodsayshello e308240fb6 register beacon achievements 2022-08-02 13:52:30 +00:00
chmodsayshello 82423cfb33 Merge pull request 'Update Fork' (#9) from MineClone5/MineClone5:master into master
Reviewed-on: chmodsayshello/MineClone5#9
2022-08-02 13:50:36 +00:00
kay27 4ade7dc769 Merge pull request 'Make baby sheep have big heads' (#392) from MrRar/MineClone5:sheep into master
Reviewed-on: MineClone5/MineClone5#392
2022-08-02 11:57:49 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 6bbf3bc80c Make baby sheep have big heads 2022-08-01 12:54:48 -05:00
chmodsayshello 25ff05635a Merge pull request 'Update Fork' (#8) from MineClone5/MineClone5:master into master
Reviewed-on: chmodsayshello/MineClone5#8
2022-03-29 15:39:19 +00:00
38 changed files with 633 additions and 99 deletions

View File

@ -394,7 +394,17 @@ minetest.register_on_generated(function(minp, maxp, chunkseed)
end end
end) end)
minetest.register_on_generated = mcl_mapgen.register_chunk_generator local register_on_generated_old = minetest.register_on_generated
minetest.register_on_generated = function(...)
minetest.log("warning", "minetest.register_on_generated() is being called by the mod '"
.. minetest.get_current_modname() .. "'. MineClone5's map generation system avoids using "
.. "this callback to work around engine map generation issues. If possible please read "
.. "mods/CORE/mcl_mapgen/API.md and update " .. minetest.get_current_modname()
.. " to use the method described from there. MineClone5 makes no promises that "
.. "mapgen mods will be fully compatible with it, please test your server and use at "
.. "your own risk.")
return register_on_generated_old(...)
end
function mcl_mapgen.get_far_node(p) function mcl_mapgen.get_far_node(p)
local p = p local p = p
@ -440,6 +450,21 @@ function mcl_mapgen.get_chunk_number(pos) -- unsigned int
c.x + k_positive c.x + k_positive
end end
-- Components of this game should register functions here to update their internal
-- state when external mods modify mapgen settings that they care about.
local settings_changed_callbacks = {}
function mcl_mapgen.register_on_settings_changed(callback)
table.insert(settings_changed_callbacks, callback)
end
-- this is to be called by external mods after modifying these settings
-- to notify Mineclone that it needs to update local copies and whatever's based on them.
function mcl_mapgen.on_settings_changed()
for _, callback in pairs(settings_changed_callbacks) do
callback()
end
end
mcl_mapgen.minecraft_height_limit = 256 mcl_mapgen.minecraft_height_limit = 256
mcl_mapgen.bedrock_is_rough = normal mcl_mapgen.bedrock_is_rough = normal

View File

@ -2,11 +2,18 @@ mcl_worlds = {}
local get_connected_players = minetest.get_connected_players local get_connected_players = minetest.get_connected_players
local min1, min2, min3
local max1, max2, max3
local get_local_settings = function()
min1, min2, min3 = mcl_mapgen.overworld.min, mcl_mapgen.end_.min, mcl_mapgen.nether.min
max1, max2, max3 = mcl_mapgen.overworld.max, mcl_mapgen.end_.max, mcl_mapgen.nether.max+128
end
get_local_settings()
mcl_mapgen.register_on_settings_changed(get_local_settings)
-- For a given position, returns a 2-tuple: -- For a given position, returns a 2-tuple:
-- 1st return value: true if pos is in void -- 1st return value: true if pos is in void
-- 2nd return value: true if it is in the deadly part of the void -- 2nd return value: true if it is in the deadly part of the void
local min1, min2, min3 = mcl_mapgen.overworld.min, mcl_mapgen.end_.min, mcl_mapgen.nether.min
local max1, max2, max3 = mcl_mapgen.overworld.max, mcl_mapgen.end_.max, mcl_mapgen.nether.max+128
function mcl_worlds.is_in_void(pos) function mcl_worlds.is_in_void(pos)
local y = pos.y local y = pos.y
local void = not ((y < max1 and y > min1) or (y < max2 and y > min2) or (y < max3 and y > min3)) local void = not ((y < max1 and y > min1) or (y < max2 and y > min2) or (y < max3 and y > min3))

View File

@ -417,7 +417,7 @@ function mobs:register_mob(name, def)
--on_breed = def.on_breed, --on_breed = def.on_breed,
--on_grown = def.on_grown, on_grown = def.on_grown,
--on_detach_child = mob_detach_child, --on_detach_child = mob_detach_child,

View File

@ -151,6 +151,7 @@ mobs.baby_grow_up = function(self)
self.collisionbox = self.backup_collisionbox self.collisionbox = self.backup_collisionbox
self.selectionbox = self.backup_selectionbox self.selectionbox = self.backup_selectionbox
self.object:set_properties(self) self.object:set_properties(self)
if self.on_grown then self.on_grown(self) end
end end
--makes the baby grow up faster with diminishing returns --makes the baby grow up faster with diminishing returns

View File

@ -1,5 +1,6 @@
local math = math local math = math
local vector = vector local vector = vector
local debug_head = minetest.settings:get_bool("mcl_debug_head_code", false)
--converts yaw to degrees --converts yaw to degrees
local degrees = function(yaw) local degrees = function(yaw)
@ -7,7 +8,7 @@ local degrees = function(yaw)
end end
mobs.do_head_logic = function(self, dtime, player) mobs.do_head_logic = function(self, dtime, player)
if not self.has_head == true then return end
local player = player or minetest.get_player_by_name("singleplayer") local player = player or minetest.get_player_by_name("singleplayer")
local look_at = player:get_pos() local look_at = player:get_pos()
@ -25,6 +26,7 @@ mobs.do_head_logic = function(self, dtime, player)
pos = vector.add(pos, head_offset) pos = vector.add(pos, head_offset)
if debug_head then
minetest.add_particle({ minetest.add_particle({
pos = pos, pos = pos,
velocity = {x=0, y=0, z=0}, velocity = {x=0, y=0, z=0},
@ -33,7 +35,7 @@ mobs.do_head_logic = function(self, dtime, player)
size = 1, size = 1,
texture = "default_dirt.png", texture = "default_dirt.png",
}) })
end
local bone_pos = vector.new(0,0,0) local bone_pos = vector.new(0,0,0)
--(horizontal) --(horizontal)

Binary file not shown.

View File

@ -82,16 +82,16 @@ mobs:register_mob("mobs_mc:sheep", {
--head code --head code
has_head = true, has_head = true,
head_bone = {"hea1", "hea2",}, head_bone = "head",
swap_y_with_x = false, swap_y_with_x = false,
reverse_head_yaw = false, reverse_head_yaw = false,
head_bone_pos_y = 3.6, head_bone_pos_y = 0,
head_bone_pos_z = -0.6, head_bone_pos_z = 0,
head_height_offset = 1.0525, head_height_offset = 1.2,
head_direction_offset = 0.5, head_direction_offset = 0,
head_pitch_modifier = 0, head_pitch_modifier = 0,
--end head code --end head code
@ -117,7 +117,7 @@ mobs:register_mob("mobs_mc:sheep", {
}, },
animation = { animation = {
speed_normal = 25, run_speed = 65, speed_normal = 25, run_speed = 65,
stand_start = 40, stand_end = 80, stand_start = 0, stand_end = 0,
walk_start = 0, walk_end = 40, walk_start = 0, walk_end = 40,
run_start = 0, run_end = 40, run_start = 0, run_end = 40,
}, },
@ -330,6 +330,24 @@ mobs:register_mob("mobs_mc:sheep", {
return false return false
end end
end, end,
on_spawn = function(self)
if self.baby then
self.animation = table.copy(self.animation)
self.animation.stand_start = 81
self.animation.stand_end = 81
self.animation.walk_start = 81
self.animation.walk_end = 121
self.animation.run_start = 81
self.animation.run_end = 121
end
return true
end,
on_grown = function(self)
self.animation = nil
local anim = self.current_animation
self.current_animation = nil -- Mobs Redo does nothing otherwise
mobs.set_mob_animation(self, anim)
end
}) })
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:sheep", "mobs_mc:sheep",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -229,6 +229,7 @@ mobs_mc.override.spawn = {
} }
-- This table contains important spawn height references for the mob spawn height. -- This table contains important spawn height references for the mob spawn height.
local get_local_settings = function()
mobs_mc.override.spawn_height = { mobs_mc.override.spawn_height = {
water = tonumber(minetest.settings:get("water_level")) or 0, -- Water level in the Overworld water = tonumber(minetest.settings:get("water_level")) or 0, -- Water level in the Overworld
@ -244,4 +245,7 @@ mobs_mc.override.spawn_height = {
end_min = mcl_mapgen.end_.min, end_min = mcl_mapgen.end_.min,
end_max = mcl_mapgen.end_.max, end_max = mcl_mapgen.end_.max,
} }
end
get_local_settings()
mcl_mapgen.register_on_settings_changed(get_local_settings)

View File

@ -234,6 +234,20 @@ awards.register_achievement("mcl:fishyBusiness", {
icon = "mcl_fishing_fishing_rod.png", icon = "mcl_fishing_fishing_rod.png",
}) })
--Triggered in mcl_beacons
awards.register_achievement("mcl:beacon", {
title = S("Bring Home the Beacon"),
description = S("Use a beacon."),
icon = "beacon_achievement_icon.png",
})
awards.register_achievement("mcl:maxed_beacon", {
title = S("Beaconator"),
description = S("Use a fully powered beacon."),
icon = "beacon_achievement_icon.png",
})
-- Armor Advancements -- Armor Advancements
--[[awards.register_achievement("mcl:suitUp", { --[[awards.register_achievement("mcl:suitUp", {
title = S("Suit Up"), title = S("Suit Up"),

View File

@ -47,3 +47,7 @@ Use a crafting table to craft a wooden hoe from wooden planks and sticks.=Benutz
Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=Benutzen Sie eine Werkbank, um eine Holzspitzhacke aus Holzplanken und Stöcken zu fertigen. Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=Benutzen Sie eine Werkbank, um eine Holzspitzhacke aus Holzplanken und Stöcken zu fertigen.
Use obsidian and a fire starter to construct a Nether portal.=Benutzen Sie Obsidian und ein Feuerzeug, um ein Netherportal zu errichten. Use obsidian and a fire starter to construct a Nether portal.=Benutzen Sie Obsidian und ein Feuerzeug, um ein Netherportal zu errichten.
Use wheat to craft a bread.=Benutzen Sie Weizen, um ein Brot zu machen. Use wheat to craft a bread.=Benutzen Sie Weizen, um ein Brot zu machen.
Bring Home the Beacon=Den Nachbarn heimleuchten
Use a beacon.=Benutzen Sie ein Leuchtfeuer.
Beaconator=Leuchtturmwärter
Use a fully powered beacon.=Benutzen Sie ein vollständiges Leuchtfeuer.

View File

@ -75,3 +75,7 @@ What A Deal!=
Successfully trade with a Villager.= Successfully trade with a Villager.=
Tactical Fishing= Tactical Fishing=
Catch a fish... without a fishing rod= Catch a fish... without a fishing rod=
Bring Home the Beacon=
Use a beacon.=
Beaconator=
Use a fully powered beacon.=

View File

@ -12,9 +12,17 @@ local floor = math.floor
local minetest_get_gametime = minetest.get_gametime local minetest_get_gametime = minetest.get_gametime
local get_voxel_manip = minetest.get_voxel_manip local get_voxel_manip = minetest.get_voxel_manip
local min1, min2, min3 = mcl_mapgen.overworld.min, mcl_mapgen.end_.min, mcl_mapgen.nether.min local min1, min2, min3
local max1, max2, max3 = mcl_mapgen.overworld.max, mcl_mapgen.end_.max, mcl_mapgen.nether.max + 128 local max1, max2, max3
local CS = mcl_mapgen.CS_NODES local CS
local get_local_settings = function()
min1, min2, min3 = mcl_mapgen.overworld.min, mcl_mapgen.end_.min, mcl_mapgen.nether.min
max1, max2, max3 = mcl_mapgen.overworld.max, mcl_mapgen.end_.max, mcl_mapgen.nether.max+128
CS = mcl_mapgen.CS_NODES
end
get_local_settings()
mcl_mapgen.register_on_settings_changed(get_local_settings)
local modname = minetest.get_current_modname() local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname) local modpath = minetest.get_modpath(modname)

View File

@ -34,7 +34,7 @@ minetest.register_on_mods_loaded(function()
for name,def in pairs(minetest.registered_items) do for name,def in pairs(minetest.registered_items) do
if (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0) and def.description and def.description ~= "" then if (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0) and def.description and def.description ~= "" then
local function is_redstone(def) local function is_redstone(def)
return def.mesecons or def.groups.mesecon or def.groups.mesecon_conductor_craftable or def.groups.mesecon_effecor_off return def.mesecons or def.groups.mesecon or def.groups.mesecon_conductor_craftable or def.groups.mesecon_effector_off
end end
local function is_tool(def) local function is_tool(def)
return def.groups.tool or (def.tool_capabilities and def.tool_capabilities.damage_groups == nil) return def.groups.tool or (def.tool_capabilities and def.tool_capabilities.damage_groups == nil)

View File

@ -0,0 +1,402 @@
local S = minetest.get_translator(minetest.get_current_modname())
--[[
there are strings in meta, which are being used to see which effect will be given to the player(s)
Valid strings:
swiftness
leaping
strenght
regeneration
]]--
mcl_beacons = {
blocks ={"mcl_core:diamondblock","mcl_core:ironblock","mcl_core:goldblock","mcl_core:emeraldblock","mcl_nether:netheriteblock"},
fuel = {"mcl_core:diamond","mcl_core:emerald","mcl_core:iron_ingot","mcl_core:gold_ingot","mcl_nether:netherite_ingot"}
}
local beacon_blocklist = mcl_beacons.blocks
local beacon_fuellist = mcl_beacons.fuel
local pallete_order = {
glass_cyan = 1,
pane_cyan_flat = 1,
pane_cyan = 1,
glass_white = 2,
pane_white_flat = 2,
pane_white = 2,
glass_brown = 3,
pane_brown_flat = 3,
pane_brown = 3,
glass_blue = 4,
pane_blue_flat = 4,
pane_blue = 4,
glass_light_blue = 5,
pane_light_blue_flat = 5,
pane_light_blue = 5,
glass_pink = 6,
pane_pink_flat = 6,
pane_pink = 6,
glass_purple = 7,
pane_purple_flat = 7,
pane_purple = 7,
glass_red = 8,
pane_red_flat = 8,
pane_red = 8,
glass_silver = 9,
pane_silver_flat = 9,
pane_silver = 9,
glass_gray = 10,
pane_gray_flat = 10,
pane_gray = 10,
glass_lime = 11,
pane_lime_flat = 11,
pane_lime = 11,
glass_green = 12,
pane_green_flat = 12,
pane_green = 12,
glass_orange = 13,
pane_orange_flat = 13,
pane_orange = 13,
glass_yellow = 14,
pane_yellow_flat = 14,
pane_yellow = 14,
glass_black = 15,
pane_black_flat = 15,
pane_black = 15,
glass_magenta = 16,
pane_magenta_flat = 16,
pane_magenta = 16
}
local function get_beacon_beam(glass_nodename)
if glass_nodename == "air" then return 0 end
local glass_string = glass_nodename:split(':')[2]
if not pallete_order[glass_string] then return 0 end
return pallete_order[glass_string]
end
minetest.register_node("mcl_beacons:beacon_beam", {
tiles = {"^[colorize:#b8bab9"},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.1250, -0.5000, -0.1250, 0.1250, 0.5000, 0.1250}
}
},
pointable= false,
light_source = 14,
walkable = false,
groups = {not_in_creative_inventory=1},
_mcl_blast_resistance = 1200,
paramtype2 = "color",
palette = "beacon_beam_palette.png",
palette_index = 0,
buildable_to = true,
})
mesecon.register_mvps_stopper("mcl_beacons:beacon_beam")
local formspec_string=
"size[11,14]"..
"label[4.5,0.5;"..minetest.formspec_escape(S("Beacon:")).."]"..
"label[0.5,1;"..minetest.formspec_escape(S("Primary Power:")).."]"..
"label[0.5,8.25;"..minetest.formspec_escape( S("Inventory:")).."]"..
"image[1,1.5;1,1;custom_beacom_symbol_4.png]"..
"image[1,3;1,1;custom_beacom_symbol_3.png]"..
"image[1,4.5;1,1;custom_beacom_symbol_2.png]"..
"image[1,6;1,1;custom_beacom_symbol_1.png]"..
"image_button[5.2,1.5;1,1;mcl_potions_effect_swift.png;swiftness;]"..
"image_button[5.2,3;1,1;mcl_potions_effect_leaping.png;leaping;]"..
"image_button[5.2,4.5;1,1;mcl_potions_effect_strong.png;strenght;]"..
"image_button[5.2,6;1,1;mcl_potions_effect_regenerating.png;regeneration;]"..
"item_image[1,7;1,1;mcl_core:diamond]"..
"item_image[2.2,7;1,1;mcl_core:emerald]"..
"item_image[3.4,7;1,1;mcl_core:iron_ingot]"..
"item_image[4.6,7;1,1;mcl_core:gold_ingot]"..
"item_image[5.8,7;1,1;mcl_nether:netherite_ingot]"..
mcl_formspec.get_itemslot_bg(7.2,7,1,1)..
"list[context;input;7.2,7;1,1;]"..
mcl_formspec.get_itemslot_bg(1,9,9,3)..
"list[current_player;main;1,9;9,3;9]"..
mcl_formspec.get_itemslot_bg(1,12.5,9,1)..
"list[current_player;main;1,12.5;9,1;]"
local function remove_beacon_beam(pos)
for y=pos.y, pos.y+301 do
local node = minetest.get_node({x=pos.x,y=y,z=pos.z})
if node.name ~= "air" and node.name ~= "mcl_core:bedrock" and node.name ~= "mcl_core:void" then
if node.name == "ignore" then
minetest.get_voxel_manip():read_from_map({x=pos.x,y=y,z=pos.z}, {x=pos.x,y=y,z=pos.z})
node = minetest.get_node({x=pos.x,y=y,z=pos.z})
end
if node.name == "mcl_beacons:beacon_beam" then
minetest.remove_node({x=pos.x,y=y,z=pos.z})
end
end
end
end
local function beacon_blockcheck(pos)
for y_offset = 1,4 do
local block_y = pos.y - y_offset
for block_x = (pos.x-y_offset),(pos.x+y_offset) do
for block_z = (pos.z-y_offset),(pos.z+y_offset) do
local valid_block = false --boolean which stores if block is valid or not
for _, beacon_block in pairs(beacon_blocklist) do
if beacon_block == minetest.get_node({x=block_x,y=block_y,z=block_z}).name and not valid_block then --is the block in the pyramid a valid beacon block
valid_block =true
end
end
if not valid_block then
return y_offset -1 --the last layer is complete, this one is missing or incomplete
end
end
end
if y_offset == 4 then --all checks are done, beacon is maxed
return y_offset
end
end
end
local function effect_player(effect,pos,power_level, effect_level,player)
local distance = vector.distance(player:get_pos(), pos)
if distance > (power_level+1)*10 then return end
if effect == "swiftness" then
mcl_potions.swiftness_func(player,effect_level,16)
elseif effect == "leaping" then
mcl_potions.leaping_func(player, effect_level, 16)
elseif effect == "strenght" then
mcl_potions.strength_func(player, effect_level, 16)
elseif effect == "regeneration" then
mcl_potions.regeneration_func(player, effect_level, 16)
end
end
local function globalstep_function(pos,player)
local meta = minetest.get_meta(pos)
local power_level = beacon_blockcheck(pos)
local effect_string = meta:get_string("effect")
if meta:get_int("effect_level") == 2 and power_level < 4 then
return
else
local obstructed = false
for y=pos.y+1, pos.y+100 do
local nodename = minetest.get_node({x=pos.x,y=y, z = pos.z}).name
if nodename ~= "mcl_core:bedrock" and nodename ~= "air" and nodename ~= "mcl_core:void" and nodename ~= "ignore" then --ignore means not loaded, let's just assume that's air
if nodename ~="mcl_beacons:beacon_beam" then
if minetest.get_item_group(nodename,"glass") == 0 and minetest.get_item_group(nodename,"material_glass") == 0 then
obstructed = true
remove_beacon_beam(pos)
return
end
end
end
end
if obstructed then
return
end
effect_player(effect_string,pos,power_level,meta:get_int("effect_level"),player)
end
end
minetest.register_node("mcl_beacons:beacon", {
description = S"Beacon",
drawtype = "mesh",
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
mesh = "mcl_beacon.b3d",
tiles = {"beacon_UV.png"},
use_texture_alpha = "clip",
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("input", 1)
local form = formspec_string
meta:set_string("formspec", form)
end,
on_destruct = function(pos)
local meta = minetest.get_meta(pos)
local input = meta:get_inventory():get_stack("input",1)
if not input:is_empty() then
local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5} --from mcl_anvils
minetest.add_item(p, input)
end
remove_beacon_beam(pos)
end,
on_receive_fields = function(pos, formname, fields, sender)
if fields.swiftness or fields.regeneration or fields.leaping or fields.strenght then
local sender_name = sender:get_player_name()
local power_level = beacon_blockcheck(pos)
if minetest.is_protected(pos, sender_name) then
minetest.record_protection_violation(pos, sender_name)
return
elseif power_level == 0 then
return
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local input = inv:get_stack("input",1)
if input:is_empty() then
return
end
local valid_item = false
for _, item in ipairs(beacon_fuellist) do
if input:get_name() == item then
valid_item = true
end
end
if not valid_item then
return
end
local successful = false
if fields.swiftness then
if power_level == 4 then
minetest.get_meta(pos):set_int("effect_level",2)
else
minetest.get_meta(pos):set_int("effect_level",1)
end
minetest.get_meta(pos):set_string("effect","swiftness")
successful = true
elseif fields.leaping and power_level >= 2 then
if power_level == 4 then
minetest.get_meta(pos):set_int("effect_level",2)
else
minetest.get_meta(pos):set_int("effect_level",1)
end
minetest.get_meta(pos):set_string("effect","leaping")
successful = true
elseif fields.strenght and power_level >= 3 then
if power_level == 4 then
minetest.get_meta(pos):set_int("effect_level",2)
else
minetest.get_meta(pos):set_int("effect_level",1)
end
minetest.get_meta(pos):set_string("effect","strenght")
successful = true
elseif fields.regeneration and power_level == 4 then
minetest.get_meta(pos):set_int("effect_level",2)
minetest.get_meta(pos):set_string("effect","regeneration")
successful = true
end
if successful then
if power_level == 4 then
awards.unlock(sender:get_player_name(),"mcl:maxed_beacon")
end
awards.unlock(sender:get_player_name(),"mcl:beacon")
input:take_item()
inv:set_stack("input",1,input)
local beam_palette_index = 0
remove_beacon_beam(pos)
for y = pos.y +1, pos.y + 201 do
local node = minetest.get_node({x=pos.x,y=y,z=pos.z})
if node.name == ignore then
minetest.get_voxel_manip():read_from_map({x=pos.x,y=y,z=pos.z}, {x=pos.x,y=y,z=pos.z})
node = minetest.get_node({x=pos.x,y=y,z=pos.z})
end
if minetest.get_item_group(node.name, "glass") ~= 0 or minetest.get_item_group(node.name,"material_glass") ~= 0 then
beam_palette_index = get_beacon_beam(node.name)
end
if node.name == "air" then
minetest.set_node({x=pos.x,y=y,z=pos.z},{name="mcl_beacons:beacon_beam",param2=beam_palette_index})
end
end
globalstep_function(pos,sender)--call it once outside the globalstep so the player gets the effect right after selecting it
end
end
end,
light_source = 14,
groups = {handy=1},
drop = "mcl_beacons:beacon",
sounds = mcl_sounds.node_sound_glass_defaults(),
_mcl_hardness = 3,
})
mesecon.register_mvps_stopper("mcl_beacons:beacon")
mcl_wip.register_wip_item("mcl_beacons:beacon")
function register_beaconblock (itemstring)--API function for other mods
table.insert(beacon_blocklist, itemstring)
end
function register_beaconfuel(itemstring)
table.insert(beacon_fuellist, itemstring)
end
local timer = 0
minetest.register_globalstep(function(dtime)
timer = timer + dtime
if timer >= 3 then
for _, player in ipairs(minetest.get_connected_players()) do
local player_pos = player:get_pos()
local pos_list = minetest.find_nodes_in_area({x=player_pos.x-50, y=player_pos.y-50, z=player_pos.z-50}, {x=player_pos.x+50, y=player_pos.y+50, z=player_pos.z+50},"mcl_beacons:beacon")
for _, pos in ipairs(pos_list) do
globalstep_function(pos,player)
end
end
timer = 0
end
end)
minetest.register_abm{
label="update beacon beam",
nodenames = {"mcl_beacons:beacon_beam"},
interval = 1,
chance = 1,
action = function(pos)
local node_below = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
local node_above = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
local node_current = minetest.get_node(pos)
if node_below.name == "air" then
if minetest.get_node({x=pos.x,y=pos.y-2,z=pos.z}).name == "mcl_beacons:beacon" then
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mcl_beacons:beacon_beam",param2=0})
end
remove_beacon_beam(pos)
elseif node_above.name == "air" or (node_above.name == "mcl_beacons:beacon_beam" and node_above.param2 ~= node_current.param2) then
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="mcl_beacons:beacon_beam",param2=node_current.param2})
elseif minetest.get_item_group(node_above.name, "glass") ~= 0 or minetest.get_item_group(node_above.name,"material_glass") ~= 0 then
minetest.set_node({x=pos.x,y=pos.y+2,z=pos.z},{name="mcl_beacons:beacon_beam",param2=get_beacon_beam(node_above.name)})
end
end,
}
minetest.register_craft({
output = "mcl_beacons:beacon",
recipe = {
{"mcl_core:glass", "mcl_core:glass", "mcl_core:glass"},
{"mcl_core:glass", "mcl_mobitems:nether_star", "mcl_core:glass"},
{"mcl_core:obsidian", "mcl_core:obsidian", "mcl_core:obsidian"}
}
})

View File

@ -0,0 +1,5 @@
# textdomain: mcl_beacons
Beacon=Leuchtfeuer
Beacon:=Leuchtfeuer:
Primary Power:=Primäre Kraft:
Inventory:=Inventar:

View File

@ -0,0 +1,5 @@
# textdomain: mcl_beacons
Beacon=
Beacon:=
Primary Power:=
Inventory:=

View File

@ -0,0 +1,2 @@
author=chmodsayshello
depends=mcl_formspec, mcl_init, mcl_wip, mesecons_mvps, mcl_core, mcl_sounds, awards, mcl_achievements, mcl_mobitems, mcl_nether

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

View File

@ -251,7 +251,7 @@ mcl_stairs.register_stair_and_slab_simple("blackstone", "mcl_blackstone:blacksto
mcl_stairs.register_stair_and_slab_simple("blackstone_polished", "mcl_blackstone:blackstone_polished", S("Polished Blackstone Stair"), S("Polished Blackstone Slab"), S("Polished Double Blackstone Slab")) mcl_stairs.register_stair_and_slab_simple("blackstone_polished", "mcl_blackstone:blackstone_polished", S("Polished Blackstone Stair"), S("Polished Blackstone Slab"), S("Polished Double Blackstone Slab"))
mcl_stairs.register_stair_and_slab_simple("blackstone_chiseled_polished", "mcl_blackstone:blackstone_chiseled_polished", S("Polished Chiseled Blackstone Stair"), S("Chiseled Polished Blackstone Slab"), S("Double Polished Chiseled Blackstone Slab")) mcl_stairs.register_stair_and_slab_simple("blackstone_chiseled_polished", "mcl_blackstone:blackstone_chiseled_polished", S("Chiseled Polished Blackstone Stair"), S("Chiseled Polished Blackstone Slab"), S("Double Polished Chiseled Blackstone Slab"))
mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished", S("Polished Blackstone Brick Stair"), S("Polished Blackstone Brick Slab"), S("Double Polished Blackstone Brick Slab")) mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished", S("Polished Blackstone Brick Stair"), S("Polished Blackstone Brick Slab"), S("Double Polished Blackstone Brick Slab"))

View File

@ -510,8 +510,8 @@ minetest.register_craft({
} }
}) })
minetest.register_alias("mcl_blast_furnace:blast_furnace", "mcl_furnaces:blast_furnace") minetest.register_alias("mcl_furnaces:blast_furnace", "mcl_blast_furnace:blast_furnace")
minetest.register_alias("mcl_blast_furnace:blast_furnace_active", "mcl_furnaces:blast_furnace_active") minetest.register_alias("mcl_furnaces:blast_furnace_active", "mcl_blast_furnace:blast_furnace_active")
-- Add entry alias for the Help -- Add entry alias for the Help
if minetest.get_modpath("doc") then if minetest.get_modpath("doc") then

View File

@ -91,7 +91,7 @@ minetest.register_craftitem("mcl_farming:potato_item", {
_doc_items_longdesc = S("Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes."), _doc_items_longdesc = S("Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes."),
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."), _doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
inventory_image = "farming_potato.png", inventory_image = "farming_potato.png",
groups = { food = 2, eatable = 1, compostability=65 }, groups = { food = 2, eatable = 1, compostability=65, smoker_cookable=1 },
_mcl_saturation = 0.6, _mcl_saturation = 0.6,
stack_max = 64, stack_max = 64,
on_secondary_use = minetest.item_eat(1), on_secondary_use = minetest.item_eat(1),

View File

@ -27,8 +27,34 @@ local DELAY = 3 -- seconds before teleporting in Nether portal in Survival mo
local DISTANCE_MAX = 128 local DISTANCE_MAX = 128
local PORTAL = "mcl_portals:portal" local PORTAL = "mcl_portals:portal"
local OBSIDIAN = "mcl_core:obsidian" local OBSIDIAN = "mcl_core:obsidian"
local O_Y_MIN, O_Y_MAX = max(mcl_mapgen.overworld.min, -31), min(mcl_mapgen.overworld.max, 2048) local O_Y_MIN, O_Y_MAX
local N_Y_MIN, N_Y_MAX = mcl_mapgen.nether.bedrock_bottom_min, mcl_mapgen.nether.bedrock_top_min - H_MIN local N_Y_MIN, N_Y_MAX
local overworld_lava_max
local nether_lava_max
local overworld_min
local limits
local get_local_settings = function()
O_Y_MIN, O_Y_MAX = max(mcl_mapgen.overworld.min, -31), min(mcl_mapgen.overworld.max, 2048)
N_Y_MIN, N_Y_MAX = mcl_mapgen.nether.bedrock_bottom_min, mcl_mapgen.nether.bedrock_top_min - H_MIN
overworld_min = mcl_mapgen.overworld.min
overworld_lava_max = mcl_mapgen.overworld.lava_max
nether_lava_max = mcl_mapgen.nether.lava_max
limits = {
nether = {
pmin = {x=LIM_MIN, y = N_Y_MIN, z = LIM_MIN},
pmax = {x=LIM_MAX, y = N_Y_MAX, z = LIM_MAX},
},
overworld = {
pmin = {x=LIM_MIN, y = O_Y_MIN, z = LIM_MIN},
pmax = {x=LIM_MAX, y = O_Y_MAX, z = LIM_MAX},
},
}
end
get_local_settings()
mcl_mapgen.register_on_settings_changed(get_local_settings)
-- Alpha and particles -- Alpha and particles
local node_particles_allowed = minetest.settings:get("mcl_node_particles") or "none" local node_particles_allowed = minetest.settings:get("mcl_node_particles") or "none"
@ -79,17 +105,6 @@ local get_us_time = minetest.get_us_time
local dimension_to_teleport = { nether = "overworld", overworld = "nether" } local dimension_to_teleport = { nether = "overworld", overworld = "nether" }
local limits = {
nether = {
pmin = {x=LIM_MIN, y = N_Y_MIN, z = LIM_MIN},
pmax = {x=LIM_MAX, y = N_Y_MAX, z = LIM_MAX},
},
overworld = {
pmin = {x=LIM_MIN, y = O_Y_MIN, z = LIM_MIN},
pmax = {x=LIM_MAX, y = O_Y_MAX, z = LIM_MAX},
},
}
-- This function registers exits from Nether portals. -- This function registers exits from Nether portals.
-- Incoming verification performed: two nodes must be portal nodes, and an obsidian below them. -- Incoming verification performed: two nodes must be portal nodes, and an obsidian below them.
-- If the verification passes - position adds to the table and saves to mod storage on exit. -- If the verification passes - position adds to the table and saves to mod storage on exit.
@ -164,7 +179,7 @@ local function find_exit(p, dx, dy, dz)
end end
end end
-- This functon searches Nether portal nodes whitin distance specified and checks the node -- This function searches Nether portal nodes within distance specified and checks the node
local function find_exit_with_check(p, dx, dy, dz) local function find_exit_with_check(p, dx, dy, dz)
while true do while true do
local pos = find_exit(p, dx, dy, dz) local pos = find_exit(p, dx, dy, dz)
@ -181,7 +196,7 @@ local function find_exit_with_check(p, dx, dy, dz)
end end
end end
-- Ping-Pong the coordinate for Fast Travelling, https://git.minetest.land/Wuzzy/MineClone2/issues/795#issuecomment-11058 -- Ping-Pong the coordinate for Fast Traveling, https://git.minetest.land/Wuzzy/MineClone2/issues/795#issuecomment-11058
local function ping_pong(x, m, l1, l2) local function ping_pong(x, m, l1, l2)
if x < 0 then if x < 0 then
return l1 + abs(((x*m+l1) % (l1*4)) - (l1*2)), floor(x*m/l1/2) + ((ceil(x*m/l1)+1)%2) * ((x*m)%l1)/l1 return l1 + abs(((x*m+l1) % (l1*4)) - (l1*2)), floor(x*m/l1/2) + ((ceil(x*m/l1)+1)%2) * ((x*m)%l1)/l1
@ -421,9 +436,9 @@ end
local function get_lava_level(pos, pos1, pos2) local function get_lava_level(pos, pos1, pos2)
if pos.y > -1000 then if pos.y > -1000 then
return max(min(mcl_mapgen.overworld.lava_max, pos2.y-1), pos1.y+1) return max(min(overworld_lava_max, pos2.y-1), pos1.y+1)
end end
return max(min(mcl_mapgen.nether.lava_max, pos2.y-1), pos1.y+1) return max(min(nether_lava_max, pos2.y-1), pos1.y+1)
end end
local function ecb_scan_area_2(blockpos, action, calls_remaining, param) local function ecb_scan_area_2(blockpos, action, calls_remaining, param)
@ -746,7 +761,7 @@ minetest.register_abm({
return return
end end
if lower_node_name == OBSIDIAN and pos.y >= mcl_mapgen.overworld.min and random(1, 750) == 19 then if lower_node_name == OBSIDIAN and pos.y >= overworld_min and random(1, 750) == 19 then
local pigman_obj = minetest.add_entity(pos, "mobs_mc:pigman") local pigman_obj = minetest.add_entity(pos, "mobs_mc:pigman")
if pigman_obj then if pigman_obj then
teleport_cooloff(pigman_obj) teleport_cooloff(pigman_obj)

View File

@ -509,8 +509,8 @@ minetest.register_craft({
} }
}) })
minetest.register_alias("mcl_smoker:smoker", "mcl_furnaces:smoker") minetest.register_alias("mcl_furnaces:smoker", "mcl_smoker:smoker")
minetest.register_alias("mcl_smoker:smoker_active", "mcl_furnaces:smoker_active") minetest.register_alias("mcl_furnaces:smoker_active", "mcl_smoker:smoker_active")
-- Add entry alias for the Help -- Add entry alias for the Help
if minetest.get_modpath("doc") then if minetest.get_modpath("doc") then

View File

@ -25,7 +25,6 @@ Double Dark Oak Wood Slab=
Stone Stairs= Stone Stairs=
Stone Slab= Stone Slab=
Double Stone Slab= Double Stone Slab=
Polished Stone Stairs=
Polished Stone Slab= Polished Stone Slab=
Double Polished Stone Slab= Double Polished Stone Slab=
Andesite Stairs= Andesite Stairs=

View File

@ -32,12 +32,6 @@ end
mcl_stairs.register_stair_and_slab_simple("stone_rough", "mcl_core:stone", S("Stone Stairs"), S("Stone Slab"), S("Double Stone Slab")) mcl_stairs.register_stair_and_slab_simple("stone_rough", "mcl_core:stone", S("Stone Stairs"), S("Stone Slab"), S("Double Stone Slab"))
mcl_stairs.register_stair("stone", "mcl_core:stone_smooth",
{pickaxey=1, material_stone=1},
{"mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_side.png"},
S("Polished Stone Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8,
nil, "mcl_core:stone_smooth")
mcl_stairs.register_slab("stone", "mcl_core:stone_smooth", mcl_stairs.register_slab("stone", "mcl_core:stone_smooth",
{pickaxey=1, material_stone=1}, {pickaxey=1, material_stone=1},
{"mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_side.png"}, {"mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_side.png"},

View File

@ -32,9 +32,16 @@ local math_ceil = math.ceil
--custom mcl_vars --custom mcl_vars
local get_node = mcl_mapgen.get_far_node local get_node = mcl_mapgen.get_far_node
local min_y
local max_y
local get_local_settings = function()
min_y = math_max(mcl_mapgen.overworld.min, mcl_mapgen.overworld.bedrock_max) + 1
max_y = mcl_mapgen.overworld.max - 1
end
get_local_settings()
mcl_mapgen.register_on_settings_changed(get_local_settings)
local min_y = math_max(mcl_mapgen.overworld.min, mcl_mapgen.overworld.bedrock_max) + 1
local max_y = mcl_mapgen.overworld.max - 1
-- Calculate the number of dungeon spawn attempts -- Calculate the number of dungeon spawn attempts
-- In Minecraft, there 8 dungeon spawn attempts Minecraft chunk (16*256*16 = 65536 blocks). -- In Minecraft, there 8 dungeon spawn attempts Minecraft chunk (16*256*16 = 65536 blocks).
-- Minetest chunks don't have this size, so scale the number accordingly. -- Minetest chunks don't have this size, so scale the number accordingly.

View File

@ -1214,18 +1214,24 @@ if flat then
air_layers[#air_layers + 1] = {mcl_mapgen.nether.flat_floor, mcl_mapgen.nether.flat_ceiling} -- Flat Nether air_layers[#air_layers + 1] = {mcl_mapgen.nether.flat_floor, mcl_mapgen.nether.flat_ceiling} -- Flat Nether
end end
-- Realm barrier between the Overworld void and the End local barrier_min
local barrier_min = mcl_mapgen.realm_barrier_overworld_end_min local barrier_max
local barrier_max = mcl_mapgen.realm_barrier_overworld_end_max local void_layers
local bedrock_layers
local void_layers = { local get_local_settings = function()
-- Realm barrier between the Overworld void and the End
barrier_min = mcl_mapgen.realm_barrier_overworld_end_min
barrier_max = mcl_mapgen.realm_barrier_overworld_end_max
void_layers = {
{mcl_mapgen.EDGE_MIN , mcl_mapgen.nether.min - 1 }, -- below Nether {mcl_mapgen.EDGE_MIN , mcl_mapgen.nether.min - 1 }, -- below Nether
{mcl_mapgen.nether.max + 129, mcl_mapgen.end_.min - 1 }, -- below End (above Nether) {mcl_mapgen.nether.max + 129, mcl_mapgen.end_.min - 1 }, -- below End (above Nether)
{mcl_mapgen.end_.max + 1 , barrier_min - 1 }, -- below Realm Barrier, above End {mcl_mapgen.end_.max + 1 , barrier_min - 1 }, -- below Realm Barrier, above End
{barrier_max + 1 , mcl_mapgen.overworld.min - 1}, -- below Overworld, above Realm Barrier {barrier_max + 1 , mcl_mapgen.overworld.min - 1}, -- below Overworld, above Realm Barrier
} }
local bedrock_layers = {} bedrock_layers = {}
if not singlenode then if not singlenode then
bedrock_layers = { bedrock_layers = {
{mcl_mapgen.overworld.bedrock_min , mcl_mapgen.overworld.bedrock_max }, {mcl_mapgen.overworld.bedrock_min , mcl_mapgen.overworld.bedrock_max },
@ -1233,6 +1239,9 @@ if not singlenode then
{mcl_mapgen.nether.bedrock_top_min , mcl_mapgen.nether.bedrock_top_max }, {mcl_mapgen.nether.bedrock_top_min , mcl_mapgen.nether.bedrock_top_max },
} }
end end
end
get_local_settings()
mcl_mapgen.register_on_settings_changed(get_local_settings)
mcl_mapgen.register_mapgen_block_lvm(function(vm_context) mcl_mapgen.register_mapgen_block_lvm(function(vm_context)
local vm, data, area, minp, maxp, chunkseed, blockseed = vm_context.vm, vm_context.data, vm_context.area, vm_context.minp, vm_context.maxp, vm_context.chunkseed, vm_context.blockseed local vm, data, area, minp, maxp, chunkseed, blockseed = vm_context.vm, vm_context.data, vm_context.area, vm_context.minp, vm_context.maxp, vm_context.chunkseed, vm_context.blockseed

View File

@ -94,13 +94,21 @@ if setting then
end end
-- Max. and min. heights between rail corridors are generated -- Max. and min. heights between rail corridors are generated
local height_min local height_min, height_max
local get_local_settings = function()
if mcl_mapgen.lava then if mcl_mapgen.lava then
height_min = mcl_mapgen.overworld.lava_max + 2 height_min = mcl_mapgen.overworld.lava_max + 2
else else
height_min = mcl_mapgen.overworld.bedrock_max + 2 height_min = mcl_mapgen.overworld.bedrock_max + 2
end end
local height_max = mcl_worlds.layer_to_y(60) height_max = mcl_worlds.layer_to_y(60)
-- Allow mods to separately override this
height_min = mcl_mapgen.overworld.railcorridors_height_min or height_min
height_max = mcl_mapgen.overworld.railcorridors_height_max or height_max
end
get_local_settings()
mcl_mapgen.register_on_settings_changed(get_local_settings)
-- Chaos Mode: If enabled, rail corridors don't stop generating when hitting obstacles -- Chaos Mode: If enabled, rail corridors don't stop generating when hitting obstacles
local chaos_mode = minetest.settings:get_bool("tsm_railcorridors_chaos") or false local chaos_mode = minetest.settings:get_bool("tsm_railcorridors_chaos") or false

View File

@ -185,3 +185,4 @@ revoke_shout_for_spammers (Revoke shout priv for spammers) bool true
mcl_item_id_debug (Item ID Debug) bool false mcl_item_id_debug (Item ID Debug) bool false
mcl_debug_struct_noise (Show Structures Perlin Noise) bool false mcl_debug_struct_noise (Show Structures Perlin Noise) bool false
mcl_debug_chunk_borders (Show Chunk Borders) bool false mcl_debug_chunk_borders (Show Chunk Borders) bool false
mcl_debug_head_code (Spawn dirt particles at mob head position) bool false