Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
|
6907f7cc4f |
1
API.md
|
@ -41,7 +41,6 @@ A lot of things are possible by using one of the APIs in the mods. Note that not
|
||||||
* Beds: `ITEMS/mcl_beds`
|
* Beds: `ITEMS/mcl_beds`
|
||||||
* Buckets: `ITEMS/mcl_buckets`
|
* Buckets: `ITEMS/mcl_buckets`
|
||||||
* Dispenser support: `ITEMS/REDSTONE/mcl_dispensers`
|
* Dispenser support: `ITEMS/REDSTONE/mcl_dispensers`
|
||||||
* Campfires: `ITEMS/mcl_campfires`
|
|
||||||
|
|
||||||
### Mobs
|
### Mobs
|
||||||
* Mobs: `ENTITIES/mcl_mobs`
|
* Mobs: `ENTITIES/mcl_mobs`
|
||||||
|
|
53
RELEASE.md
|
@ -1,5 +1,3 @@
|
||||||
### Standard Release
|
|
||||||
|
|
||||||
#File to document release steps with a view to evolving into a script
|
#File to document release steps with a view to evolving into a script
|
||||||
|
|
||||||
#Update CREDITS.md
|
#Update CREDITS.md
|
||||||
|
@ -22,54 +20,3 @@ git push origin 0.82.0
|
||||||
#Update version in game.conf to -SNAPSHOT
|
#Update version in game.conf to -SNAPSHOT
|
||||||
|
|
||||||
git commit -m "Post-release set version 0.82.0-SNAPSHOT"
|
git commit -m "Post-release set version 0.82.0-SNAPSHOT"
|
||||||
|
|
||||||
### Hotfix Release
|
|
||||||
|
|
||||||
##### Prepare release branch
|
|
||||||
|
|
||||||
When hotfixing, you should never release new features. Any new code increases risk of new bugs which has additional testing/release concerns.
|
|
||||||
To mitigate this, you just release the last release, and the relevant bug fix. For this, we do the following:
|
|
||||||
|
|
||||||
* Create release branch from the last release tag, push it:
|
|
||||||
|
|
||||||
git checkout -b release/0.82.1 0.82.0
|
|
||||||
|
|
||||||
git push origin release/0.82.1
|
|
||||||
|
|
||||||
##### Prepare feature branch and fix
|
|
||||||
|
|
||||||
* Create feature branch from that release branch (can review it to check only fix is there, nothing else, and use to also merge into master separately)
|
|
||||||
|
|
||||||
git checkout -b hotfix_bug_1_branch
|
|
||||||
|
|
||||||
* Fix crash/serious bug and commit
|
|
||||||
* Push branch and create pr to the release and also the master branch (Do not rebase, to reduce merge conflict risk. Do not delete after first merge or it needs to be repushed)
|
|
||||||
|
|
||||||
##### Update version and tag the release
|
|
||||||
|
|
||||||
* After all fixes are in release branch, pull it locally (best to avoid a merge conflict as feature branch will need to be merged into master also, which already changed version):
|
|
||||||
|
|
||||||
* Update version in game.conf to hotfix version and commit it. Example: version=0.82.1
|
|
||||||
|
|
||||||
* Tag it, push tag and branch:
|
|
||||||
|
|
||||||
git tag 0.82.1
|
|
||||||
|
|
||||||
git push origin 0.82.1
|
|
||||||
|
|
||||||
git push origin release/0.82.1
|
|
||||||
|
|
||||||
Note: If you have to do more than 1 hotfix release, can do it on the same release branch.
|
|
||||||
|
|
||||||
### Release via ContentDB
|
|
||||||
|
|
||||||
* Go to MineClone2 page (https://content.minetest.net/packages/Wuzzy/mineclone2/)
|
|
||||||
* Click +Release
|
|
||||||
* Enter the release tag number in the title and Git reference box. For example (without quotes): "0.82.1"
|
|
||||||
* In the minimum minetest version, put the oldest supported version (as of 14/02/2023 it is 5.5), leave the Maximum minetest version blank
|
|
||||||
* Click save. Release is now live.
|
|
||||||
|
|
||||||
##### Inform people
|
|
||||||
|
|
||||||
* Add a comment to the forum post with the release number and what is involved, and maintainer will update main post.
|
|
||||||
* Add a comment in Discord announcement
|
|
BIN
menu/footer.png
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -545,28 +545,18 @@ function mcl_util.deal_damage(target, damage, mcl_reason)
|
||||||
if luaentity then
|
if luaentity then
|
||||||
if luaentity.deal_damage then
|
if luaentity.deal_damage then
|
||||||
luaentity:deal_damage(damage, mcl_reason or {type = "generic"})
|
luaentity:deal_damage(damage, mcl_reason or {type = "generic"})
|
||||||
return
|
else
|
||||||
elseif luaentity.is_mob then
|
local puncher = mcl_reason and mcl_reason.direct or target
|
||||||
-- local puncher = mcl_reason and mcl_reason.direct or target
|
target:punch(puncher, 1.0, {full_punch_interval = 1.0, damage_groups = {fleshy = damage}}, vector.direction(puncher:get_pos(), target:get_pos()), damage)
|
||||||
-- target:punch(puncher, 1.0, {full_punch_interval = 1.0, damage_groups = {fleshy = damage}}, vector.direction(puncher:get_pos(), target:get_pos()), damage)
|
|
||||||
if luaentity.health > 0 then
|
|
||||||
luaentity.health = luaentity.health - damage
|
|
||||||
end
|
end
|
||||||
return
|
else -- Player
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local is_immortal = target:get_armor_groups().immortal or 0
|
|
||||||
if is_immortal>0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local hp = target:get_hp()
|
local hp = target:get_hp()
|
||||||
|
|
||||||
if hp > 0 then
|
if hp > 0 then
|
||||||
target:set_hp(hp - damage, {_mcl_reason = mcl_reason})
|
target:set_hp(hp - damage, {_mcl_reason = mcl_reason})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function mcl_util.get_hp(obj)
|
function mcl_util.get_hp(obj)
|
||||||
local luaentity = obj:get_luaentity()
|
local luaentity = obj:get_luaentity()
|
||||||
|
@ -1016,20 +1006,3 @@ function mcl_util.check_position_protection(position, player)
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local palette_indexes = {grass_palette_index = 0, foliage_palette_index = 0, water_palette_index = 0}
|
|
||||||
function mcl_util.get_palette_indexes_from_pos(pos)
|
|
||||||
local biome_data = minetest.get_biome_data(pos)
|
|
||||||
local biome = biome_data.biome
|
|
||||||
local biome_name = minetest.get_biome_name(biome)
|
|
||||||
local reg_biome = minetest.registered_biomes[biome_name]
|
|
||||||
if reg_biome and reg_biome._mcl_grass_palette_index and reg_biome._mcl_foliage_palette_index and reg_biome._mcl_water_palette_index then
|
|
||||||
local gpi = reg_biome._mcl_grass_palette_index
|
|
||||||
local fpi = reg_biome._mcl_foliage_palette_index
|
|
||||||
local wpi = reg_biome._mcl_water_palette_index
|
|
||||||
local palette_indexes = {grass_palette_index = gpi, foliage_palette_index = fpi, water_palette_index = wpi}
|
|
||||||
return palette_indexes
|
|
||||||
else
|
|
||||||
return palette_indexes
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
||||||
-- API for Mobs Redo: MineClone 2 Edition (MRM)
|
-- API for Mobs Redo: MineClone 2 Edition (MRM)
|
||||||
|
|
||||||
local PATHFINDING = "gowp"
|
local PATHFINDING = "gowp"
|
||||||
local CRASH_WARN_FREQUENCY = 60
|
|
||||||
|
|
||||||
-- Localize
|
-- Localize
|
||||||
local S = minetest.get_translator("mcl_mobs")
|
local S = minetest.get_translator("mcl_mobs")
|
||||||
|
@ -136,8 +135,8 @@ function mob_class:mob_activate(staticdata, def, dtime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--If textures in definition change, reload textures
|
if not self.base_texture then
|
||||||
if not self.base_texture or (def.textures and table.indexof(def.textures, self.base_texture) == -1) then
|
|
||||||
-- compatiblity with old simple mobs textures
|
-- compatiblity with old simple mobs textures
|
||||||
if type(def.textures[1]) == "string" then
|
if type(def.textures[1]) == "string" then
|
||||||
def.textures = {def.textures}
|
def.textures = {def.textures}
|
||||||
|
@ -318,7 +317,7 @@ local function update_timers (self, dtime)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- attack timer. Not anymore, it seems. Used for also occassionally processing mob step too!
|
-- attack timer
|
||||||
self.timer = self.timer + dtime
|
self.timer = self.timer + dtime
|
||||||
|
|
||||||
if self.state ~= "attack" and self.state ~= PATHFINDING then
|
if self.state ~= "attack" and self.state ~= PATHFINDING then
|
||||||
|
@ -358,7 +357,8 @@ function mob_class:outside_limits()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_step_work (self, dtime)
|
-- main mob function
|
||||||
|
function mob_class:on_step(dtime)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
if not pos then return end
|
if not pos then return end
|
||||||
|
|
||||||
|
@ -392,6 +392,7 @@ local function on_step_work (self, dtime)
|
||||||
self:check_water_flow()
|
self:check_water_flow()
|
||||||
self:env_danger_movement_checks (dtime)
|
self:env_danger_movement_checks (dtime)
|
||||||
|
|
||||||
|
|
||||||
self:follow_flop() -- Mob following code.
|
self:follow_flop() -- Mob following code.
|
||||||
|
|
||||||
self:set_animation_speed() -- set animation speed relative to velocity
|
self:set_animation_speed() -- set animation speed relative to velocity
|
||||||
|
@ -407,25 +408,20 @@ local function on_step_work (self, dtime)
|
||||||
self:npc_attack()
|
self:npc_attack()
|
||||||
self:check_aggro(dtime)
|
self:check_aggro(dtime)
|
||||||
|
|
||||||
if self.do_custom and self.do_custom(self, dtime) == false then return end
|
|
||||||
|
|
||||||
|
|
||||||
-- In certain circumstances, we abandon processing of certain functionality
|
|
||||||
local skip_processing = false
|
|
||||||
if update_timers(self, dtime) then
|
|
||||||
skip_processing = true
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if not skip_processing then
|
|
||||||
self:check_breeding()
|
self:check_breeding()
|
||||||
|
|
||||||
self:check_item_pickup()
|
self:check_item_pickup()
|
||||||
self:set_armor_texture()
|
self:set_armor_texture()
|
||||||
|
|
||||||
|
if self.do_custom and self.do_custom(self, dtime) == false then return end
|
||||||
|
|
||||||
|
if update_timers(self, dtime) then return end
|
||||||
|
|
||||||
self:check_particlespawners(dtime)
|
self:check_particlespawners(dtime)
|
||||||
|
|
||||||
|
if self:env_damage (dtime, pos) then return end
|
||||||
|
if self:do_states(dtime) then return end
|
||||||
|
|
||||||
if self.opinion_sound_cooloff > 0 then
|
if self.opinion_sound_cooloff > 0 then
|
||||||
self.opinion_sound_cooloff = self.opinion_sound_cooloff - dtime
|
self.opinion_sound_cooloff = self.opinion_sound_cooloff - dtime
|
||||||
end
|
end
|
||||||
|
@ -435,9 +431,6 @@ local function on_step_work (self, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:do_states(dtime) then return end
|
if self:do_states(dtime) then return end
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if mobs_debug then self:update_tag() end
|
if mobs_debug then self:update_tag() end
|
||||||
|
|
||||||
|
@ -446,36 +439,6 @@ local function on_step_work (self, dtime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local last_crash_warn_time = 0
|
|
||||||
|
|
||||||
local on_step_error_handler = function ()
|
|
||||||
local info = debug.getinfo(1, "SnlufL")
|
|
||||||
|
|
||||||
local current_time = os.time()
|
|
||||||
local time_since_warning = current_time - last_crash_warn_time
|
|
||||||
|
|
||||||
--minetest.log("previous_crash_time: " .. current_time)
|
|
||||||
--minetest.log("last_crash_time: " .. last_crash_warn_time)
|
|
||||||
--minetest.log("time_since_warning: " .. time_since_warning)
|
|
||||||
|
|
||||||
if time_since_warning > CRASH_WARN_FREQUENCY then
|
|
||||||
last_crash_warn_time = current_time
|
|
||||||
minetest.log("A game crashing bug was prevented. Please provide debug.log information to MineClone2 dev team for investigation. (Search for: --- Bug report start)")
|
|
||||||
end
|
|
||||||
minetest.log("action", "--- Bug report start (please provide a few lines before this also for context) ---")
|
|
||||||
minetest.log("action", "Stack trace: ".. tostring(debug.traceback()))
|
|
||||||
minetest.log("action", "Bug info: ".. dump(info))
|
|
||||||
minetest.log("action", "--- Bug report end ---")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- main mob function
|
|
||||||
function mob_class:on_step(dtime)
|
|
||||||
local status, retVal = xpcall(on_step_work, on_step_error_handler, self, dtime)
|
|
||||||
if status then
|
|
||||||
return retVal
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local timer = 0
|
local timer = 0
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
timer = timer + dtime
|
timer = timer + dtime
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
||||||
local mob_class = mcl_mobs.mob_class
|
local mob_class = mcl_mobs.mob_class
|
||||||
|
|
||||||
local HORNY_TIME = 30
|
local HORNY_TIME = 30*20
|
||||||
local HORNY_AGAIN_TIME = 30 -- was 300 or 15*20
|
local HORNY_AGAIN_TIME = 30*20 -- was 300 or 15*20
|
||||||
local CHILD_GROW_TIME = 60
|
local CHILD_GROW_TIME = 60*20
|
||||||
|
|
||||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_villager",false)
|
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_villager",false)
|
||||||
|
|
||||||
|
|
|
@ -503,8 +503,6 @@ function mcl_mobs.register_egg(mob, desc, background_color, overlay_color, addeg
|
||||||
|
|
||||||
local name = placer:get_player_name()
|
local name = placer:get_player_name()
|
||||||
local privs = minetest.get_player_privs(name)
|
local privs = minetest.get_player_privs(name)
|
||||||
local dim = mcl_worlds.pos_to_dimension(placer:get_pos())
|
|
||||||
local mob_light_lvl = {mcl_mobs:mob_light_lvl(itemstack:get_name(),dim)}
|
|
||||||
if under.name == "mcl_mobspawners:spawner" then
|
if under.name == "mcl_mobspawners:spawner" then
|
||||||
if minetest.is_protected(pointed_thing.under, name) then
|
if minetest.is_protected(pointed_thing.under, name) then
|
||||||
minetest.record_protection_violation(pointed_thing.under, name)
|
minetest.record_protection_violation(pointed_thing.under, name)
|
||||||
|
@ -514,7 +512,7 @@ function mcl_mobs.register_egg(mob, desc, background_color, overlay_color, addeg
|
||||||
minetest.chat_send_player(name, S("You need the “maphack” privilege to change the mob spawner."))
|
minetest.chat_send_player(name, S("You need the “maphack” privilege to change the mob spawner."))
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
mcl_mobspawners.setup_spawner(pointed_thing.under, itemstack:get_name(), mob_light_lvl[1], mob_light_lvl[2])
|
mcl_mobspawners.setup_spawner(pointed_thing.under, itemstack:get_name())
|
||||||
if not minetest.is_creative_enabled(name) then
|
if not minetest.is_creative_enabled(name) then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
|
|
|
@ -460,7 +460,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
-- find and replace what mob is looking for (grass, wheat etc.)
|
-- find and replace what mob is looking for (grass, wheat etc.)
|
||||||
function mob_class:replace_node(pos)
|
function mob_class:replace(pos)
|
||||||
|
|
||||||
if not self.replace_rate
|
if not self.replace_rate
|
||||||
or not self.replace_what
|
or not self.replace_what
|
||||||
|
|
|
@ -3,9 +3,6 @@ local mob_class = mcl_mobs.mob_class
|
||||||
|
|
||||||
local PATHFINDING_FAIL_THRESHOLD = 100 -- no. of ticks to fail before giving up. 20p/s. 5s helps them get through door
|
local PATHFINDING_FAIL_THRESHOLD = 100 -- no. of ticks to fail before giving up. 20p/s. 5s helps them get through door
|
||||||
local PATHFINDING_FAIL_WAIT = 30 -- how long to wait before trying to path again
|
local PATHFINDING_FAIL_WAIT = 30 -- how long to wait before trying to path again
|
||||||
local PATHING_START_DELAY = 4 -- When doing non-prioritised pathing, how long to wait until last mob pathed
|
|
||||||
|
|
||||||
local PATHFINDING_SEARCH_DISTANCE = 50 -- How big the square is that pathfinding will look
|
|
||||||
|
|
||||||
local PATHFINDING = "gowp"
|
local PATHFINDING = "gowp"
|
||||||
|
|
||||||
|
@ -110,22 +107,16 @@ local function generate_enriched_path(wp_in, door_open_pos, door_close_pos, cur_
|
||||||
return wp_out
|
return wp_out
|
||||||
end
|
end
|
||||||
|
|
||||||
local last_pathing_time = os.time()
|
function mob_class:ready_to_path()
|
||||||
|
|
||||||
function mob_class:ready_to_path(prioritised)
|
|
||||||
mcl_log("Check ready to path")
|
mcl_log("Check ready to path")
|
||||||
if self._pf_last_failed and (os.time() - self._pf_last_failed) < PATHFINDING_FAIL_WAIT then
|
if self._pf_last_failed and (os.time() - self._pf_last_failed) < PATHFINDING_FAIL_WAIT then
|
||||||
mcl_log("Not ready to path as last fail is less than threshold: " .. (os.time() - self._pf_last_failed))
|
mcl_log("Not ready to path as last fail is less than threshold: " .. (os.time() - self._pf_last_failed))
|
||||||
return false
|
return false
|
||||||
else
|
else
|
||||||
local time_since_path_start = os.time() - last_pathing_time
|
|
||||||
mcl_log("time_since_path_start: " .. tostring(time_since_path_start))
|
|
||||||
if prioritised or (time_since_path_start) > PATHING_START_DELAY then
|
|
||||||
mcl_log("We are ready to pathfind, no previous fail or we are past threshold")
|
mcl_log("We are ready to pathfind, no previous fail or we are past threshold")
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
-- This function is used to see if we can path. We could use to check a route, rather than making people move.
|
-- This function is used to see if we can path. We could use to check a route, rather than making people move.
|
||||||
local function calculate_path_through_door (p, cur_door_pos, t)
|
local function calculate_path_through_door (p, cur_door_pos, t)
|
||||||
|
@ -153,7 +144,7 @@ local function calculate_path_through_door (p, cur_door_pos, t)
|
||||||
if n.name == "air" then
|
if n.name == "air" then
|
||||||
mcl_log("We have air space next to door at: " .. minetest.pos_to_string(pos_closest_to_door))
|
mcl_log("We have air space next to door at: " .. minetest.pos_to_string(pos_closest_to_door))
|
||||||
|
|
||||||
prospective_wp = minetest.find_path(p, pos_closest_to_door, PATHFINDING_SEARCH_DISTANCE, 1, 4)
|
prospective_wp = minetest.find_path(p,pos_closest_to_door,150,1,4)
|
||||||
|
|
||||||
if prospective_wp then
|
if prospective_wp then
|
||||||
mcl_log("Found a path to next to door".. minetest.pos_to_string(pos_closest_to_door))
|
mcl_log("Found a path to next to door".. minetest.pos_to_string(pos_closest_to_door))
|
||||||
|
@ -163,7 +154,7 @@ local function calculate_path_through_door (p, cur_door_pos, t)
|
||||||
|
|
||||||
if t then
|
if t then
|
||||||
mcl_log("We have t, lets go from door to target")
|
mcl_log("We have t, lets go from door to target")
|
||||||
local wp_otherside_door_to_target = minetest.find_path(other_side_of_door, t, PATHFINDING_SEARCH_DISTANCE, 1, 4)
|
local wp_otherside_door_to_target = minetest.find_path(other_side_of_door,t,150,1,4)
|
||||||
|
|
||||||
if wp_otherside_door_to_target and #wp_otherside_door_to_target > 0 then
|
if wp_otherside_door_to_target and #wp_otherside_door_to_target > 0 then
|
||||||
append_paths (prospective_wp, wp_otherside_door_to_target)
|
append_paths (prospective_wp, wp_otherside_door_to_target)
|
||||||
|
@ -199,13 +190,9 @@ local function calculate_path_through_door (p, cur_door_pos, t)
|
||||||
return enriched_path
|
return enriched_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mob_class:gopath(target,callback_arrived)
|
||||||
|
|
||||||
function mob_class:gopath(target, callback_arrived, prioritised)
|
|
||||||
if self.state == PATHFINDING then mcl_log("Already pathfinding, don't set another until done.") return end
|
if self.state == PATHFINDING then mcl_log("Already pathfinding, don't set another until done.") return end
|
||||||
if not self:ready_to_path(prioritised) then return end
|
if not self:ready_to_path() then return end
|
||||||
|
|
||||||
last_pathing_time = os.time()
|
|
||||||
|
|
||||||
self.order = nil
|
self.order = nil
|
||||||
|
|
||||||
|
@ -213,7 +200,7 @@ function mob_class:gopath(target, callback_arrived, prioritised)
|
||||||
local t = vector.offset(target,0,1,0)
|
local t = vector.offset(target,0,1,0)
|
||||||
|
|
||||||
--Check direct route
|
--Check direct route
|
||||||
local wp = minetest.find_path(p, t, PATHFINDING_SEARCH_DISTANCE, 1, 4)
|
local wp = minetest.find_path(p,t,150,1,4)
|
||||||
|
|
||||||
if not wp then
|
if not wp then
|
||||||
mcl_log("### No direct path. Path through door closest to target.")
|
mcl_log("### No direct path. Path through door closest to target.")
|
||||||
|
@ -423,7 +410,7 @@ function mob_class:check_gowp(dtime)
|
||||||
mcl_log("No current target")
|
mcl_log("No current target")
|
||||||
end
|
end
|
||||||
|
|
||||||
local final_wp = minetest.find_path(p, self._target, PATHFINDING_SEARCH_DISTANCE, 1, 4)
|
local final_wp = minetest.find_path(p,self._target,150,1,4)
|
||||||
if final_wp then
|
if final_wp then
|
||||||
mcl_log("We can get to target here.")
|
mcl_log("We can get to target here.")
|
||||||
-- self.waypoints = final_wp
|
-- self.waypoints = final_wp
|
||||||
|
|
|
@ -659,6 +659,7 @@ function mob_class:do_env_damage()
|
||||||
-- rain
|
-- rain
|
||||||
if self.rain_damage > 0 then
|
if self.rain_damage > 0 then
|
||||||
if mcl_weather.rain.raining and mcl_weather.is_outdoor(pos) then
|
if mcl_weather.rain.raining and mcl_weather.is_outdoor(pos) then
|
||||||
|
|
||||||
self.health = self.health - self.rain_damage
|
self.health = self.health - self.rain_damage
|
||||||
|
|
||||||
if self:check_for_death("rain", {type = "environment",
|
if self:check_for_death("rain", {type = "environment",
|
||||||
|
@ -671,9 +672,13 @@ function mob_class:do_env_damage()
|
||||||
pos.y = pos.y + 1 -- for particle effect position
|
pos.y = pos.y + 1 -- for particle effect position
|
||||||
|
|
||||||
-- water damage
|
-- water damage
|
||||||
if self.water_damage > 0 and nodef.groups.water then
|
if self.water_damage > 0
|
||||||
|
and nodef.groups.water then
|
||||||
|
|
||||||
if self.water_damage ~= 0 then
|
if self.water_damage ~= 0 then
|
||||||
|
|
||||||
self.health = self.health - self.water_damage
|
self.health = self.health - self.water_damage
|
||||||
|
|
||||||
mcl_mobs.effect(pos, 5, "mcl_particles_smoke.png", nil, nil, 1, nil)
|
mcl_mobs.effect(pos, 5, "mcl_particles_smoke.png", nil, nil, 1, nil)
|
||||||
|
|
||||||
if self:check_for_death("water", {type = "environment",
|
if self:check_for_death("water", {type = "environment",
|
||||||
|
@ -681,10 +686,27 @@ function mob_class:do_env_damage()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif self.lava_damage > 0 and (nodef.groups.lava) then
|
-- magma damage
|
||||||
|
elseif self.fire_damage > 0
|
||||||
|
and (nodef2.groups.fire) then
|
||||||
|
|
||||||
|
if self.fire_damage ~= 0 then
|
||||||
|
|
||||||
|
self.health = self.health - self.fire_damage
|
||||||
|
|
||||||
|
if self:check_for_death("fire", {type = "environment",
|
||||||
|
pos = pos, node = self.standing_in}) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
-- lava damage
|
-- lava damage
|
||||||
|
elseif self.lava_damage > 0
|
||||||
|
and (nodef.groups.lava) then
|
||||||
|
|
||||||
if self.lava_damage ~= 0 then
|
if self.lava_damage ~= 0 then
|
||||||
|
|
||||||
self.health = self.health - self.lava_damage
|
self.health = self.health - self.lava_damage
|
||||||
|
|
||||||
mcl_mobs.effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil)
|
mcl_mobs.effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil)
|
||||||
mcl_burning.set_on_fire(self.object, 10)
|
mcl_burning.set_on_fire(self.object, 10)
|
||||||
|
|
||||||
|
@ -693,20 +715,15 @@ function mob_class:do_env_damage()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif self.fire_damage > 0 and (nodef2.groups.fire) then
|
|
||||||
-- magma damage
|
-- fire damage
|
||||||
|
elseif self.fire_damage > 0
|
||||||
|
and (nodef.groups.fire) then
|
||||||
|
|
||||||
if self.fire_damage ~= 0 then
|
if self.fire_damage ~= 0 then
|
||||||
|
|
||||||
self.health = self.health - self.fire_damage
|
self.health = self.health - self.fire_damage
|
||||||
|
|
||||||
if self:check_for_death("fire", {type = "environment",
|
|
||||||
pos = pos, node = self.standing_in}) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
elseif self.fire_damage > 0 and (nodef.groups.fire) then
|
|
||||||
-- fire damage
|
|
||||||
if self.fire_damage ~= 0 then
|
|
||||||
self.health = self.health - self.fire_damage
|
|
||||||
mcl_mobs.effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil)
|
mcl_mobs.effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil)
|
||||||
mcl_burning.set_on_fire(self.object, 5)
|
mcl_burning.set_on_fire(self.object, 5)
|
||||||
|
|
||||||
|
@ -715,9 +732,12 @@ function mob_class:do_env_damage()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif nodef.damage_per_second ~= 0 and not nodef.groups.lava and not nodef.groups.fire then
|
|
||||||
-- damage_per_second node check
|
-- damage_per_second node check
|
||||||
|
elseif nodef.damage_per_second ~= 0 and not nodef.groups.lava and not nodef.groups.fire then
|
||||||
|
|
||||||
self.health = self.health - nodef.damage_per_second
|
self.health = self.health - nodef.damage_per_second
|
||||||
|
|
||||||
mcl_mobs.effect(pos, 5, "mcl_particles_smoke.png")
|
mcl_mobs.effect(pos, 5, "mcl_particles_smoke.png")
|
||||||
|
|
||||||
if self:check_for_death("dps", {type = "environment",
|
if self:check_for_death("dps", {type = "environment",
|
||||||
|
@ -729,7 +749,6 @@ function mob_class:do_env_damage()
|
||||||
-- Drowning damage
|
-- Drowning damage
|
||||||
if self.breath_max ~= -1 then
|
if self.breath_max ~= -1 then
|
||||||
local drowning = false
|
local drowning = false
|
||||||
|
|
||||||
if self.breathes_in_water then
|
if self.breathes_in_water then
|
||||||
if minetest.get_item_group(self.standing_in, "water") == 0 then
|
if minetest.get_item_group(self.standing_in, "water") == 0 then
|
||||||
drowning = true
|
drowning = true
|
||||||
|
@ -737,9 +756,10 @@ function mob_class:do_env_damage()
|
||||||
elseif nodef.drowning > 0 then
|
elseif nodef.drowning > 0 then
|
||||||
drowning = true
|
drowning = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if drowning then
|
if drowning then
|
||||||
|
|
||||||
self.breath = math.max(0, self.breath - 1)
|
self.breath = math.max(0, self.breath - 1)
|
||||||
|
|
||||||
mcl_mobs.effect(pos, 2, "bubble.png", nil, nil, 1, nil)
|
mcl_mobs.effect(pos, 2, "bubble.png", nil, nil, 1, nil)
|
||||||
if self.breath <= 0 then
|
if self.breath <= 0 then
|
||||||
local dmg
|
local dmg
|
||||||
|
@ -797,18 +817,18 @@ function mob_class:env_damage (dtime, pos)
|
||||||
-- environmental damage timer (every 1 second)
|
-- environmental damage timer (every 1 second)
|
||||||
self.env_damage_timer = self.env_damage_timer + dtime
|
self.env_damage_timer = self.env_damage_timer + dtime
|
||||||
|
|
||||||
|
if (self.state == "attack" and self.env_damage_timer > 1)
|
||||||
if self.env_damage_timer > 1 then
|
or self.state ~= "attack" then
|
||||||
self.env_damage_timer = 0
|
|
||||||
|
|
||||||
self:check_entity_cramming()
|
self:check_entity_cramming()
|
||||||
|
self.env_damage_timer = 0
|
||||||
|
|
||||||
-- check for environmental damage (water, fire, lava etc.)
|
-- check for environmental damage (water, fire, lava etc.)
|
||||||
if self:do_env_damage() then
|
if self:do_env_damage() then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
self:replace_node(pos) -- (sheep eats grass etc.)
|
-- node replace check (cow eats grass etc.)
|
||||||
|
self:replace(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -24,60 +24,25 @@ local vector_floor = vector.floor
|
||||||
|
|
||||||
local table_copy = table.copy
|
local table_copy = table.copy
|
||||||
local table_remove = table.remove
|
local table_remove = table.remove
|
||||||
|
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
|
|
||||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_spawning", false)
|
|
||||||
local function mcl_log (message)
|
|
||||||
if LOGGING_ON then
|
|
||||||
mcl_util.mcl_log (message, "[Mobs spawn]", true)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local dbg_spawn_attempts = 0
|
local dbg_spawn_attempts = 0
|
||||||
local dbg_spawn_succ = 0
|
local dbg_spawn_succ = 0
|
||||||
local dbg_spawn_counts = {}
|
local dbg_spawn_counts = {}
|
||||||
|
-- range for mob count
|
||||||
|
local aoc_range = 136
|
||||||
local remove_far = true
|
local remove_far = true
|
||||||
|
|
||||||
local WAIT_FOR_SPAWN_ATTEMPT = 10
|
|
||||||
local FIND_SPAWN_POS_RETRIES = 16
|
|
||||||
local FIND_SPAWN_POS_RETRIES_SUCCESS_RESPIN = 8
|
|
||||||
|
|
||||||
local MOB_SPAWN_ZONE_INNER = 24
|
|
||||||
local MOB_SPAWN_ZONE_MIDDLE = 32
|
|
||||||
local MOB_SPAWN_ZONE_OUTER = 128
|
|
||||||
|
|
||||||
-- range for mob count
|
|
||||||
local MOB_CAP_INNER_RADIUS = 32
|
|
||||||
local aoc_range = 136
|
|
||||||
|
|
||||||
local MISSING_CAP_DEFAULT = 15
|
|
||||||
local MOBS_CAP_CLOSE = 5
|
|
||||||
|
|
||||||
local SPAWN_MAPGEN_LIMIT = mcl_vars.mapgen_limit - 150
|
|
||||||
|
|
||||||
local mob_cap = {
|
local mob_cap = {
|
||||||
hostile = tonumber(minetest.settings:get("mcl_mob_cap_monster")) or 70,
|
monster = tonumber(minetest.settings:get("mcl_mob_cap_monster")) or 70,
|
||||||
passive = tonumber(minetest.settings:get("mcl_mob_cap_animal")) or 13,
|
animal = tonumber(minetest.settings:get("mcl_mob_cap_animal")) or 10,
|
||||||
ambient = tonumber(minetest.settings:get("mcl_mob_cap_ambient")) or 15,
|
ambient = tonumber(minetest.settings:get("mcl_mob_cap_ambient")) or 15,
|
||||||
water = tonumber(minetest.settings:get("mcl_mob_cap_water")) or 8,
|
water = tonumber(minetest.settings:get("mcl_mob_cap_water")) or 5, --currently unused
|
||||||
water_ambient = tonumber(minetest.settings:get("mcl_mob_cap_water_ambient")) or 20, --currently unused
|
water_ambient = tonumber(minetest.settings:get("mcl_mob_cap_water_ambient")) or 20, --currently unused
|
||||||
player = tonumber(minetest.settings:get("mcl_mob_cap_player")) or 75,
|
player = tonumber(minetest.settings:get("mcl_mob_cap_player")) or 75,
|
||||||
total = tonumber(minetest.settings:get("mcl_mob_cap_total")) or 500,
|
total = tonumber(minetest.settings:get("mcl_mob_cap_total")) or 500,
|
||||||
}
|
}
|
||||||
|
|
||||||
local peaceful_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_peaceful_percentage_spawned")) or 35
|
|
||||||
local peaceful_group_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_peaceful_group_percentage_spawned")) or 15
|
|
||||||
local hostile_group_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_hostile_group_percentage_spawned")) or 20
|
|
||||||
|
|
||||||
mcl_log("Mob cap hostile: " .. mob_cap.hostile)
|
|
||||||
mcl_log("Mob cap water: " .. mob_cap.water)
|
|
||||||
mcl_log("Mob cap passive: " .. mob_cap.passive)
|
|
||||||
|
|
||||||
mcl_log("Percentage of peacefuls spawned: " .. peaceful_percentage_spawned)
|
|
||||||
mcl_log("Percentage of peaceful spawns are group: " .. peaceful_group_percentage_spawned)
|
|
||||||
mcl_log("Percentage of hostile spawns are group: " .. hostile_group_percentage_spawned)
|
|
||||||
|
|
||||||
--do mobs spawn?
|
--do mobs spawn?
|
||||||
local mobs_spawn = minetest.settings:get_bool("mobs_spawn", true) ~= false
|
local mobs_spawn = minetest.settings:get_bool("mobs_spawn", true) ~= false
|
||||||
local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= false
|
local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= false
|
||||||
|
@ -285,58 +250,22 @@ local function count_mobs_total(mob_type)
|
||||||
return num
|
return num
|
||||||
end
|
end
|
||||||
|
|
||||||
local function count_mobs_add_entry (mobs_list, mob_cat)
|
local function count_mobs_all()
|
||||||
if mobs_list[mob_cat] then
|
local mobs_found = {}
|
||||||
mobs_list[mob_cat] = mobs_list[mob_cat] + 1
|
|
||||||
else
|
|
||||||
mobs_list[mob_cat] = 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--categorise_by can be name or type or spawn_class
|
|
||||||
local function count_mobs_all(categorise_by, pos)
|
|
||||||
local mobs_found_wide = {}
|
|
||||||
local mobs_found_close = {}
|
|
||||||
|
|
||||||
local num = 0
|
local num = 0
|
||||||
for _,entity in pairs(minetest.luaentities) do
|
for _,entity in pairs(minetest.luaentities) do
|
||||||
if entity and entity.is_mob then
|
if entity.is_mob then
|
||||||
|
local mob_type = entity.type -- animal / monster / npc
|
||||||
local add_entry = false
|
local mob_name = entity.name
|
||||||
--local mob_type = entity.type -- animal / monster / npc
|
if mobs_found[mob_name] then
|
||||||
local mob_cat = entity[categorise_by]
|
mobs_found[mob_name] = mobs_found[mob_name] + 1
|
||||||
|
|
||||||
if pos then
|
|
||||||
local mob_pos = entity.object:get_pos()
|
|
||||||
if mob_pos then
|
|
||||||
local distance = vector.distance(pos, mob_pos)
|
|
||||||
--mcl_log("distance: ".. distance)
|
|
||||||
if distance <= MOB_SPAWN_ZONE_MIDDLE then
|
|
||||||
--mcl_log("distance is close")
|
|
||||||
count_mobs_add_entry (mobs_found_close, mob_cat)
|
|
||||||
count_mobs_add_entry (mobs_found_wide, mob_cat)
|
|
||||||
add_entry = true
|
|
||||||
elseif distance <= MOB_SPAWN_ZONE_OUTER then
|
|
||||||
--mcl_log("distance is wide")
|
|
||||||
count_mobs_add_entry (mobs_found_wide, mob_cat)
|
|
||||||
add_entry = true
|
|
||||||
else
|
else
|
||||||
--mcl_log("mob_pos: " .. minetest.pos_to_string(mob_pos))
|
mobs_found[mob_name] = 1
|
||||||
end
|
end
|
||||||
end
|
|
||||||
else
|
|
||||||
count_mobs_add_entry (mobs_found_wide, mob_cat)
|
|
||||||
add_entry = true
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
if add_entry then
|
|
||||||
num = num + 1
|
num = num + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
return mobs_found, num
|
||||||
--mcl_log("num: ".. num)
|
|
||||||
return mobs_found_close, mobs_found_wide, num
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function count_mobs_total_cap(mob_type)
|
local function count_mobs_total_cap(mob_type)
|
||||||
|
@ -351,32 +280,6 @@ local function count_mobs_total_cap(mob_type)
|
||||||
return num
|
return num
|
||||||
end
|
end
|
||||||
|
|
||||||
local function output_mob_stats(mob_counts, total_mobs, chat_display)
|
|
||||||
if (total_mobs) then
|
|
||||||
local total_output = "Total mobs found: " .. total_mobs
|
|
||||||
if chat_display then
|
|
||||||
minetest.log(total_output)
|
|
||||||
else
|
|
||||||
minetest.log("action", total_output)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
local detailed = ""
|
|
||||||
if mob_counts then
|
|
||||||
for k, v1 in pairs(mob_counts) do
|
|
||||||
detailed = detailed .. tostring(k) .. ": " .. tostring(v1) .. "; "
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if detailed and detailed ~= "" then
|
|
||||||
if chat_display then
|
|
||||||
minetest.log(detailed)
|
|
||||||
else
|
|
||||||
minetest.log("action", detailed)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- global functions
|
-- global functions
|
||||||
|
|
||||||
function mcl_mobs:spawn_abm_check(pos, node, name)
|
function mcl_mobs:spawn_abm_check(pos, node, name)
|
||||||
|
@ -413,8 +316,6 @@ WARNING: BIOME INTEGRATION NEEDED -> How to get biome through lua??
|
||||||
|
|
||||||
--this is where all of the spawning information is kept
|
--this is where all of the spawning information is kept
|
||||||
local spawn_dictionary = {}
|
local spawn_dictionary = {}
|
||||||
--this is where all of the spawning information is kept for mobs that don't naturally spawn
|
|
||||||
local non_spawn_dictionary = {}
|
|
||||||
local summary_chance = 0
|
local summary_chance = 0
|
||||||
|
|
||||||
function mcl_mobs:spawn_setup(def)
|
function mcl_mobs:spawn_setup(def)
|
||||||
|
@ -480,47 +381,6 @@ function mcl_mobs:spawn_setup(def)
|
||||||
summary_chance = summary_chance + chance
|
summary_chance = summary_chance + chance
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_mobs:mob_light_lvl(mob_name, dimension)
|
|
||||||
local spawn_dictionary_consolidated = {}
|
|
||||||
--see if the mob exists in the nonspawn dictionary, if so then return light values
|
|
||||||
if non_spawn_dictionary[mob_name] ~= nil then
|
|
||||||
local mob_dimension = non_spawn_dictionary[mob_name][dimension]
|
|
||||||
if mob_name ~= nil then
|
|
||||||
return mob_dimension.min_light,mob_dimension.max_light
|
|
||||||
else
|
|
||||||
return non_spawn_dictionary[mob_name]["overworld"].min_light, non_spawn_dictionary[mob_name]["overworld"].max_light
|
|
||||||
end
|
|
||||||
|
|
||||||
--if the mob doesn't exist in non_spawn, check spawn_dictonary
|
|
||||||
else
|
|
||||||
for i,v in pairs(spawn_dictionary) do
|
|
||||||
if spawn_dictionary[spawn_dictionary[i].name] == nil then
|
|
||||||
spawn_dictionary_consolidated[spawn_dictionary[i].name] = {}
|
|
||||||
end
|
|
||||||
spawn_dictionary_consolidated[spawn_dictionary[i].name][dimension] = {
|
|
||||||
["min_light"] = spawn_dictionary[i].min_light,
|
|
||||||
["max_light"] = spawn_dictionary[i].max_light
|
|
||||||
}
|
|
||||||
end
|
|
||||||
mob_dimension = spawn_dictionary_consolidated[mob_name][dimension]
|
|
||||||
mob_dimension_default = spawn_dictionary_consolidated[mob_name]["overworld"]
|
|
||||||
if spawn_dictionary_consolidated[mob_name] == mob_name and mob_dimension ~= nil then
|
|
||||||
return mob_dimension.min_light, mob_dimension.max_light
|
|
||||||
else
|
|
||||||
return mob_dimension_default.min_light, mob_dimension_default.max_light
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function mcl_mobs:non_spawn_specific(mob_name,dimension,min_light,max_light)
|
|
||||||
table.insert(non_spawn_dictionary, mob_name)
|
|
||||||
non_spawn_dictionary[mob_name] = {
|
|
||||||
[dimension] = {
|
|
||||||
min_light = min_light , max_light = max_light
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
function mcl_mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_light, max_light, interval, chance, aoc, min_height, max_height, day_toggle, on_spawn)
|
function mcl_mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_light, max_light, interval, chance, aoc, min_height, max_height, day_toggle, on_spawn)
|
||||||
|
|
||||||
-- Do mobs spawn at all?
|
-- Do mobs spawn at all?
|
||||||
|
@ -562,23 +422,18 @@ function mcl_mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_
|
||||||
summary_chance = summary_chance + chance
|
summary_chance = summary_chance + chance
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local two_pi = 2 * math.pi
|
local two_pi = 2 * math.pi
|
||||||
local function get_next_mob_spawn_pos(pos)
|
local function get_next_mob_spawn_pos(pos)
|
||||||
-- TODO We should consider spawning something a little further away sporadically.
|
local distance = math_random(25, 32)
|
||||||
-- It would be good for sky farms and variance, rather than all being on the 24 - 32 block away radius
|
|
||||||
local distance = math_random(MOB_SPAWN_ZONE_INNER, MOB_SPAWN_ZONE_MIDDLE)
|
|
||||||
local angle = math_random() * two_pi
|
local angle = math_random() * two_pi
|
||||||
|
|
||||||
-- TODO Floor xoff and zoff and add 0.5 so it tries to spawn in the middle of the square. Less failed attempts.
|
|
||||||
local xoff = math_round(distance * math_cos(angle))
|
local xoff = math_round(distance * math_cos(angle))
|
||||||
local zoff = math_round(distance * math_sin(angle))
|
local yoff = math_round(distance * math_sin(angle))
|
||||||
return vector.offset(pos, xoff, 0, zoff)
|
return vector.offset(pos, xoff, 0, yoff)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function decypher_limits(posy)
|
local function decypher_limits(posy)
|
||||||
posy = math_floor(posy)
|
posy = math_floor(posy)
|
||||||
return posy - MOB_SPAWN_ZONE_MIDDLE, posy + MOB_SPAWN_ZONE_MIDDLE
|
return posy - 32, posy + 32
|
||||||
end
|
end
|
||||||
|
|
||||||
--a simple helper function for mob_spawn
|
--a simple helper function for mob_spawn
|
||||||
|
@ -629,9 +484,7 @@ local function has_room(self,pos)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function spawn_check(pos,spawn_def,ignore_caps)
|
||||||
|
|
||||||
local function spawn_check(pos, spawn_def)
|
|
||||||
if not spawn_def then return end
|
if not spawn_def then return end
|
||||||
dbg_spawn_attempts = dbg_spawn_attempts + 1
|
dbg_spawn_attempts = dbg_spawn_attempts + 1
|
||||||
local dimension = mcl_worlds.pos_to_dimension(pos)
|
local dimension = mcl_worlds.pos_to_dimension(pos)
|
||||||
|
@ -654,8 +507,17 @@ local function spawn_check(pos, spawn_def)
|
||||||
local is_leaf = get_item_group(gotten_node, "leaves") ~= 0
|
local is_leaf = get_item_group(gotten_node, "leaves") ~= 0
|
||||||
local is_bedrock = gotten_node == "mcl_core:bedrock"
|
local is_bedrock = gotten_node == "mcl_core:bedrock"
|
||||||
local is_grass = minetest.get_item_group(gotten_node,"grass_block") ~= 0
|
local is_grass = minetest.get_item_group(gotten_node,"grass_block") ~= 0
|
||||||
|
local mob_count_wide = 0
|
||||||
|
|
||||||
|
local mob_count = 0
|
||||||
|
if not ignore_caps then
|
||||||
|
mob_count = count_mobs(pos,32,mob_type)
|
||||||
|
mob_count_wide = count_mobs(pos,aoc_range,mob_type)
|
||||||
|
end
|
||||||
|
|
||||||
if pos and spawn_def
|
if pos and spawn_def
|
||||||
|
and ( mob_count_wide < (mob_cap[mob_type] or 15) )
|
||||||
|
and ( mob_count < 5 )
|
||||||
and pos.y >= spawn_def.min_height
|
and pos.y >= spawn_def.min_height
|
||||||
and pos.y <= spawn_def.max_height
|
and pos.y <= spawn_def.max_height
|
||||||
and spawn_def.dimension == dimension
|
and spawn_def.dimension == dimension
|
||||||
|
@ -691,7 +553,8 @@ function mcl_mobs.spawn(pos,id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function spawn_group(p,mob,spawn_on,amount_to_spawn)
|
local function spawn_group(p,mob,spawn_on,group_max,group_min)
|
||||||
|
if not group_min then group_min = 1 end
|
||||||
local nn= minetest.find_nodes_in_area_under_air(vector.offset(p,-5,-3,-5),vector.offset(p,5,3,5),spawn_on)
|
local nn= minetest.find_nodes_in_area_under_air(vector.offset(p,-5,-3,-5),vector.offset(p,5,3,5),spawn_on)
|
||||||
local o
|
local o
|
||||||
table.shuffle(nn)
|
table.shuffle(nn)
|
||||||
|
@ -699,10 +562,9 @@ local function spawn_group(p,mob,spawn_on,amount_to_spawn)
|
||||||
nn = {}
|
nn = {}
|
||||||
table.insert(nn,p)
|
table.insert(nn,p)
|
||||||
end
|
end
|
||||||
|
for i = 1, math.random(group_min,group_max) do
|
||||||
for i = 1, amount_to_spawn do
|
|
||||||
local sp = vector.offset(nn[math.random(#nn)],0,1,0)
|
local sp = vector.offset(nn[math.random(#nn)],0,1,0)
|
||||||
if spawn_check(nn[math.random(#nn)],mob) then
|
if spawn_check(nn[math.random(#nn)],mob,true) then
|
||||||
if mob.type_of_spawning == "water" then
|
if mob.type_of_spawning == "water" then
|
||||||
sp = get_water_spawn(sp)
|
sp = get_water_spawn(sp)
|
||||||
end
|
end
|
||||||
|
@ -793,113 +655,25 @@ if mobs_spawn then
|
||||||
-- Get pos to spawn, x and z are randomised, y is range
|
-- Get pos to spawn, x and z are randomised, y is range
|
||||||
|
|
||||||
|
|
||||||
local function mob_cap_space (pos, mob_type, mob_counts_close, mob_counts_wide)
|
local function spawn_a_mob(pos, dimension, y_min, y_max)
|
||||||
|
--create a disconnected clone of the spawn dictionary
|
||||||
-- Some mob examples
|
--prevents memory leak
|
||||||
--type = "monster", spawn_class = "hostile",
|
local mob_library_worker_table = table_copy(spawn_dictionary)
|
||||||
--type = "animal", spawn_class = "passive",
|
|
||||||
--local cod = { type = "animal", spawn_class = "water",
|
|
||||||
|
|
||||||
local type_cap = mob_cap[mob_type] or MISSING_CAP_DEFAULT
|
|
||||||
local close_zone_cap = MOBS_CAP_CLOSE
|
|
||||||
|
|
||||||
local mob_total_wide = mob_counts_wide[mob_type]
|
|
||||||
if not mob_total_wide then
|
|
||||||
--mcl_log("none of type found. set as 0")
|
|
||||||
mob_total_wide = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
local cap_space_wide = type_cap - mob_total_wide
|
|
||||||
if cap_space_wide < 1 then
|
|
||||||
cap_space_wide = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
local mob_total_close = mob_counts_close[mob_type]
|
|
||||||
if not mob_total_close then
|
|
||||||
--mcl_log("none of type found. set as 0")
|
|
||||||
mob_total_close = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
local cap_space_close = close_zone_cap - mob_total_close
|
|
||||||
if cap_space_close < 1 then
|
|
||||||
cap_space_close = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
--mcl_log("spawn_class: " .. spawn_class)
|
|
||||||
|
|
||||||
if false and mob_type == "water" then
|
|
||||||
mcl_log("mob_type: " .. mob_type .. " and pos: " .. minetest.pos_to_string(pos))
|
|
||||||
mcl_log("wide: " .. mob_total_wide .. "/" .. type_cap)
|
|
||||||
mcl_log("cap_space_wide: " .. cap_space_wide)
|
|
||||||
mcl_log("close: " .. mob_total_close .. "/" .. close_zone_cap)
|
|
||||||
mcl_log("cap_space_close: " .. cap_space_close)
|
|
||||||
end
|
|
||||||
|
|
||||||
return cap_space_wide, cap_space_close
|
|
||||||
end
|
|
||||||
|
|
||||||
local function find_spawning_position(pos, max_times)
|
|
||||||
local spawning_position
|
|
||||||
|
|
||||||
local max_loops = 1
|
|
||||||
if max_times then max_loops = max_times end
|
|
||||||
|
|
||||||
local y_min, y_max = decypher_limits(pos.y)
|
|
||||||
|
|
||||||
mcl_log("mapgen_limit: " .. SPAWN_MAPGEN_LIMIT)
|
|
||||||
local i = 0
|
|
||||||
repeat
|
|
||||||
local goal_pos = get_next_mob_spawn_pos(pos)
|
local goal_pos = get_next_mob_spawn_pos(pos)
|
||||||
|
--grab mob that fits into the spawning location
|
||||||
if math.abs(goal_pos.x) <= SPAWN_MAPGEN_LIMIT and math.abs(pos.y) <= SPAWN_MAPGEN_LIMIT and math.abs(goal_pos.z) <= SPAWN_MAPGEN_LIMIT then
|
--randomly grab a mob, don't exclude any possibilities
|
||||||
local spawning_position_list = find_nodes_in_area_under_air(
|
local spawning_position_list = find_nodes_in_area_under_air(
|
||||||
{x = goal_pos.x, y = y_min, z = goal_pos.z},
|
{x = goal_pos.x, y = y_min, z = goal_pos.z},
|
||||||
{x = goal_pos.x, y = y_max, z = goal_pos.z},
|
{x = goal_pos.x, y = y_max, z = goal_pos.z},
|
||||||
{"group:solid", "group:water", "group:lava"}
|
{"group:solid", "group:water", "group:lava"}
|
||||||
)
|
)
|
||||||
if #spawning_position_list > 0 then
|
if #spawning_position_list <= 0 then return end
|
||||||
mcl_log("Spawning positions available: " .. minetest.pos_to_string(goal_pos))
|
local spawning_position = spawning_position_list[math_random(1, #spawning_position_list)]
|
||||||
spawning_position = spawning_position_list[math_random(1, #spawning_position_list)]
|
|
||||||
else
|
|
||||||
mcl_log("Spawning position isn't good. Do not spawn: " .. minetest.pos_to_string(goal_pos))
|
|
||||||
end
|
|
||||||
|
|
||||||
else
|
|
||||||
mcl_log("Pos outside mapgen limits: " .. minetest.pos_to_string(goal_pos))
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
i = i + 1
|
|
||||||
if i >= max_loops then
|
|
||||||
mcl_log("Cancel finding spawn positions at: " .. max_loops)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
until spawning_position
|
|
||||||
return spawning_position
|
|
||||||
end
|
|
||||||
|
|
||||||
local function spawn_a_mob(pos)
|
|
||||||
--create a disconnected clone of the spawn dictionary, prevents memory leak
|
|
||||||
local mob_library_worker_table = table_copy(spawn_dictionary)
|
|
||||||
|
|
||||||
local spawning_position = find_spawning_position(pos, FIND_SPAWN_POS_RETRIES)
|
|
||||||
if not spawning_position then
|
|
||||||
minetest.log("action", "[Mobs spawn] Cannot find a valid spawn position after retries: " .. FIND_SPAWN_POS_RETRIES)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local mob_counts_close, mob_counts_wide, total_mobs = count_mobs_all("spawn_class", spawning_position)
|
|
||||||
--output_mob_stats(mob_counts_close, total_mobs)
|
|
||||||
--output_mob_stats(mob_counts_wide)
|
|
||||||
|
|
||||||
--grab mob that fits into the spawning location
|
|
||||||
--randomly grab a mob, don't exclude any possibilities
|
|
||||||
perlin_noise = perlin_noise or minetest_get_perlin(noise_params)
|
perlin_noise = perlin_noise or minetest_get_perlin(noise_params)
|
||||||
local noise = perlin_noise:get_3d(spawning_position)
|
local noise = perlin_noise:get_3d(spawning_position)
|
||||||
local current_summary_chance = summary_chance
|
local current_summary_chance = summary_chance
|
||||||
|
|
||||||
table.shuffle(mob_library_worker_table)
|
table.shuffle(mob_library_worker_table)
|
||||||
|
|
||||||
while #mob_library_worker_table > 0 do
|
while #mob_library_worker_table > 0 do
|
||||||
local mob_chance_offset = (math_round(noise * current_summary_chance + 12345) % current_summary_chance) + 1
|
local mob_chance_offset = (math_round(noise * current_summary_chance + 12345) % current_summary_chance) + 1
|
||||||
local mob_index = 1
|
local mob_index = 1
|
||||||
|
@ -910,32 +684,13 @@ if mobs_spawn then
|
||||||
mob_chance = mob_library_worker_table[mob_index].chance
|
mob_chance = mob_library_worker_table[mob_index].chance
|
||||||
step_chance = step_chance + mob_chance
|
step_chance = step_chance + mob_chance
|
||||||
end
|
end
|
||||||
--minetest.log(mob_def.name.." "..step_chance.. " "..mob_chance)
|
|
||||||
|
|
||||||
local mob_def = mob_library_worker_table[mob_index]
|
local mob_def = mob_library_worker_table[mob_index]
|
||||||
|
--minetest.log(mob_def.name.." "..step_chance.. " "..mob_chance)
|
||||||
if mob_def and mob_def.name and minetest.registered_entities[mob_def.name] then
|
if mob_def and mob_def.name and minetest.registered_entities[mob_def.name] then
|
||||||
|
local spawn_in_group = minetest.registered_entities[mob_def.name].spawn_in_group or 4
|
||||||
local mob_def_ent = minetest.registered_entities[mob_def.name]
|
local spawn_in_group_min = minetest.registered_entities[mob_def.name].spawn_in_group_min or 1
|
||||||
--local mob_type = mob_def_ent.type
|
local mob_type = minetest.registered_entities[mob_def.name].type
|
||||||
local mob_spawn_class = mob_def_ent.spawn_class
|
if spawn_check(spawning_position,mob_def) then
|
||||||
|
|
||||||
--mcl_log("mob_spawn_class: " .. mob_spawn_class)
|
|
||||||
|
|
||||||
local cap_space_wide, cap_space_close = mob_cap_space (spawning_position, mob_spawn_class, mob_counts_close, mob_counts_wide)
|
|
||||||
|
|
||||||
|
|
||||||
if cap_space_close > 0 and cap_space_wide > 0 then
|
|
||||||
--mcl_log("Cap space available")
|
|
||||||
|
|
||||||
-- Spawn caps for animals and water creatures fill up rapidly. Need to throttle this somewhat
|
|
||||||
-- for performance and for early game challenge. We don't want to reduce hostiles though.
|
|
||||||
local spawn_hostile = (mob_spawn_class == "hostile")
|
|
||||||
local spawn_passive = (mob_spawn_class ~= "hostile") and math.random(100) < peaceful_percentage_spawned
|
|
||||||
-- or not hostile
|
|
||||||
--mcl_log("Spawn_passive: " .. tostring(spawn_passive))
|
|
||||||
--mcl_log("Spawn_hostile: " .. tostring(spawn_hostile))
|
|
||||||
|
|
||||||
if (spawn_hostile or spawn_passive) and spawn_check(spawning_position,mob_def) then
|
|
||||||
if mob_def.type_of_spawning == "water" then
|
if mob_def.type_of_spawning == "water" then
|
||||||
spawning_position = get_water_spawn(spawning_position)
|
spawning_position = get_water_spawn(spawning_position)
|
||||||
if not spawning_position then
|
if not spawning_position then
|
||||||
|
@ -943,62 +698,25 @@ if mobs_spawn then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if mob_def_ent.can_spawn and not mob_def_ent.can_spawn(spawning_position) then
|
if minetest.registered_entities[mob_def.name].can_spawn and not minetest.registered_entities[mob_def.name].can_spawn(spawning_position) then
|
||||||
minetest.log("warning","[mcl_mobs] mob "..mob_def.name.." refused to spawn at "..minetest.pos_to_string(vector.round(spawning_position)))
|
minetest.log("warning","[mcl_mobs] mob "..mob_def.name.." refused to spawn at "..minetest.pos_to_string(vector.round(spawning_position)))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
--everything is correct, spawn mob
|
--everything is correct, spawn mob
|
||||||
local spawn_in_group = mob_def_ent.spawn_in_group or 4
|
local object
|
||||||
|
if spawn_in_group and ( mob_type ~= "monster" or math.random(5) == 1 ) then
|
||||||
local spawn_group_hostile = (mob_spawn_class == "hostile") and (math.random(100) < hostile_group_percentage_spawned)
|
|
||||||
local spawn_group_passive = (mob_spawn_class ~= "hostile") and (math.random(100) < peaceful_group_percentage_spawned)
|
|
||||||
|
|
||||||
mcl_log("spawn_group_hostile: " .. tostring(spawn_group_hostile))
|
|
||||||
mcl_log("spawn_group_passive: " .. tostring(spawn_group_passive))
|
|
||||||
|
|
||||||
local spawned
|
|
||||||
if spawn_in_group and (spawn_group_hostile or spawn_group_passive) then
|
|
||||||
local group_min = mob_def_ent.spawn_in_group_min or 1
|
|
||||||
if not group_min then group_min = 1 end
|
|
||||||
|
|
||||||
local amount_to_spawn = math.random(group_min,spawn_in_group)
|
|
||||||
|
|
||||||
if amount_to_spawn > cap_space_wide then
|
|
||||||
mcl_log("Spawning quantity: " .. amount_to_spawn)
|
|
||||||
mcl_log("Throttle amount to cap space: " .. cap_space_wide)
|
|
||||||
amount_to_spawn = cap_space_wide
|
|
||||||
end
|
|
||||||
|
|
||||||
if logging then
|
if logging then
|
||||||
minetest.log("action", "[mcl_mobs] A group of " ..amount_to_spawn .. " " .. mob_def.name .. " mob spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at " .. minetest.pos_to_string(spawning_position, 1))
|
minetest.log("action", "[mcl_mobs] A group of mob " .. mob_def.name .. " spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at " .. minetest.pos_to_string(spawning_position, 1))
|
||||||
end
|
end
|
||||||
spawned = spawn_group(spawning_position,mob_def,{minetest.get_node(vector.offset(spawning_position,0,-1,0)).name}, amount_to_spawn)
|
object = spawn_group(spawning_position,mob_def,{minetest.get_node(vector.offset(spawning_position,0,-1,0)).name},spawn_in_group,spawn_in_group_min)
|
||||||
|
|
||||||
else
|
else
|
||||||
if logging then
|
if logging then
|
||||||
minetest.log("action", "[mcl_mobs] Mob " .. mob_def.name .. " spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at ".. minetest.pos_to_string(spawning_position, 1))
|
minetest.log("action", "[mcl_mobs] Mob " .. mob_def.name .. " spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at ".. minetest.pos_to_string(spawning_position, 1))
|
||||||
end
|
end
|
||||||
spawned = mcl_mobs.spawn(spawning_position, mob_def.name)
|
object = mcl_mobs.spawn(spawning_position, mob_def.name)
|
||||||
end
|
|
||||||
|
|
||||||
if spawned then
|
|
||||||
--mcl_log("We have spawned")
|
|
||||||
mob_counts_close, mob_counts_wide, total_mobs = count_mobs_all("type", pos)
|
|
||||||
local new_spawning_position = find_spawning_position(pos, FIND_SPAWN_POS_RETRIES_SUCCESS_RESPIN)
|
|
||||||
if new_spawning_position then
|
|
||||||
mcl_log("Setting new spawning position")
|
|
||||||
spawning_position = new_spawning_position
|
|
||||||
else
|
|
||||||
mcl_log("Cannot set new spawning position")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
|
||||||
mcl_log("Spawn check failed")
|
|
||||||
end
|
|
||||||
else
|
|
||||||
mcl_log("Cap space full")
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
current_summary_chance = current_summary_chance - mob_chance
|
current_summary_chance = current_summary_chance - mob_chance
|
||||||
table_remove(mob_library_worker_table, mob_index)
|
table_remove(mob_library_worker_table, mob_index)
|
||||||
|
@ -1010,24 +728,22 @@ if mobs_spawn then
|
||||||
|
|
||||||
local timer = 0
|
local timer = 0
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
|
|
||||||
timer = timer + dtime
|
timer = timer + dtime
|
||||||
if timer < WAIT_FOR_SPAWN_ATTEMPT then return end
|
if timer < 10 then return end
|
||||||
timer = 0
|
timer = 0
|
||||||
|
|
||||||
local players = get_connected_players()
|
local players = get_connected_players()
|
||||||
local total_mobs = count_mobs_total_cap()
|
local total_mobs = count_mobs_total_cap()
|
||||||
if total_mobs > mob_cap.total or total_mobs > #players * mob_cap.player then
|
if total_mobs > mob_cap.total or total_mobs > #players * mob_cap.player then
|
||||||
minetest.log("action","[mcl_mobs] global mob cap reached. no cycle spawning.")
|
minetest.log("action","[mcl_mobs] global mob cap reached. no cycle spawning.")
|
||||||
return
|
return
|
||||||
end --mob cap per player
|
end --mob cap per player
|
||||||
|
|
||||||
for _, player in pairs(players) do
|
for _, player in pairs(players) do
|
||||||
local pos = player:get_pos()
|
local pos = player:get_pos()
|
||||||
local dimension = mcl_worlds.pos_to_dimension(pos)
|
local dimension = mcl_worlds.pos_to_dimension(pos)
|
||||||
-- ignore void and unloaded area
|
-- ignore void and unloaded area
|
||||||
if dimension ~= "void" and dimension ~= "default" then
|
if dimension ~= "void" and dimension ~= "default" then
|
||||||
spawn_a_mob(pos)
|
local y_min, y_max = decypher_limits(pos.y)
|
||||||
|
spawn_a_mob(pos, dimension, y_min, y_max)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
@ -1059,16 +775,27 @@ function mob_class:check_despawn(pos, dtime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
minetest.register_chatcommand("mobstats",{
|
minetest.register_chatcommand("mobstats",{
|
||||||
privs = { debug = true },
|
privs = { debug = true },
|
||||||
func = function(n,param)
|
func = function(n,param)
|
||||||
--minetest.chat_send_player(n,dump(dbg_spawn_counts))
|
minetest.chat_send_player(n,dump(dbg_spawn_counts))
|
||||||
local pos = minetest.get_player_by_name(n):get_pos()
|
local pos = minetest.get_player_by_name(n):get_pos()
|
||||||
minetest.chat_send_player(n,"mobs: within 32 radius of player/total loaded :"..count_mobs(pos,MOB_CAP_INNER_RADIUS) .. "/" .. count_mobs_total())
|
minetest.chat_send_player(n,"mobs within 32 radius of player:"..count_mobs(pos,32))
|
||||||
minetest.chat_send_player(n,"spawning attempts since server start:" .. dbg_spawn_succ .. "/" .. dbg_spawn_attempts)
|
minetest.chat_send_player(n,"total mobs:"..count_mobs_total())
|
||||||
|
minetest.chat_send_player(n,"spawning attempts since server start:"..dbg_spawn_attempts)
|
||||||
|
minetest.chat_send_player(n,"successful spawns since server start:"..dbg_spawn_succ)
|
||||||
|
|
||||||
|
|
||||||
|
local mob_counts, total_mobs = count_mobs_all()
|
||||||
|
if (total_mobs) then
|
||||||
|
minetest.log("action", "Total mobs found: " .. total_mobs)
|
||||||
|
end
|
||||||
|
if mob_counts then
|
||||||
|
for k, v1 in pairs(mob_counts) do
|
||||||
|
minetest.log("action", "k: " .. tostring(k))
|
||||||
|
minetest.log("action", "v1: " .. tostring(v1))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local mob_counts_close, mob_counts_wide, total_mobs = count_mobs_all("name") -- Can use "type"
|
|
||||||
output_mob_stats(mob_counts_wide, total_mobs, true)
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
|
@ -207,6 +207,5 @@ mcl_mobs.register_arrow("mobs_mc:blaze_fireball", {
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:blaze", "overworld", 0, 11)
|
-- spawn eggs
|
||||||
-- spawn eggs.
|
|
||||||
mcl_mobs.register_egg("mobs_mc:blaze", S("Blaze"), "#f6b201", "#fff87e", 0)
|
mcl_mobs.register_egg("mobs_mc:blaze", S("Blaze"), "#f6b201", "#fff87e", 0)
|
||||||
|
|
|
@ -40,14 +40,14 @@ local cod = {
|
||||||
xp_max = 3,
|
xp_max = 3,
|
||||||
armor = 100,
|
armor = 100,
|
||||||
rotate = 180,
|
rotate = 180,
|
||||||
spawn_in_group_min = 2, -- was 3
|
spawn_in_group_min = 3,
|
||||||
spawn_in_group = 4, -- was 8 nerfed until we can cap them properly locally. this is a group size, not a per spawn attempt
|
spawn_in_group = 8,
|
||||||
tilt_swim = true,
|
tilt_swim = true,
|
||||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 0.79, 0.3},
|
collisionbox = {-0.3, 0.0, -0.3, 0.3, 0.79, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "extra_mobs_cod.b3d",
|
mesh = "extra_mobs_cod.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_mc_cod.png"}
|
{"extra_mobs_cod.png"}
|
||||||
},
|
},
|
||||||
sounds = {
|
sounds = {
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,7 +14,7 @@ local cow_def = {
|
||||||
xp_max = 3,
|
xp_max = 3,
|
||||||
collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.39, 0.45},
|
collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.39, 0.45},
|
||||||
spawn_in_group = 4,
|
spawn_in_group = 4,
|
||||||
spawn_in_group_min = 2,
|
spawn_in_group_min = 3,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_cow.b3d",
|
mesh = "mobs_mc_cow.b3d",
|
||||||
textures = { {
|
textures = { {
|
||||||
|
@ -93,8 +93,8 @@ mcl_mobs.register_mob("mobs_mc:cow", cow_def)
|
||||||
-- Mooshroom
|
-- Mooshroom
|
||||||
local mooshroom_def = table.copy(cow_def)
|
local mooshroom_def = table.copy(cow_def)
|
||||||
mooshroom_def.description = S("Mooshroom")
|
mooshroom_def.description = S("Mooshroom")
|
||||||
mooshroom_def.spawn_in_group_min = 2
|
mooshroom_def.spawn_in_group_min = 4
|
||||||
mooshroom_def.spawn_in_group = 4
|
mooshroom_def.spawn_in_group = 8
|
||||||
mooshroom_def.textures = { {"mobs_mc_mooshroom.png", "mobs_mc_mushroom_red.png"}, {"mobs_mc_mooshroom_brown.png", "mobs_mc_mushroom_brown.png" } }
|
mooshroom_def.textures = { {"mobs_mc_mooshroom.png", "mobs_mc_mushroom_red.png"}, {"mobs_mc_mooshroom_brown.png", "mobs_mc_mushroom_brown.png" } }
|
||||||
mooshroom_def.on_rightclick = function(self, clicker)
|
mooshroom_def.on_rightclick = function(self, clicker)
|
||||||
if self:feed_tame(clicker, 1, true, false) then return end
|
if self:feed_tame(clicker, 1, true, false) then return end
|
||||||
|
|
|
@ -42,8 +42,8 @@ local dolphin = {
|
||||||
walk_chance = 100,
|
walk_chance = 100,
|
||||||
breath_max = 120,
|
breath_max = 120,
|
||||||
rotate = 180,
|
rotate = 180,
|
||||||
spawn_in_group_min = 2, -- was 3
|
spawn_in_group_min = 3,
|
||||||
spawn_in_group = 4, -- was 4. nerfed until water has own cap, and it represents max pack size rather than per spawn attempt
|
spawn_in_group = 5,
|
||||||
tilt_swim = true,
|
tilt_swim = true,
|
||||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 0.79, 0.3},
|
collisionbox = {-0.3, 0.0, -0.3, 0.3, 0.79, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
|
|
|
@ -174,4 +174,3 @@ mcl_mobs.register_egg("mobs_mc:enderdragon", S("Ender Dragon"), "#252525", "#b31
|
||||||
|
|
||||||
|
|
||||||
mcl_wip.register_wip_item("mobs_mc:enderdragon")
|
mcl_wip.register_wip_item("mobs_mc:enderdragon")
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:enderdragon","overworld",0,minetest.LIGHT_MAX+1)
|
|
||||||
|
|
|
@ -39,4 +39,3 @@ mcl_mobs.register_mob("mobs_mc:endermite", {
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_mobs.register_egg("mobs_mc:endermite", S("Endermite"), "#161616", "#6d6d6d", 0)
|
mcl_mobs.register_egg("mobs_mc:endermite", S("Endermite"), "#161616", "#6d6d6d", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:endermite","overworld",0,7)
|
|
||||||
|
|
|
@ -139,6 +139,6 @@ mcl_mobs.register_arrow("mobs_mc:fireball", {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:ghast","overworld","0","7")
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:ghast", S("Ghast"), "#f9f9f9", "#bcbcbc", 0)
|
mcl_mobs.register_egg("mobs_mc:ghast", S("Ghast"), "#f9f9f9", "#bcbcbc", 0)
|
||||||
|
|
|
@ -25,7 +25,7 @@ local base_psdef = {
|
||||||
local psdefs = {}
|
local psdefs = {}
|
||||||
for i=1,4 do
|
for i=1,4 do
|
||||||
local p = table.copy(base_psdef)
|
local p = table.copy(base_psdef)
|
||||||
p.texture = "mobs_mc_glow_squid_glint"..i..".png"
|
p.texture = "extra_mobs_glow_squid_glint"..i..".png"
|
||||||
table.insert(psdefs,p)
|
table.insert(psdefs,p)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ mcl_mobs.register_mob("mobs_mc:glow_squid", {
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "extra_mobs_glow_squid.b3d",
|
mesh = "extra_mobs_glow_squid.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
{ "mobs_mc_glow_squid.png" }
|
{ "extra_mobs_glow_squid.png" }
|
||||||
},
|
},
|
||||||
sounds = {
|
sounds = {
|
||||||
damage = { name = "mobs_mc_squid_hurt", gain = 0.3 },
|
damage = { name = "mobs_mc_squid_hurt", gain = 0.3 },
|
||||||
|
|
|
@ -131,7 +131,5 @@ minetest.LIGHT_MAX+1,
|
||||||
mcl_vars.mg_nether_min,
|
mcl_vars.mg_nether_min,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
|
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:hoglin","overworld",0,7)
|
|
||||||
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:hoglin", S("Hoglin"), "#85682e", "#2b2140", 0)
|
mcl_mobs.register_egg("mobs_mc:hoglin", S("Hoglin"), "#85682e", "#2b2140", 0)
|
||||||
|
|
|
@ -125,7 +125,7 @@ local horse = {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "passive",
|
spawn_class = "passive",
|
||||||
spawn_in_group_min = 2,
|
spawn_in_group_min = 2,
|
||||||
spawn_in_group = 4, -- was 6. nerfed until group size is a cap rather than per spawn cycle
|
spawn_in_group = 6,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_horse.b3d",
|
mesh = "mobs_mc_horse.b3d",
|
||||||
visual_size = {x=3.0, y=3.0},
|
visual_size = {x=3.0, y=3.0},
|
||||||
|
|
|
@ -206,4 +206,3 @@ function mobs_mc.check_iron_golem_summon(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:iron_golem","overworld",0,minetest.LIGHT_MAX+1)
|
|
||||||
|
|
|
@ -56,8 +56,8 @@ mcl_mobs.register_mob("mobs_mc:llama", {
|
||||||
shoot_interval = 5.5,
|
shoot_interval = 5.5,
|
||||||
arrow = "mobs_mc:llamaspit",
|
arrow = "mobs_mc:llamaspit",
|
||||||
shoot_offset = 1, --3.5 *would* be a good value visually but it somehow messes with the projectiles trajectory
|
shoot_offset = 1, --3.5 *would* be a good value visually but it somehow messes with the projectiles trajectory
|
||||||
spawn_in_group_min = 2, -- was 4
|
spawn_in_group_min = 4,
|
||||||
spawn_in_group = 4, -- was 6 nerfed until we can cap them properly locally. this is a group size, not a per spawn attempt
|
spawn_in_group = 6,
|
||||||
|
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = 11,
|
bone_eye_height = 11,
|
||||||
|
|
|
@ -283,7 +283,6 @@ piglin_brute.group_attack = { "mobs_mc:piglin", "mobs_mc:piglin_brute" }
|
||||||
mcl_mobs.register_mob("mobs_mc:piglin_brute", piglin_brute)
|
mcl_mobs.register_mob("mobs_mc:piglin_brute", piglin_brute)
|
||||||
|
|
||||||
|
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:piglin","overworld",0,7)
|
|
||||||
-- Regular spawning in the Nether
|
-- Regular spawning in the Nether
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:piglin",
|
"mobs_mc:piglin",
|
||||||
|
@ -300,7 +299,7 @@ minetest.LIGHT_MAX+1,
|
||||||
3,
|
3,
|
||||||
mcl_vars.mg_lava_nether_max,
|
mcl_vars.mg_lava_nether_max,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:sword_piglin","overworld",0,7)
|
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:sword_piglin",
|
"mobs_mc:sword_piglin",
|
||||||
"nether",
|
"nether",
|
||||||
|
|
|
@ -122,4 +122,3 @@ pillager = {
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:pillager", pillager)
|
mcl_mobs.register_mob("mobs_mc:pillager", pillager)
|
||||||
mcl_mobs.register_egg("mobs_mc:pillager", S("Pillager"), "#532f36", "#959b9b", 0)
|
mcl_mobs.register_egg("mobs_mc:pillager", S("Pillager"), "#532f36", "#959b9b", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:pillager","overworld",0,7)
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ local salmon = {
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "extra_mobs_salmon.b3d",
|
mesh = "extra_mobs_salmon.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_mc_salmon.png"}
|
{"extra_mobs_salmon.png"}
|
||||||
},
|
},
|
||||||
sounds = {
|
sounds = {
|
||||||
},
|
},
|
||||||
|
|
|
@ -178,7 +178,7 @@ mcl_mobs.register_arrow("mobs_mc:shulkerbullet", {
|
||||||
|
|
||||||
|
|
||||||
mcl_mobs.register_egg("mobs_mc:shulker", S("Shulker"), "#946694", "#4d3852", 0)
|
mcl_mobs.register_egg("mobs_mc:shulker", S("Shulker"), "#946694", "#4d3852", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:shulker","overworld",0,minetest.LIGHT_MAX+1)
|
|
||||||
--[[
|
--[[
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:shulker",
|
"mobs_mc:shulker",
|
||||||
|
|
|
@ -56,4 +56,3 @@ mcl_mobs.register_mob("mobs_mc:silverfish", {
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_mobs.register_egg("mobs_mc:silverfish", S("Silverfish"), "#6d6d6d", "#313131", 0)
|
mcl_mobs.register_egg("mobs_mc:silverfish", S("Silverfish"), "#6d6d6d", "#313131", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:silverfish","overworld",0,11)
|
|
||||||
|
|
|
@ -118,4 +118,3 @@ mcl_vars.mg_nether_max)
|
||||||
--]]
|
--]]
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:witherskeleton", S("Wither Skeleton"), "#141414", "#474d4d", 0)
|
mcl_mobs.register_egg("mobs_mc:witherskeleton", S("Wither Skeleton"), "#141414", "#474d4d", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:witherskeleton","overworld",0,7)
|
|
||||||
|
|
|
@ -278,6 +278,7 @@ swamp_light_max,
|
||||||
4,
|
4,
|
||||||
swamp_min,
|
swamp_min,
|
||||||
swamp_max)
|
swamp_max)
|
||||||
|
|
||||||
-- Magma cube
|
-- Magma cube
|
||||||
local magma_cube_big = {
|
local magma_cube_big = {
|
||||||
description = S("Magma Cube"),
|
description = S("Magma Cube"),
|
||||||
|
@ -430,11 +431,6 @@ nether_max)
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:magma_cube_big", S("Magma Cube"), "#350000", "#fcfc00")
|
mcl_mobs.register_egg("mobs_mc:magma_cube_big", S("Magma Cube"), "#350000", "#fcfc00")
|
||||||
|
|
||||||
-- non_spawn_specific is typically for mobs who don't spawn in the overworld, or mobs that don't spawn
|
|
||||||
-- naturally. However, slimes are a particular case where they spawn under different conditions in the same
|
|
||||||
-- dimension.
|
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:slime_big","overworld",0,minetest.LIGHT_MAX+1)
|
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:magma_cube_big","overworld",0, minetest.LIGHT_MAX+1)
|
|
||||||
mcl_mobs.register_egg("mobs_mc:slime_big", S("Slime"), "#52a03e", "#7ebf6d")
|
mcl_mobs.register_egg("mobs_mc:slime_big", S("Slime"), "#52a03e", "#7ebf6d")
|
||||||
|
|
||||||
-- FIXME: add spawn eggs for small and tiny slimes and magma cubes
|
-- FIXME: add spawn eggs for small and tiny slimes and magma cubes
|
||||||
|
|
|
@ -197,4 +197,3 @@ end
|
||||||
|
|
||||||
-- Spawn egg
|
-- Spawn egg
|
||||||
mcl_mobs.register_egg("mobs_mc:snowman", S("Snow Golem"), "#f2f2f2", "#fd8f47", 0)
|
mcl_mobs.register_egg("mobs_mc:snowman", S("Snow Golem"), "#f2f2f2", "#fd8f47", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:snowman","overworld",0,minetest.LIGHT_MAX+1)
|
|
||||||
|
|
|
@ -246,4 +246,3 @@ mcl_mobs:spawn_setup({
|
||||||
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:strider", S("Strider"), "#000000", "#FF0000", 0)
|
mcl_mobs.register_egg("mobs_mc:strider", S("Strider"), "#000000", "#FF0000", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:strider","nether",0,minetest.LIGHT_MAX+1)
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ local tropical_fish = {
|
||||||
xp_min = 1,
|
xp_min = 1,
|
||||||
xp_max = 3,
|
xp_max = 3,
|
||||||
armor = 100,
|
armor = 100,
|
||||||
spawn_in_group = 4, -- was 9. nerfed until aquatics use own cap rather than animal, and it represents pack size, not per spawn attempt
|
spawn_in_group = 9,
|
||||||
tilt_swim = true,
|
tilt_swim = true,
|
||||||
collisionbox = {-0.2, 0.0, -0.2, 0.2, 0.1, 0.2},
|
collisionbox = {-0.2, 0.0, -0.2, 0.2, 0.1, 0.2},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
|
|
|
@ -95,4 +95,3 @@ mcl_mobs.register_mob("mobs_mc:vex", {
|
||||||
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:vex", S("Vex"), "#7a90a4", "#e8edf1", 0)
|
mcl_mobs.register_egg("mobs_mc:vex", S("Vex"), "#7a90a4", "#e8edf1", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:vex","overworld",0,7)
|
|
||||||
|
|
|
@ -617,13 +617,6 @@ local function set_textures(self)
|
||||||
self.object:set_properties({textures=badge_textures})
|
self.object:set_properties({textures=badge_textures})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODO Pass in self and if nitwit, go to bed later.
|
|
||||||
local function is_night()
|
|
||||||
local tod = minetest.get_timeofday()
|
|
||||||
tod = ( tod * 24000 ) % 24000
|
|
||||||
return tod > 17500 or tod < 6500
|
|
||||||
end
|
|
||||||
|
|
||||||
function get_activity(tod)
|
function get_activity(tod)
|
||||||
-- night hours = tod > 18541 or tod < 5458
|
-- night hours = tod > 18541 or tod < 5458
|
||||||
if not tod then
|
if not tod then
|
||||||
|
@ -633,8 +626,8 @@ function get_activity(tod)
|
||||||
|
|
||||||
local lunch_start = 11000
|
local lunch_start = 11000
|
||||||
local lunch_end = 13500
|
local lunch_end = 13500
|
||||||
local work_start = 7500
|
local work_start = 7000
|
||||||
local work_end = 16000
|
local work_end = 16500
|
||||||
|
|
||||||
local activity = nil
|
local activity = nil
|
||||||
if weather_mod and mcl_weather.get_weather() == "thunder" then
|
if weather_mod and mcl_weather.get_weather() == "thunder" then
|
||||||
|
@ -642,7 +635,7 @@ function get_activity(tod)
|
||||||
activity = SLEEP
|
activity = SLEEP
|
||||||
elseif (tod > work_start and tod < lunch_start) or (tod > lunch_end and tod < work_end) then
|
elseif (tod > work_start and tod < lunch_start) or (tod > lunch_end and tod < work_end) then
|
||||||
activity = WORK
|
activity = WORK
|
||||||
elseif is_night() then
|
elseif mcl_beds.is_night() then
|
||||||
activity = SLEEP
|
activity = SLEEP
|
||||||
elseif tod > lunch_start and tod < lunch_end then
|
elseif tod > lunch_start and tod < lunch_end then
|
||||||
activity = GATHERING
|
activity = GATHERING
|
||||||
|
@ -836,7 +829,7 @@ local function go_home(entity, sleep)
|
||||||
else
|
else
|
||||||
--minetest.log("Need to walk to home")
|
--minetest.log("Need to walk to home")
|
||||||
end
|
end
|
||||||
end, true)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1173,7 +1166,6 @@ local function do_work (self)
|
||||||
self.order = nil
|
self.order = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self:gopath(jobsite, function(self, jobsite)
|
self:gopath(jobsite, function(self, jobsite)
|
||||||
if not self then
|
if not self then
|
||||||
--mcl_log("missing self. not good")
|
--mcl_log("missing self. not good")
|
||||||
|
@ -1317,7 +1309,7 @@ local function do_activity (self)
|
||||||
|
|
||||||
local jobsite_valid = false
|
local jobsite_valid = false
|
||||||
|
|
||||||
if not is_night() then
|
if not mcl_beds.is_night() then
|
||||||
if self.order == SLEEP then self.order = nil end
|
if self.order == SLEEP then self.order = nil end
|
||||||
|
|
||||||
if not validate_jobsite(self) then
|
if not validate_jobsite(self) then
|
||||||
|
@ -2199,5 +2191,4 @@ mobs_mc.water_level+1,
|
||||||
mcl_vars.mg_overworld_max)
|
mcl_vars.mg_overworld_max)
|
||||||
--]]
|
--]]
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:villager","overworld", 0, minetest.LIGHT_MAX+1)
|
|
||||||
mcl_mobs.register_egg("mobs_mc:villager", S("Villager"), "#563d33", "#bc8b72", 0)
|
mcl_mobs.register_egg("mobs_mc:villager", S("Villager"), "#563d33", "#bc8b72", 0)
|
||||||
|
|
|
@ -90,4 +90,3 @@ mcl_mobs.register_mob("mobs_mc:evoker", {
|
||||||
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:evoker", S("Evoker"), "#959b9b", "#1e1c1a", 0)
|
mcl_mobs.register_egg("mobs_mc:evoker", S("Evoker"), "#959b9b", "#1e1c1a", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:evoker","overworld",0,7)
|
|
||||||
|
|
|
@ -66,4 +66,3 @@ mcl_mobs.register_mob("mobs_mc:illusioner", {
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_mobs.register_egg("mobs_mc:illusioner", S("Illusioner"), "#3f5cbb", "#8a8686", 0)
|
mcl_mobs.register_egg("mobs_mc:illusioner", S("Illusioner"), "#3f5cbb", "#8a8686", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:illusioner","overworld",0,7)
|
|
||||||
|
|
|
@ -78,4 +78,3 @@ mcl_mobs.register_mob("mobs_mc:vindicator", {
|
||||||
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:vindicator", S("Vindicator"), "#959b9b", "#275e61", 0)
|
mcl_mobs.register_egg("mobs_mc:vindicator", S("Vindicator"), "#959b9b", "#275e61", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:vindicator","overworld",0,7)
|
|
||||||
|
|
|
@ -106,5 +106,5 @@ mcl_mobs.register_arrow("mobs_mc:potion_arrow", {
|
||||||
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:witch", S("Witch"), "#340000", "#51a03e", 0, true)
|
mcl_mobs.register_egg("mobs_mc:witch", S("Witch"), "#340000", "#51a03e", 0, true)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:witch","overworld",0,7)
|
|
||||||
mcl_wip.register_wip_item("mobs_mc:witch")
|
mcl_wip.register_wip_item("mobs_mc:witch")
|
||||||
|
|
|
@ -132,4 +132,3 @@ mcl_mobs.register_arrow("mobs_mc:wither_skull", {
|
||||||
mcl_mobs.register_egg("mobs_mc:wither", S("Wither"), "#4f4f4f", "#4f4f4f", 0, true)
|
mcl_mobs.register_egg("mobs_mc:wither", S("Wither"), "#4f4f4f", "#4f4f4f", 0, true)
|
||||||
|
|
||||||
mcl_wip.register_wip_item("mobs_mc:wither")
|
mcl_wip.register_wip_item("mobs_mc:wither")
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:wither","overworld",0,minetest.LIGHT_MAX+1)
|
|
||||||
|
|
|
@ -153,4 +153,3 @@ mcl_vars.mg_nether_max)
|
||||||
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:pigman", S("Zombie Pigman"), "#ea9393", "#4c7129", 0)
|
mcl_mobs.register_egg("mobs_mc:pigman", S("Zombie Pigman"), "#ea9393", "#4c7129", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:pigman","overworld",0,minetest.LIGHT_MAX+1)
|
|
||||||
|
|
|
@ -226,7 +226,7 @@ if mcl_weather.allow_abm then
|
||||||
}
|
}
|
||||||
for a=1, #around do
|
for a=1, #around do
|
||||||
local apos = vector.add(pos, around[a])
|
local apos = vector.add(pos, around[a])
|
||||||
if mcl_weather.is_outdoor(apos) and mcl_weather.has_rain(apos) then
|
if mcl_weather.is_outdoor(apos) then
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
minetest.sound_play("fire_extinguish_flame", {pos = pos, max_hear_distance = 8, gain = 0.1}, true)
|
minetest.sound_play("fire_extinguish_flame", {pos = pos, max_hear_distance = 8, gain = 0.1}, true)
|
||||||
return
|
return
|
||||||
|
@ -244,7 +244,7 @@ if mcl_weather.allow_abm then
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
-- Rain is equivalent to a water bottle
|
-- Rain is equivalent to a water bottle
|
||||||
if mcl_weather.rain.raining and mcl_weather.is_outdoor(pos) and mcl_weather.has_rain(pos) then
|
if mcl_weather.rain.raining and mcl_weather.is_outdoor(pos) then
|
||||||
if node.name == "mcl_cauldrons:cauldron" then
|
if node.name == "mcl_cauldrons:cauldron" then
|
||||||
minetest.set_node(pos, {name="mcl_cauldrons:cauldron_1"})
|
minetest.set_node(pos, {name="mcl_cauldrons:cauldron_1"})
|
||||||
elseif node.name == "mcl_cauldrons:cauldron_1" then
|
elseif node.name == "mcl_cauldrons:cauldron_1" then
|
||||||
|
@ -267,7 +267,7 @@ if mcl_weather.allow_abm then
|
||||||
interval = 22.0,
|
interval = 22.0,
|
||||||
chance = 3,
|
chance = 3,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
if mcl_weather.rain.raining and mcl_weather.is_outdoor(pos) and mcl_weather.has_rain(pos) then
|
if mcl_weather.rain.raining and mcl_weather.is_outdoor(pos) then
|
||||||
if node.name == "mcl_farming:soil" then
|
if node.name == "mcl_farming:soil" then
|
||||||
minetest.set_node(pos, {name="mcl_farming:soil_wet"})
|
minetest.set_node(pos, {name="mcl_farming:soil_wet"})
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
local mods_loaded = false
|
local mods_loaded = false
|
||||||
local NIGHT_VISION_RATIO = 0.45
|
local NIGHT_VISION_RATIO = 0.45
|
||||||
|
|
||||||
local water_color = "#3F76E4"
|
local water_color = "#0b4880"
|
||||||
|
|
||||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||||
|
|
||||||
|
@ -125,14 +125,7 @@ mcl_weather.skycolor = {
|
||||||
local pos = player:get_pos()
|
local pos = player:get_pos()
|
||||||
local dim = mcl_worlds.pos_to_dimension(pos)
|
local dim = mcl_worlds.pos_to_dimension(pos)
|
||||||
local has_weather = (mcl_worlds.has_weather(pos) and (mcl_weather.state == "snow" or mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_snow(pos)) or ((mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_rain(pos))
|
local has_weather = (mcl_worlds.has_weather(pos) and (mcl_weather.state == "snow" or mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_snow(pos)) or ((mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_rain(pos))
|
||||||
local checkname = minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name
|
if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then
|
||||||
if minetest.get_item_group(checkname, "water") ~= 0 then
|
|
||||||
local biome_index = minetest.get_biome_data(player:get_pos()).biome
|
|
||||||
local biome_name = minetest.get_biome_name(biome_index)
|
|
||||||
local biome = minetest.registered_biomes[biome_name]
|
|
||||||
if biome then water_color = biome._mcl_waterfogcolor end
|
|
||||||
if not biome then water_color = "#3F76E4" end
|
|
||||||
if checkname == "mclx_core:river_water_source" or checkname == "mclx_core:river_water_flowing" then water_color = "#0084FF" end
|
|
||||||
player:set_sky({ type = "regular",
|
player:set_sky({ type = "regular",
|
||||||
sky_color = {
|
sky_color = {
|
||||||
day_sky = water_color,
|
day_sky = water_color,
|
||||||
|
|
|
@ -297,7 +297,7 @@ awards.register_achievement("mcl:whatAdeal", {
|
||||||
awards.register_achievement("mcl:tacticalFishing", {
|
awards.register_achievement("mcl:tacticalFishing", {
|
||||||
title = S("Tactical Fishing"),
|
title = S("Tactical Fishing"),
|
||||||
description = S("Catch a fish... without a fishing rod!"),
|
description = S("Catch a fish... without a fishing rod!"),
|
||||||
icon = "mcl_buckets_pufferfish_bucket.png",
|
icon = "pufferfish_bucket.png",
|
||||||
type = "Advancement",
|
type = "Advancement",
|
||||||
group = "Husbandry",
|
group = "Husbandry",
|
||||||
})
|
})
|
||||||
|
@ -305,7 +305,7 @@ awards.register_achievement("mcl:tacticalFishing", {
|
||||||
awards.register_achievement("mcl:cutestPredator", {
|
awards.register_achievement("mcl:cutestPredator", {
|
||||||
title = S("The Cutest Predator"),
|
title = S("The Cutest Predator"),
|
||||||
description = S("Catch an Axolotl with a bucket!"),
|
description = S("Catch an Axolotl with a bucket!"),
|
||||||
icon = "mcl_buckets_axolotl_bucket.png",
|
icon = "axolotl_bucket.png",
|
||||||
type = "Advancement",
|
type = "Advancement",
|
||||||
group = "Husbandry",
|
group = "Husbandry",
|
||||||
})
|
})
|
||||||
|
|
|
@ -225,8 +225,8 @@ local woods = {
|
||||||
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Button") },
|
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Button") },
|
||||||
|
|
||||||
{ "mangrove_wood", "mcl_mangrove:mangrove_wood", "mcl_mangrove_planks.png", S("Mangrove Button") },
|
{ "mangrove_wood", "mcl_mangrove:mangrove_wood", "mcl_mangrove_planks.png", S("Mangrove Button") },
|
||||||
{ "crimson_hyphae_wood", "mcl_crimson:crimson_hyphae_wood", "mcl_crimson_crimson_hyphae_wood.png", S("Crimson Button") },
|
{ "crimson_hyphae_wood", "mcl_crimson:crimson_hyphae_wood", "crimson_hyphae_wood.png", S("Crimson Button") },
|
||||||
{ "warped_hyphae_wood", "mcl_crimson:warped_hyphae_wood", "mcl_crimson_warped_hyphae_wood.png", S("Warped Button") },
|
{ "warped_hyphae_wood", "mcl_crimson:warped_hyphae_wood", "warped_hyphae_wood.png", S("Warped Button") },
|
||||||
}
|
}
|
||||||
|
|
||||||
for w=1, #woods do
|
for w=1, #woods do
|
||||||
|
|
|
@ -223,8 +223,8 @@ local woods = {
|
||||||
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Pressure Plate") },
|
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Pressure Plate") },
|
||||||
|
|
||||||
{ "mangrove_wood", "mcl_mangrove:mangrove_wood", "mcl_mangrove_planks.png", S("Mangrove Pressure Plate") },
|
{ "mangrove_wood", "mcl_mangrove:mangrove_wood", "mcl_mangrove_planks.png", S("Mangrove Pressure Plate") },
|
||||||
{ "crimson_hyphae_wood", "mcl_crimson:crimson_hyphae_wood", "mcl_crimson_crimson_hyphae_wood.png", S("Crimson Pressure Plate") },
|
{ "crimson_hyphae_wood", "mcl_crimson:crimson_hyphae_wood", "crimson_hyphae_wood.png", S("Crimson Pressure Plate") },
|
||||||
{ "warped_hyphae_wood", "mcl_crimson:warped_hyphae_wood", "mcl_crimson_warped_hyphae_wood.png", S("Warped Pressure Plate") },
|
{ "warped_hyphae_wood", "mcl_crimson:warped_hyphae_wood", "warped_hyphae_wood.png", S("Warped Pressure Plate") },
|
||||||
}
|
}
|
||||||
|
|
||||||
for w=1, #woods do
|
for w=1, #woods do
|
||||||
|
|
|
@ -51,8 +51,8 @@ minetest.register_node("mcl_armor_stand:armor_stand", {
|
||||||
_doc_items_usagehelp = S("Just place an armor item on the armor stand. To take the top piece of armor from the armor stand, select your hand and use the place key on the armor stand."),
|
_doc_items_usagehelp = S("Just place an armor item on the armor stand. To take the top piece of armor from the armor stand, select your hand and use the place key on the armor stand."),
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
mesh = "3d_armor_stand.obj",
|
mesh = "3d_armor_stand.obj",
|
||||||
inventory_image = "mcl_armor_stand_item.png",
|
inventory_image = "3d_armor_stand_item.png",
|
||||||
wield_image = "mcl_armor_stand_item.png",
|
wield_image = "3d_armor_stand_item.png",
|
||||||
tiles = {"default_wood.png", "mcl_stairs_stone_slab_top.png"},
|
tiles = {"default_wood.png", "mcl_stairs_stone_slab_top.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
|
|
@ -56,7 +56,7 @@ for techname, fishname in pairs(fish_names) do
|
||||||
_doc_items_longdesc = S("This bucket is filled with water and @1.", S(fishname)),
|
_doc_items_longdesc = S("This bucket is filled with water and @1.", S(fishname)),
|
||||||
_doc_items_usagehelp = S("Place it to empty the bucket and place a @1. Obtain by right clicking on a @2 with a bucket of water.", S(fishname), S(fishname)),
|
_doc_items_usagehelp = S("Place it to empty the bucket and place a @1. Obtain by right clicking on a @2 with a bucket of water.", S(fishname), S(fishname)),
|
||||||
_tt_help = S("Places a water source and a @1.", S(fishname)),
|
_tt_help = S("Places a water source and a @1.", S(fishname)),
|
||||||
inventory_image = "mcl_buckets_" .. techname .. "_bucket.png",
|
inventory_image = techname .. "_bucket.png",
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
groups = {bucket = 1, fish_bucket = 1},
|
groups = {bucket = 1, fish_bucket = 1},
|
||||||
liquids_pointable = false,
|
liquids_pointable = false,
|
||||||
|
|
|
@ -61,8 +61,9 @@ local function sound_take(itemname, pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function place_liquid(pos, itemstring)
|
local function place_liquid(pos, itemstring)
|
||||||
|
local fullness = registered_nodes[itemstring].liquid_range
|
||||||
sound_place(itemstring, pos)
|
sound_place(itemstring, pos)
|
||||||
set_node(pos, {name=itemstring})
|
add_node(pos, {name=itemstring, param2=fullness})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function give_bucket(new_bucket, itemstack, user)
|
local function give_bucket(new_bucket, itemstack, user)
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
MineClone 2 Campfire API
|
|
||||||
========================
|
|
||||||
`mcl_campfires.register_campfire`
|
|
||||||
---------------------------------
|
|
||||||
Used to register campfires.
|
|
||||||
|
|
||||||
**Example Usage**
|
|
||||||
```
|
|
||||||
mcl_campfires.register_campfire("mcl_campfires:campfire", {
|
|
||||||
description = S("Campfire"),
|
|
||||||
inv_texture = "mcl_campfires_campfire_inv.png",
|
|
||||||
fire_texture = "mcl_campfires_campfire_fire.png",
|
|
||||||
lit_logs_texture = "mcl_campfires_campfire_log_lit.png",
|
|
||||||
drops = "mcl_core:charcoal_lump 2",
|
|
||||||
lightlevel = 14,
|
|
||||||
damage = 1,
|
|
||||||
})
|
|
||||||
```
|
|
||||||
**Values**
|
|
||||||
* description - human readable node name.
|
|
||||||
* inv_texture - campfire inventory texture.
|
|
||||||
* fire_texture - texture of the campfire fire.
|
|
||||||
* lit_logs_texture - texture for the logs of the lit campfire. if not changed, specify mcl_campfires_log.png.
|
|
||||||
* drops - what items drop when the campfire is mined.
|
|
||||||
* lightlevel - the level of light the campfire emits.
|
|
||||||
* damage - amount of damage the campfire deals when the player stands on it.
|
|
|
@ -1,117 +0,0 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
|
||||||
mcl_campfires = {}
|
|
||||||
|
|
||||||
function mcl_campfires.register_campfire(name, def)
|
|
||||||
-- Define Campfire
|
|
||||||
minetest.register_node(name, {
|
|
||||||
description = def.description,
|
|
||||||
_tt_help = S("Cooks food and keeps bees happy."),
|
|
||||||
_doc_items_longdesc = S("Campfires have multiple uses, including keeping bees happy, cooking raw meat and fish, and as a trap."),
|
|
||||||
inventory_image = def.inv_texture,
|
|
||||||
wield_image = def.inv_texture,
|
|
||||||
drawtype = "mesh",
|
|
||||||
mesh = "mcl_campfires_campfire.obj",
|
|
||||||
tiles = {{name="mcl_campfires_log.png"},},
|
|
||||||
use_texture_alpha = "clip",
|
|
||||||
groups = { handy=1, axey=1, material_wood=1, not_in_creative_inventory=1, campfire=1, },
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
on_rightclick = function (pos, node, player, itemstack, pointed_thing)
|
|
||||||
if player:get_wielded_item():get_name() == "mcl_fire:flint_and_steel" then
|
|
||||||
node.name = name.."_lit"
|
|
||||||
minetest.set_node(pos, node)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
drop = def.drops,
|
|
||||||
_mcl_silk_touch_drop = {name},
|
|
||||||
mcl_sounds.node_sound_wood_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = 'fixed',
|
|
||||||
fixed = {-.5, -.5, -.5, .5, -.05, .5}, --left, bottom, front, right, top
|
|
||||||
},
|
|
||||||
collision_box = {
|
|
||||||
type = 'fixed',
|
|
||||||
fixed = {-.5, -.5, -.5, .5, -.05, .5},
|
|
||||||
},
|
|
||||||
_mcl_blast_resistance = 2,
|
|
||||||
_mcl_hardness = 2,
|
|
||||||
})
|
|
||||||
|
|
||||||
--Define Lit Campfire
|
|
||||||
minetest.register_node(name.."_lit", {
|
|
||||||
description = def.description,
|
|
||||||
_tt_help = S("Cooks food and keeps bees happy."),
|
|
||||||
_doc_items_longdesc = S("Campfires have multiple uses, including keeping bees happy, cooking raw meat and fish, and as a trap."),
|
|
||||||
inventory_image = def.inv_texture,
|
|
||||||
wield_image = def.inv_texture,
|
|
||||||
drawtype = "mesh",
|
|
||||||
mesh = "mcl_campfires_campfire_lit.obj",
|
|
||||||
tiles = {{
|
|
||||||
name=def.fire_texture,
|
|
||||||
animation={
|
|
||||||
type="vertical_frames",
|
|
||||||
aspect_w=16,
|
|
||||||
aspect_h=16,
|
|
||||||
length=2.0
|
|
||||||
}},
|
|
||||||
{name=def.lit_logs_texture,
|
|
||||||
animation={
|
|
||||||
type="vertical_frames",
|
|
||||||
aspect_w=16,
|
|
||||||
aspect_h=16,
|
|
||||||
length=2.0
|
|
||||||
}}
|
|
||||||
},
|
|
||||||
use_texture_alpha = "clip",
|
|
||||||
groups = { handy=1, axey=1, material_wood=1, campfire=1, lit_campfire=1 },
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
on_rightclick = function (pos, node, player, itemstack, pointed_thing)
|
|
||||||
if player:get_wielded_item():get_name():find("shovel") then
|
|
||||||
node.name = name
|
|
||||||
minetest.set_node(pos, node)
|
|
||||||
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
drop = def.drops,
|
|
||||||
_mcl_silk_touch_drop = {name.."_lit"},
|
|
||||||
light_source = def.lightlevel,
|
|
||||||
mcl_sounds.node_sound_wood_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-.5, -.5, -.5, .5, -.05, .5}, --left, bottom, front, right, top
|
|
||||||
},
|
|
||||||
collision_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-.5, -.5, -.5, .5, -.05, .5},
|
|
||||||
},
|
|
||||||
_mcl_blast_resistance = 2,
|
|
||||||
_mcl_hardness = 2,
|
|
||||||
damage_per_second = def.damage,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
local function burn_in_campfire(obj)
|
|
||||||
local p = obj:get_pos()
|
|
||||||
if p then
|
|
||||||
local n = minetest.find_node_near(p,0.4,{"group:lit_campfire"},true)
|
|
||||||
if n then
|
|
||||||
mcl_burning.set_on_fire(obj, 5)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local etime = 0
|
|
||||||
minetest.register_globalstep(function(dtime)
|
|
||||||
etime = dtime + etime
|
|
||||||
if etime < 0.5 then return end
|
|
||||||
etime = 0
|
|
||||||
for _,pl in pairs(minetest.get_connected_players()) do
|
|
||||||
burn_in_campfire(pl)
|
|
||||||
end
|
|
||||||
for _,ent in pairs(minetest.luaentities) do
|
|
||||||
if ent.is_mob then
|
|
||||||
burn_in_campfire(ent.object)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
|
@ -1,9 +1,147 @@
|
||||||
|
-- ||||||||||||||||||||||||||||||||
|
||||||
|
-- ||||||||||| CAMPFIRES ||||||||||
|
||||||
|
-- ||||||||||||||||||||||||||||||||
|
||||||
|
|
||||||
-- TO-DO:
|
-- TO-DO:
|
||||||
-- * Add Smoke Particles
|
-- * Add Smoke Particles
|
||||||
-- * Add Spark Particles
|
-- * Add Spark Particles
|
||||||
-- * Add Cooking Meat
|
-- * Add Cooking Meat
|
||||||
-- * Add Working Sounds
|
-- * Add Working Sounds
|
||||||
local modname = minetest.get_modpath(minetest.get_current_modname())
|
|
||||||
|
|
||||||
dofile(modname.."/api.lua") -- Load API File
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
dofile(modname.."/register.lua") -- Load Campfire Registration File
|
|
||||||
|
local campfires = {
|
||||||
|
{ name = "Campfire", lightlevel = 14, techname = "campfire", damage = 1, drops = "mcl_core:charcoal_lump 2" },
|
||||||
|
{ name = "Soul Campfire", lightlevel = 10, techname = "soul_campfire", damage = 2, drops = "mcl_blackstone:soul_soil" },
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, campfire in pairs(campfires) do
|
||||||
|
-- Define Campfire
|
||||||
|
minetest.register_node("mcl_campfires:" .. campfire.techname, {
|
||||||
|
description = S(campfire.name),
|
||||||
|
_tt_help = S("Cooks food and keeps bees happy."),
|
||||||
|
_doc_items_longdesc = S("Campfires have multiple uses, including keeping bees happy, cooking raw meat and fish, and as a trap."),
|
||||||
|
inventory_image = "mcl_campfires_" .. campfire.techname .. "_inv.png",
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh = "mcl_campfires_campfire.obj",
|
||||||
|
tiles = {{name="mcl_campfires_log.png"},},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
|
groups = { handy=1, axey=1, material_wood=1, not_in_creative_inventory=1, campfire=1, },
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_rightclick = function (pos, node, player, itemstack, pointed_thing)
|
||||||
|
if player:get_wielded_item():get_name() == "mcl_fire:flint_and_steel" then
|
||||||
|
node.name = "mcl_campfires:" .. campfire.techname .. "_lit"
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
drop = campfire.drops,
|
||||||
|
_mcl_silk_touch_drop = {"mcl_campfires:" .. campfire.techname},
|
||||||
|
mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
selection_box = {
|
||||||
|
type = 'fixed',
|
||||||
|
fixed = {-.5, -.5, -.5, .5, -.05, .5}, --left, bottom, front, right, top
|
||||||
|
},
|
||||||
|
collision_box = {
|
||||||
|
type = 'fixed',
|
||||||
|
fixed = {-.5, -.5, -.5, .5, -.05, .5},
|
||||||
|
},
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
--Define Lit Campfire
|
||||||
|
minetest.register_node("mcl_campfires:" .. campfire.techname .. "_lit", {
|
||||||
|
description = S(campfire.name),
|
||||||
|
_tt_help = S("Cooks food and keeps bees happy."),
|
||||||
|
_doc_items_longdesc = S("Campfires have multiple uses, including keeping bees happy, cooking raw meat and fish, and as a trap."),
|
||||||
|
inventory_image = "mcl_campfires_" .. campfire.techname .. "_inv.png",
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh = "mcl_campfires_campfire_lit.obj",
|
||||||
|
tiles = {{
|
||||||
|
name="mcl_campfires_" .. campfire.techname .. "_fire.png",
|
||||||
|
animation={
|
||||||
|
type="vertical_frames",
|
||||||
|
aspect_w=16,
|
||||||
|
aspect_h=16,
|
||||||
|
length=2.0
|
||||||
|
}},
|
||||||
|
{name="mcl_campfires_" .. campfire.techname .. "_log_lit.png",
|
||||||
|
animation={
|
||||||
|
type="vertical_frames",
|
||||||
|
aspect_w=16,
|
||||||
|
aspect_h=16,
|
||||||
|
length=2.0
|
||||||
|
}}
|
||||||
|
},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
|
groups = { handy=1, axey=1, material_wood=1, campfire=1, lit_campfire=1 },
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_rightclick = function (pos, node, player, itemstack, pointed_thing)
|
||||||
|
if player:get_wielded_item():get_name():find("shovel") then
|
||||||
|
node.name = "mcl_campfires:" .. campfire.techname
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
drop = campfire.drops,
|
||||||
|
_mcl_silk_touch_drop = {"mcl_campfires:" .. campfire.techname .. "_lit"},
|
||||||
|
light_source = campfire.lightlevel,
|
||||||
|
mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-.5, -.5, -.5, .5, -.05, .5}, --left, bottom, front, right, top
|
||||||
|
},
|
||||||
|
collision_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-.5, -.5, -.5, .5, -.05, .5},
|
||||||
|
},
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
damage_per_second = campfire.damage,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_campfires:campfire_lit",
|
||||||
|
recipe = {
|
||||||
|
{ "", "mcl_core:stick", "" },
|
||||||
|
{ "mcl_core:stick", "group:coal", "mcl_core:stick" },
|
||||||
|
{ "group:tree", "group:tree", "group:tree" },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_campfires:soul_campfire_lit",
|
||||||
|
recipe = {
|
||||||
|
{ "", "mcl_core:stick", "" },
|
||||||
|
{ "mcl_core:stick", "group:soul_block", "mcl_core:stick" },
|
||||||
|
{ "group:tree", "group:tree", "group:tree" },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local function burn_in_campfire(obj)
|
||||||
|
local p = obj:get_pos()
|
||||||
|
if p then
|
||||||
|
local n = minetest.find_node_near(p,0.4,{"group:lit_campfire"},true)
|
||||||
|
if n then
|
||||||
|
mcl_burning.set_on_fire(obj, 5)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local etime = 0
|
||||||
|
minetest.register_globalstep(function(dtime)
|
||||||
|
etime = dtime + etime
|
||||||
|
if etime < 0.5 then return end
|
||||||
|
etime = 0
|
||||||
|
for _,pl in pairs(minetest.get_connected_players()) do
|
||||||
|
burn_in_campfire(pl)
|
||||||
|
end
|
||||||
|
for _,ent in pairs(minetest.luaentities) do
|
||||||
|
if ent.is_mob then
|
||||||
|
burn_in_campfire(ent.object)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
|
||||||
|
|
||||||
-- Register Plain Campfire
|
|
||||||
mcl_campfires.register_campfire("mcl_campfires:campfire", {
|
|
||||||
description = S("Campfire"),
|
|
||||||
inv_texture = "mcl_campfires_campfire_inv.png",
|
|
||||||
fire_texture = "mcl_campfires_campfire_fire.png",
|
|
||||||
lit_logs_texture = "mcl_campfires_campfire_log_lit.png",
|
|
||||||
drops = "mcl_core:charcoal_lump 2",
|
|
||||||
lightlevel = 14,
|
|
||||||
damage = 1,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Register Soul Campfire
|
|
||||||
mcl_campfires.register_campfire("mcl_campfires:soul_campfire", {
|
|
||||||
description = S("Soul Campfire"),
|
|
||||||
inv_texture = "mcl_campfires_soul_campfire_inv.png",
|
|
||||||
fire_texture = "mcl_campfires_soul_campfire_fire.png",
|
|
||||||
lit_logs_texture = "mcl_campfires_soul_campfire_log_lit.png",
|
|
||||||
drops = "mcl_blackstone:soul_soil",
|
|
||||||
lightlevel = 10,
|
|
||||||
damage = 2,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Register Campfire Crafting
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mcl_campfires:campfire_lit",
|
|
||||||
recipe = {
|
|
||||||
{ "", "mcl_core:stick", "" },
|
|
||||||
{ "mcl_core:stick", "group:coal", "mcl_core:stick" },
|
|
||||||
{ "group:tree", "group:tree", "group:tree" },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mcl_campfires:soul_campfire_lit",
|
|
||||||
recipe = {
|
|
||||||
{ "", "mcl_core:stick", "" },
|
|
||||||
{ "mcl_core:stick", "group:soul_block", "mcl_core:stick" },
|
|
||||||
{ "group:tree", "group:tree", "group:tree" },
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,14 +1,14 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
-- Cartography Table Code. Used to create and copy maps. TODO: Needs a GUI still.
|
-- Cartography Table Code. Used to create and copy maps. Needs a GUI still.
|
||||||
|
|
||||||
minetest.register_node("mcl_cartography_table:cartography_table", {
|
minetest.register_node("mcl_cartography_table:cartography_table", {
|
||||||
description = S("Cartography Table"),
|
description = S("Cartography Table"),
|
||||||
_tt_help = S("Used to create or copy maps"),
|
_tt_help = S("Used to create or copy maps"),
|
||||||
_doc_items_longdesc = S("Is used to create or copy maps for use.."),
|
_doc_items_longdesc = S("Is used to create or copy maps for use.."),
|
||||||
tiles = {
|
tiles = {
|
||||||
"mcl_cartography_table_top.png", "mcl_cartography_table_side3.png",
|
"cartography_table_top.png", "cartography_table_side3.png",
|
||||||
"mcl_cartography_table_side3.png", "mcl_cartography_table_side2.png",
|
"cartography_table_side3.png", "cartography_table_side2.png",
|
||||||
"mcl_cartography_table_side3.png", "mcl_cartography_table_side1.png"
|
"cartography_table_side3.png", "cartography_table_side1.png"
|
||||||
},
|
},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = { axey = 2, handy = 1, deco_block = 1, material_wood = 1, flammable = 1 },
|
groups = { axey = 2, handy = 1, deco_block = 1, material_wood = 1, flammable = 1 },
|
||||||
|
|
|
@ -67,12 +67,12 @@ local function register_filled_cauldron(water_level, description, liquid)
|
||||||
local water_tex
|
local water_tex
|
||||||
if liquid == "river_water" then
|
if liquid == "river_water" then
|
||||||
id = id .. "r"
|
id = id .. "r"
|
||||||
water_tex = "default_water_source_animated.png^[verticalframe:16:0^[multiply:#0084FF"
|
water_tex = "default_river_water_source_animated.png^[verticalframe:16:0"
|
||||||
elseif liquid == "lava" then
|
elseif liquid == "lava" then
|
||||||
id = id .. "_lava"
|
id = id .. "_lava"
|
||||||
water_tex = "default_lava_source_animated.png^[verticalframe:16:0"
|
water_tex = "default_lava_source_animated.png^[verticalframe:16:0"
|
||||||
else
|
else
|
||||||
water_tex = "default_water_source_animated.png^[verticalframe:16:0^[multiply:#3F76E4"
|
water_tex = "default_water_source_animated.png^[verticalframe:16:0"
|
||||||
end
|
end
|
||||||
minetest.register_node(id, {
|
minetest.register_node(id, {
|
||||||
description = description,
|
description = description,
|
||||||
|
|
|
@ -405,7 +405,6 @@ function mcl_core.generate_tree(pos, tree_type, options)
|
||||||
elseif tree_type == BIRCH_TREE_ID then
|
elseif tree_type == BIRCH_TREE_ID then
|
||||||
mcl_core.generate_birch_tree(pos)
|
mcl_core.generate_birch_tree(pos)
|
||||||
end
|
end
|
||||||
mcl_core.update_sapling_foliage_colors(pos)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Classic oak in v6 style
|
-- Classic oak in v6 style
|
||||||
|
@ -802,19 +801,23 @@ end
|
||||||
|
|
||||||
local grass_spread_randomizer = PseudoRandom(minetest.get_mapgen_setting("seed"))
|
local grass_spread_randomizer = PseudoRandom(minetest.get_mapgen_setting("seed"))
|
||||||
|
|
||||||
|
function mcl_core.get_grass_palette_index(pos)
|
||||||
|
local biome_data = minetest.get_biome_data(pos)
|
||||||
|
local index = 0
|
||||||
|
if biome_data then
|
||||||
|
local biome = biome_data.biome
|
||||||
|
local biome_name = minetest.get_biome_name(biome)
|
||||||
|
local reg_biome = minetest.registered_biomes[biome_name]
|
||||||
|
if reg_biome then
|
||||||
|
index = reg_biome._mcl_grass_palette_index
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return index
|
||||||
|
end
|
||||||
|
|
||||||
-- Return appropriate grass block node for pos
|
-- Return appropriate grass block node for pos
|
||||||
function mcl_core.get_grass_block_type(pos)
|
function mcl_core.get_grass_block_type(pos)
|
||||||
return {name = minetest.get_node(pos).name, param2 = mcl_util.get_palette_indexes_from_pos(pos).grass_palette_index}
|
return {name = "mcl_core:dirt_with_grass", param2 = mcl_core.get_grass_palette_index(pos)}
|
||||||
end
|
|
||||||
|
|
||||||
-- Return appropriate foliage block node for pos
|
|
||||||
function mcl_core.get_foliage_block_type(pos)
|
|
||||||
return {name = minetest.get_node(pos).name, param2 = mcl_util.get_palette_indexes_from_pos(pos).foliage_palette_index}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Return appropriate water block node for pos
|
|
||||||
function mcl_core.get_water_block_type(pos)
|
|
||||||
return {name = minetest.get_node(pos).name, param2 = mcl_util.get_palette_indexes_from_pos(pos).water_palette_index}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
@ -1070,16 +1073,6 @@ local grow_acacia = sapling_grow_action(ACACIA_TREE_ID, 2, true, false)
|
||||||
local grow_spruce = sapling_grow_action(SPRUCE_TREE_ID, 1, true, true, "mcl_core:sprucesapling")
|
local grow_spruce = sapling_grow_action(SPRUCE_TREE_ID, 1, true, true, "mcl_core:sprucesapling")
|
||||||
local grow_birch = sapling_grow_action(BIRCH_TREE_ID, 1, true, false)
|
local grow_birch = sapling_grow_action(BIRCH_TREE_ID, 1, true, false)
|
||||||
|
|
||||||
function mcl_core.update_sapling_foliage_colors(pos)
|
|
||||||
local pos1, pos2 = vector.offset(pos, -8, 0, -8), vector.offset(pos, 8, 30, 8)
|
|
||||||
local fnode
|
|
||||||
local foliage = minetest.find_nodes_in_area(pos1, pos2, {"group:foliage_palette", "group:foliage_palette_wallmounted"})
|
|
||||||
for _, fpos in pairs(foliage) do
|
|
||||||
fnode = minetest.get_node(fpos)
|
|
||||||
minetest.set_node(fpos, fnode)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Attempts to grow the sapling at the specified position
|
-- Attempts to grow the sapling at the specified position
|
||||||
-- pos: Position
|
-- pos: Position
|
||||||
-- node: Node table of the node at this position, from minetest.get_node
|
-- node: Node table of the node at this position, from minetest.get_node
|
||||||
|
|
|
@ -127,7 +127,7 @@ minetest.register_node("mcl_core:reeds", {
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
if node.param2 == 0 then
|
if node.param2 == 0 then
|
||||||
node.param2 = mcl_util.get_palette_indexes_from_pos(pos).grass_palette_index
|
node.param2 = mcl_core.get_grass_palette_index(pos)
|
||||||
if node.param2 ~= 0 then
|
if node.param2 ~= 0 then
|
||||||
minetest.set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
end
|
end
|
||||||
|
|
|
@ -92,13 +92,11 @@ minetest.register_node("mcl_core:vine", {
|
||||||
_doc_items_longdesc = S("Vines are climbable blocks which can be placed on the sides of solid full-cube blocks. Vines slowly grow and spread."),
|
_doc_items_longdesc = S("Vines are climbable blocks which can be placed on the sides of solid full-cube blocks. Vines slowly grow and spread."),
|
||||||
drawtype = "signlike",
|
drawtype = "signlike",
|
||||||
tiles = {"mcl_core_vine.png"},
|
tiles = {"mcl_core_vine.png"},
|
||||||
color = "#48B518",
|
|
||||||
inventory_image = "mcl_core_vine.png",
|
inventory_image = "mcl_core_vine.png",
|
||||||
wield_image = "mcl_core_vine.png",
|
wield_image = "mcl_core_vine.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype2 = "colorwallmounted",
|
paramtype2 = "wallmounted",
|
||||||
palette = "[combine:16x2:0,0=mcl_core_palette_foliage.png",
|
|
||||||
walkable = false,
|
walkable = false,
|
||||||
climbable = true,
|
climbable = true,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
@ -109,7 +107,7 @@ minetest.register_node("mcl_core:vine", {
|
||||||
groups = {
|
groups = {
|
||||||
handy = 1, axey = 1, shearsy = 1, swordy = 1, deco_block = 1,
|
handy = 1, axey = 1, shearsy = 1, swordy = 1, deco_block = 1,
|
||||||
dig_by_piston = 1, destroy_by_lava_flow = 1, compostability = 50,
|
dig_by_piston = 1, destroy_by_lava_flow = 1, compostability = 50,
|
||||||
flammable = 2, fire_encouragement = 15, fire_flammability = 100, foliage_palette_wallmounted = 1
|
flammable = 2, fire_encouragement = 15, fire_flammability = 100
|
||||||
},
|
},
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
drop = "",
|
drop = "",
|
||||||
|
@ -157,20 +155,6 @@ minetest.register_node("mcl_core:vine", {
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_construct = function(pos)
|
|
||||||
local node = minetest.get_node(pos)
|
|
||||||
local foliage_palette_index = mcl_util.get_palette_indexes_from_pos(pos).foliage_palette_index
|
|
||||||
if node.name == "mcl_core:vine" then
|
|
||||||
local biome_param2 = foliage_palette_index
|
|
||||||
local rotation_param2 = node.param2
|
|
||||||
local final_param2 = (biome_param2 * 8) + rotation_param2
|
|
||||||
if node.param2 ~= final_param2 and rotation_param2 < 6 then
|
|
||||||
node.param2 = final_param2
|
|
||||||
minetest.swap_node(pos, node)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
|
|
||||||
-- If dug, also dig a “dependant” vine below it.
|
-- If dug, also dig a “dependant” vine below it.
|
||||||
-- A vine is dependant if it hangs from this node and has no supporting block.
|
-- A vine is dependant if it hangs from this node and has no supporting block.
|
||||||
on_dig = function(pos, node, digger)
|
on_dig = function(pos, node, digger)
|
||||||
|
|
|
@ -25,15 +25,14 @@ minetest.register_node("mcl_core:water_flowing", {
|
||||||
{
|
{
|
||||||
image="default_water_flowing_animated.png",
|
image="default_water_flowing_animated.png",
|
||||||
backface_culling=false,
|
backface_culling=false,
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.5}
|
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=4.0}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image="default_water_flowing_animated.png",
|
image="default_water_flowing_animated.png",
|
||||||
backface_culling=false,
|
backface_culling=false,
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.5}
|
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=4.0}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
color = "#3F76E4",
|
|
||||||
sounds = mcl_sounds.node_sound_water_defaults(),
|
sounds = mcl_sounds.node_sound_water_defaults(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
use_texture_alpha = USE_TEXTURE_ALPHA,
|
use_texture_alpha = USE_TEXTURE_ALPHA,
|
||||||
|
@ -51,7 +50,7 @@ minetest.register_node("mcl_core:water_flowing", {
|
||||||
liquid_viscosity = WATER_VISC,
|
liquid_viscosity = WATER_VISC,
|
||||||
liquid_range = 7,
|
liquid_range = 7,
|
||||||
waving = 3,
|
waving = 3,
|
||||||
post_effect_color = {a=60, r=24.7, g=46.3, b=89.4},
|
post_effect_color = {a=60, r=0x03, g=0x3C, b=0x5C},
|
||||||
groups = { water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1, dig_by_piston=1},
|
groups = { water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1, dig_by_piston=1},
|
||||||
_mcl_blast_resistance = 100,
|
_mcl_blast_resistance = 100,
|
||||||
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
|
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
|
||||||
|
@ -71,23 +70,20 @@ S("• When water is directly below lava, the water turns into stone."),
|
||||||
drawtype = "liquid",
|
drawtype = "liquid",
|
||||||
waving = 3,
|
waving = 3,
|
||||||
tiles = {
|
tiles = {
|
||||||
{name="default_water_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}
|
{name="default_water_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=5.0}}
|
||||||
},
|
},
|
||||||
special_tiles = {
|
special_tiles = {
|
||||||
-- New-style water source material (mostly unused)
|
-- New-style water source material (mostly unused)
|
||||||
{
|
{
|
||||||
name="default_water_source_animated.png",
|
name="default_water_source_animated.png",
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0},
|
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=5.0},
|
||||||
backface_culling = false,
|
backface_culling = false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
color = "#3F76E4",
|
|
||||||
sounds = mcl_sounds.node_sound_water_defaults(),
|
sounds = mcl_sounds.node_sound_water_defaults(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
use_texture_alpha = USE_TEXTURE_ALPHA,
|
use_texture_alpha = USE_TEXTURE_ALPHA,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "color",
|
|
||||||
palette = "mcl_core_palette_water.png",
|
|
||||||
walkable = false,
|
walkable = false,
|
||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
|
@ -99,21 +95,12 @@ S("• When water is directly below lava, the water turns into stone."),
|
||||||
liquid_alternative_source = "mcl_core:water_source",
|
liquid_alternative_source = "mcl_core:water_source",
|
||||||
liquid_viscosity = WATER_VISC,
|
liquid_viscosity = WATER_VISC,
|
||||||
liquid_range = 7,
|
liquid_range = 7,
|
||||||
post_effect_color = {a=60, r=24.7, g=46.3, b=89.4},
|
post_effect_color = {a=60, r=0x03, g=0x3C, b=0x5C},
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = { water=3, liquid=3, puts_out_fire=1, freezes=1, not_in_creative_inventory=1, dig_by_piston=1, water_palette=1},
|
groups = { water=3, liquid=3, puts_out_fire=1, freezes=1, not_in_creative_inventory=1, dig_by_piston=1},
|
||||||
_mcl_blast_resistance = 100,
|
_mcl_blast_resistance = 100,
|
||||||
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
|
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
|
||||||
_mcl_hardness = -1,
|
_mcl_hardness = -1,
|
||||||
on_construct = function(pos)
|
|
||||||
local node = minetest.get_node(pos)
|
|
||||||
if node.param2 == 0 then
|
|
||||||
local new_node = mcl_core.get_water_block_type(pos)
|
|
||||||
if new_node.param2 ~= 0 then
|
|
||||||
minetest.swap_node(pos, new_node)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_core:lava_flowing", {
|
minetest.register_node("mcl_core:lava_flowing", {
|
||||||
|
@ -258,22 +245,3 @@ if minetest.settings:get("mcl_node_particles") == "full" then
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_liquid_transformed(function(pos_list, node_list)
|
|
||||||
for _, fwpos in pairs(pos_list) do
|
|
||||||
local fwnode = minetest.get_node(fwpos)
|
|
||||||
if minetest.get_item_group(fwnode, "palette_index") ~= 1 then
|
|
||||||
local pos1, pos2 = vector.offset(fwpos, -1, -1, -1), vector.offset(fwpos, 1, 1, 1)
|
|
||||||
local water = minetest.find_nodes_in_area(pos1, pos2, {"group:water_palette"})
|
|
||||||
for _, wpos in pairs(water) do
|
|
||||||
local wnode = minetest.get_node(wpos)
|
|
||||||
local water_palette_index = mcl_util.get_palette_indexes_from_pos(wpos).water_palette_index
|
|
||||||
if wnode.param2 ~= water_palette_index then
|
|
||||||
wnode.param2 = water_palette_index
|
|
||||||
minetest.set_node(wpos, wnode)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
|
@ -15,10 +15,11 @@ end
|
||||||
--
|
--
|
||||||
-- Whenever a trunk node is removed, all `group:leaves` nodes in a sphere
|
-- Whenever a trunk node is removed, all `group:leaves` nodes in a sphere
|
||||||
-- with radius 6 are checked. Every such node that does not have a trunk
|
-- with radius 6 are checked. Every such node that does not have a trunk
|
||||||
-- node within a distance of 6 blocks and wasn't placed by a player is
|
-- node within a distance of 6 blocks is converted into a orphan leaf node.
|
||||||
-- converted into a orphan leaf node.
|
|
||||||
-- An ABM will gradually decay these nodes.
|
-- An ABM will gradually decay these nodes.
|
||||||
--
|
--
|
||||||
|
-- If param2 of the node is set to a nonzero value, the node will always
|
||||||
|
-- be preserved. This is set automatically when leaves are placed manually.
|
||||||
--
|
--
|
||||||
-- @param pos the position of the removed trunk node.
|
-- @param pos the position of the removed trunk node.
|
||||||
-- @param oldnode the node table of the removed trunk node.
|
-- @param oldnode the node table of the removed trunk node.
|
||||||
|
@ -28,15 +29,17 @@ function mcl_core.update_leaves(pos, oldnode)
|
||||||
local leaves = minetest.find_nodes_in_area(pos1, pos2, "group:leaves")
|
local leaves = minetest.find_nodes_in_area(pos1, pos2, "group:leaves")
|
||||||
for _, lpos in pairs(leaves) do
|
for _, lpos in pairs(leaves) do
|
||||||
lnode = minetest.get_node(lpos)
|
lnode = minetest.get_node(lpos)
|
||||||
lmeta = minetest.get_meta(lpos)
|
-- skip already decaying leaf nodes
|
||||||
-- skip already decaying leaf nodes and player leaves
|
if minetest.get_item_group(lnode.name, "orphan_leaves") ~= 1 then
|
||||||
if minetest.get_item_group(lnode.name, "orphan_leaves") ~= 1 and lmeta:get_int("player_leaves") ~= 1 then
|
|
||||||
if not minetest.find_node_near(lpos, 6, "group:tree") then
|
if not minetest.find_node_near(lpos, 6, "group:tree") then
|
||||||
|
-- manually placed leaf nodes have param2
|
||||||
|
-- set and will never decay automatically
|
||||||
|
if lnode.param2 == 0 then
|
||||||
local orphan_name = lnode.name .. "_orphan"
|
local orphan_name = lnode.name .. "_orphan"
|
||||||
local def = minetest.registered_nodes[orphan_name]
|
local def = minetest.registered_nodes[orphan_name]
|
||||||
if def then
|
if def then
|
||||||
--minetest.log("Registered: ".. orphan_name)
|
--minetest.log("Registered: ".. orphan_name)
|
||||||
minetest.set_node(lpos, {name = orphan_name})
|
minetest.swap_node(lpos, {name = orphan_name})
|
||||||
else
|
else
|
||||||
--minetest.log("Not registered: ".. orphan_name)
|
--minetest.log("Not registered: ".. orphan_name)
|
||||||
end
|
end
|
||||||
|
@ -44,10 +47,6 @@ function mcl_core.update_leaves(pos, oldnode)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_core.make_player_leaves(pos)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
meta:set_int("player_leaves", 1)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Register tree trunk (wood) and bark
|
-- Register tree trunk (wood) and bark
|
||||||
|
@ -150,7 +149,7 @@ local function register_wooden_planks(subname, description, tiles)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function register_leaves(subname, description, longdesc, tiles, color, paramtype2, sapling, drop_apples, sapling_chances, foliage_palette)
|
local function register_leaves(subname, description, longdesc, tiles, sapling, drop_apples, sapling_chances)
|
||||||
local apple_chances = {200, 180, 160, 120, 40}
|
local apple_chances = {200, 180, 160, 120, 40}
|
||||||
local stick_chances = {50, 45, 30, 35, 10}
|
local stick_chances = {50, 45, 30, 35, 10}
|
||||||
|
|
||||||
|
@ -187,16 +186,14 @@ local function register_leaves(subname, description, longdesc, tiles, color, par
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
drawtype = "allfaces_optional",
|
drawtype = "allfaces_optional",
|
||||||
waving = 2,
|
waving = 2,
|
||||||
|
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
||||||
tiles = tiles,
|
tiles = tiles,
|
||||||
color = color,
|
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = paramtype2,
|
|
||||||
palette = "mcl_core_palette_foliage.png",
|
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {
|
groups = {
|
||||||
handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1,
|
handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1,
|
||||||
flammable = 2, fire_encouragement = 30, fire_flammability = 60,
|
flammable = 2, fire_encouragement = 30, fire_flammability = 60,
|
||||||
leaves = 1, deco_block = 1, compostability = 30, foliage_palette = foliage_palette
|
leaves = 1, deco_block = 1, compostability = 30
|
||||||
},
|
},
|
||||||
drop = get_drops(0),
|
drop = get_drops(0),
|
||||||
_mcl_shears_drop = true,
|
_mcl_shears_drop = true,
|
||||||
|
@ -205,24 +202,13 @@ local function register_leaves(subname, description, longdesc, tiles, color, par
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
_mcl_fortune_drop = { get_drops(1), get_drops(2), get_drops(3), get_drops(4) },
|
_mcl_fortune_drop = { get_drops(1), get_drops(2), get_drops(3), get_drops(4) },
|
||||||
on_construct = function(pos)
|
|
||||||
local node = minetest.get_node(pos)
|
|
||||||
if node.param2 == 0 then
|
|
||||||
local new_node = mcl_core.get_foliage_block_type(pos)
|
|
||||||
if new_node.param2 ~= 0 then
|
|
||||||
minetest.swap_node(pos, new_node)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
after_place_node = function(pos)
|
|
||||||
mcl_core.make_player_leaves(pos) -- Leaves placed by the player should always be player leaves.
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
minetest.register_node("mcl_core:" .. subname, l_def)
|
minetest.register_node("mcl_core:" .. subname, l_def)
|
||||||
|
|
||||||
local o_def = table.copy(l_def)
|
local o_def = table.copy(l_def)
|
||||||
o_def._doc_items_create_entry = false
|
o_def._doc_items_create_entry = false
|
||||||
|
o_def.place_param2 = nil
|
||||||
o_def.groups.not_in_creative_inventory = 1
|
o_def.groups.not_in_creative_inventory = 1
|
||||||
o_def.groups.orphan_leaves = 1
|
o_def.groups.orphan_leaves = 1
|
||||||
o_def._mcl_shears_drop = {"mcl_core:" .. subname}
|
o_def._mcl_shears_drop = {"mcl_core:" .. subname}
|
||||||
|
@ -324,12 +310,12 @@ register_sapling("birchsapling", S("Birch Sapling"),
|
||||||
"mcl_core_sapling_birch.png", {-4/16, -0.5, -4/16, 4/16, 0.5, 4/16})
|
"mcl_core_sapling_birch.png", {-4/16, -0.5, -4/16, 4/16, 0.5, 4/16})
|
||||||
|
|
||||||
|
|
||||||
register_leaves("leaves", S("Oak Leaves"), S("Oak leaves are grown from oak trees."), {"default_leaves.png"}, "#48B518", "color", "mcl_core:sapling", true, {20, 16, 12, 10}, 1)
|
register_leaves("leaves", S("Oak Leaves"), S("Oak leaves are grown from oak trees."), {"default_leaves.png"}, "mcl_core:sapling", true, {20, 16, 12, 10})
|
||||||
register_leaves("darkleaves", S("Dark Oak Leaves"), S("Dark oak leaves are grown from dark oak trees."), {"mcl_core_leaves_big_oak.png"}, "#48B518", "color", "mcl_core:darksapling", true, {20, 16, 12, 10}, 1)
|
register_leaves("darkleaves", S("Dark Oak Leaves"), S("Dark oak leaves are grown from dark oak trees."), {"mcl_core_leaves_big_oak.png"}, "mcl_core:darksapling", true, {20, 16, 12, 10})
|
||||||
register_leaves("jungleleaves", S("Jungle Leaves"), S("Jungle leaves are grown from jungle trees."), {"default_jungleleaves.png"}, "#48B518", "color", "mcl_core:junglesapling", false, {40, 26, 32, 24, 10}, 1)
|
register_leaves("jungleleaves", S("Jungle Leaves"), S("Jungle leaves are grown from jungle trees."), {"default_jungleleaves.png"}, "mcl_core:junglesapling", false, {40, 26, 32, 24, 10})
|
||||||
register_leaves("acacialeaves", S("Acacia Leaves"), S("Acacia leaves are grown from acacia trees."), {"default_acacia_leaves.png"}, "#48B518", "color", "mcl_core:acaciasapling", false, {20, 16, 12, 10}, 1)
|
register_leaves("acacialeaves", S("Acacia Leaves"), S("Acacia leaves are grown from acacia trees."), {"default_acacia_leaves.png"}, "mcl_core:acaciasapling", false, {20, 16, 12, 10})
|
||||||
register_leaves("spruceleaves", S("Spruce Leaves"), S("Spruce leaves are grown from spruce trees."), {"mcl_core_leaves_spruce.png"}, "#619961", "none", "mcl_core:sprucesapling", false, {20, 16, 12, 10}, 0)
|
register_leaves("spruceleaves", S("Spruce Leaves"), S("Spruce leaves are grown from spruce trees."), {"mcl_core_leaves_spruce.png"}, "mcl_core:sprucesapling", false, {20, 16, 12, 10})
|
||||||
register_leaves("birchleaves", S("Birch Leaves"), S("Birch leaves are grown from birch trees."), {"mcl_core_leaves_birch.png"}, "#80A755", "none", "mcl_core:birchsapling", false, {20, 16, 12, 10}, 0)
|
register_leaves("birchleaves", S("Birch Leaves"), S("Birch leaves are grown from birch trees."), {"mcl_core_leaves_birch.png"}, "mcl_core:birchsapling", false, {20, 16, 12, 10})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -70,9 +70,9 @@ minetest.register_node("mcl_crimson:warped_fungus", {
|
||||||
_tt_help = S("Warped fungus is a mushroom found in the nether's warped forest."),
|
_tt_help = S("Warped fungus is a mushroom found in the nether's warped forest."),
|
||||||
_doc_items_longdesc = S("Warped fungus is a mushroom found in the nether's warped forest."),
|
_doc_items_longdesc = S("Warped fungus is a mushroom found in the nether's warped forest."),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = { "mcl_crimson_warped_fungus.png" },
|
tiles = { "farming_warped_fungus.png" },
|
||||||
inventory_image = "mcl_crimson_warped_fungus.png",
|
inventory_image = "farming_warped_fungus.png",
|
||||||
wield_image = "mcl_crimson_warped_fungus.png",
|
wield_image = "farming_warped_fungus.png",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -98,14 +98,14 @@ minetest.register_node("mcl_crimson:warped_fungus", {
|
||||||
mcl_flowerpots.register_potted_flower("mcl_crimson:warped_fungus", {
|
mcl_flowerpots.register_potted_flower("mcl_crimson:warped_fungus", {
|
||||||
name = "warped fungus",
|
name = "warped fungus",
|
||||||
desc = S("Warped Fungus"),
|
desc = S("Warped Fungus"),
|
||||||
image = "mcl_crimson_warped_fungus.png",
|
image = "farming_warped_fungus.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_crimson:twisting_vines", {
|
minetest.register_node("mcl_crimson:twisting_vines", {
|
||||||
description = S("Twisting Vines"),
|
description = S("Twisting Vines"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = { "mcl_crimson_twisting_vines_plant.png" },
|
tiles = { "twisting_vines_plant.png" },
|
||||||
inventory_image = "mcl_crimson_twisting_vines.png",
|
inventory_image = "twisting_vines.png",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -254,8 +254,8 @@ minetest.register_node("mcl_crimson:weeping_vines", {
|
||||||
minetest.register_node("mcl_crimson:nether_sprouts", {
|
minetest.register_node("mcl_crimson:nether_sprouts", {
|
||||||
description = S("Nether Sprouts"),
|
description = S("Nether Sprouts"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = { "mcl_crimson_nether_sprouts.png" },
|
tiles = { "nether_sprouts.png" },
|
||||||
inventory_image = "mcl_crimson_nether_sprouts.png",
|
inventory_image = "nether_sprouts.png",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -276,8 +276,8 @@ minetest.register_node("mcl_crimson:nether_sprouts", {
|
||||||
minetest.register_node("mcl_crimson:warped_roots", {
|
minetest.register_node("mcl_crimson:warped_roots", {
|
||||||
description = S("Warped Roots"),
|
description = S("Warped Roots"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = { "mcl_crimson_warped_roots.png" },
|
tiles = { "warped_roots.png" },
|
||||||
inventory_image = "mcl_crimson_warped_roots.png",
|
inventory_image = "warped_roots.png",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -296,13 +296,13 @@ minetest.register_node("mcl_crimson:warped_roots", {
|
||||||
mcl_flowerpots.register_potted_flower("mcl_crimson:warped_roots", {
|
mcl_flowerpots.register_potted_flower("mcl_crimson:warped_roots", {
|
||||||
name = "warped roots",
|
name = "warped roots",
|
||||||
desc = S("Warped Roots"),
|
desc = S("Warped Roots"),
|
||||||
image = "mcl_crimson_warped_roots.png",
|
image = "warped_roots.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("mcl_crimson:warped_wart_block", {
|
minetest.register_node("mcl_crimson:warped_wart_block", {
|
||||||
description = S("Warped Wart Block"),
|
description = S("Warped Wart Block"),
|
||||||
tiles = {"mcl_crimson_warped_stem_stripped_side.png"},
|
tiles = {"warped_wart_block.png"},
|
||||||
groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1, compostability = 85},
|
groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1, compostability = 85},
|
||||||
_mcl_hardness = 1,
|
_mcl_hardness = 1,
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults({
|
sounds = mcl_sounds.node_sound_leaves_defaults({
|
||||||
|
@ -313,7 +313,7 @@ minetest.register_node("mcl_crimson:warped_wart_block", {
|
||||||
|
|
||||||
minetest.register_node("mcl_crimson:shroomlight", {
|
minetest.register_node("mcl_crimson:shroomlight", {
|
||||||
description = S("Shroomlight"),
|
description = S("Shroomlight"),
|
||||||
tiles = {"mcl_crimson_shroomlight.png"},
|
tiles = {"shroomlight.png"},
|
||||||
groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1, compostability = 65},
|
groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1, compostability = 65},
|
||||||
light_source = minetest.LIGHT_MAX,
|
light_source = minetest.LIGHT_MAX,
|
||||||
_mcl_hardness = 1,
|
_mcl_hardness = 1,
|
||||||
|
@ -328,10 +328,10 @@ minetest.register_node("mcl_crimson:warped_hyphae", {
|
||||||
_doc_items_longdesc = S("The stem of a warped hyphae"),
|
_doc_items_longdesc = S("The stem of a warped hyphae"),
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
tiles = {
|
tiles = {
|
||||||
"mcl_crimson_warped_hyphae.png",
|
"warped_hyphae.png",
|
||||||
"mcl_crimson_warped_hyphae.png",
|
"warped_hyphae.png",
|
||||||
{
|
{
|
||||||
image="mcl_crimson_warped_hyphae_side.png",
|
image="warped_hyphae_side.png",
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}
|
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -347,12 +347,12 @@ minetest.register_node("mcl_crimson:warped_hyphae", {
|
||||||
minetest.register_node("mcl_crimson:warped_nylium", {
|
minetest.register_node("mcl_crimson:warped_nylium", {
|
||||||
description = S("Warped Nylium"),
|
description = S("Warped Nylium"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"mcl_crimson_warped_nylium.png",
|
"warped_nylium.png",
|
||||||
"mcl_nether_netherrack.png",
|
"mcl_nether_netherrack.png",
|
||||||
"mcl_nether_netherrack.png^mcl_crimson_warped_nylium_side.png",
|
"mcl_nether_netherrack.png^warped_nylium_side.png",
|
||||||
"mcl_nether_netherrack.png^mcl_crimson_warped_nylium_side.png",
|
"mcl_nether_netherrack.png^warped_nylium_side.png",
|
||||||
"mcl_nether_netherrack.png^mcl_crimson_warped_nylium_side.png",
|
"mcl_nether_netherrack.png^warped_nylium_side.png",
|
||||||
"mcl_nether_netherrack.png^mcl_crimson_warped_nylium_side.png",
|
"mcl_nether_netherrack.png^warped_nylium_side.png",
|
||||||
},
|
},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
drop = "mcl_nether:netherrack",
|
drop = "mcl_nether:netherrack",
|
||||||
|
@ -370,7 +370,7 @@ minetest.register_node("mcl_crimson:warped_hyphae_bark", {
|
||||||
_doc_items_longdesc = S("This is a decorative block surrounded by the bark of an hyphae."),
|
_doc_items_longdesc = S("This is a decorative block surrounded by the bark of an hyphae."),
|
||||||
tiles = {
|
tiles = {
|
||||||
{
|
{
|
||||||
image="mcl_crimson_warped_hyphae_side.png",
|
image="warped_hyphae_side.png",
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}
|
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -396,7 +396,7 @@ minetest.register_node("mcl_crimson:stripped_warped_hyphae", {
|
||||||
description = S("Stripped Warped Hyphae"),
|
description = S("Stripped Warped Hyphae"),
|
||||||
_doc_items_longdesc = S("The stripped hyphae of a warped fungus"),
|
_doc_items_longdesc = S("The stripped hyphae of a warped fungus"),
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
tiles = {"mcl_crimson_warped_stem_stripped_top.png", "mcl_crimson_warped_stem_stripped_top.png", "mcl_crimson_warped_stem_stripped_side.png"},
|
tiles = {"warped_stem_stripped_top.png", "warped_stem_stripped_top.png", "warped_stem_stripped_side.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = mcl_util.rotate_axis,
|
on_place = mcl_util.rotate_axis,
|
||||||
groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
|
groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
|
||||||
|
@ -408,7 +408,7 @@ minetest.register_node("mcl_crimson:stripped_warped_hyphae", {
|
||||||
minetest.register_node("mcl_crimson:stripped_warped_hyphae_bark", {
|
minetest.register_node("mcl_crimson:stripped_warped_hyphae_bark", {
|
||||||
description = S("Stripped Warped Hyphae Bark"),
|
description = S("Stripped Warped Hyphae Bark"),
|
||||||
_doc_items_longdesc = S("The stripped hyphae bark of a warped fungus"),
|
_doc_items_longdesc = S("The stripped hyphae bark of a warped fungus"),
|
||||||
tiles = {"mcl_crimson_warped_stem_stripped_side.png"},
|
tiles = {"warped_stem_stripped_side.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = mcl_util.rotate_axis,
|
on_place = mcl_util.rotate_axis,
|
||||||
groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
|
groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
|
||||||
|
@ -428,7 +428,7 @@ minetest.register_craft({
|
||||||
|
|
||||||
minetest.register_node("mcl_crimson:warped_hyphae_wood", {
|
minetest.register_node("mcl_crimson:warped_hyphae_wood", {
|
||||||
description = S("Warped Hyphae Wood"),
|
description = S("Warped Hyphae Wood"),
|
||||||
tiles = {"mcl_crimson_warped_hyphae_wood.png"},
|
tiles = {"warped_hyphae_wood.png"},
|
||||||
groups = {handy = 5,axey = 1, flammable = 3, wood=1,building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20},
|
groups = {handy = 5,axey = 1, flammable = 3, wood=1,building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20},
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
|
@ -456,9 +456,9 @@ minetest.register_node("mcl_crimson:crimson_fungus", {
|
||||||
_tt_help = S("Crimson fungus is a mushroom found in the nether's crimson forest."),
|
_tt_help = S("Crimson fungus is a mushroom found in the nether's crimson forest."),
|
||||||
_doc_items_longdesc = S("Crimson fungus is a mushroom found in the nether's crimson forest."),
|
_doc_items_longdesc = S("Crimson fungus is a mushroom found in the nether's crimson forest."),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = { "mcl_crimson_crimson_fungus.png" },
|
tiles = { "farming_crimson_fungus.png" },
|
||||||
inventory_image = "mcl_crimson_crimson_fungus.png",
|
inventory_image = "farming_crimson_fungus.png",
|
||||||
wield_image = "mcl_crimson_crimson_fungus.png",
|
wield_image = "farming_crimson_fungus.png",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -488,14 +488,14 @@ minetest.register_node("mcl_crimson:crimson_fungus", {
|
||||||
mcl_flowerpots.register_potted_flower("mcl_crimson:crimson_fungus", {
|
mcl_flowerpots.register_potted_flower("mcl_crimson:crimson_fungus", {
|
||||||
name = "crimson fungus",
|
name = "crimson fungus",
|
||||||
desc = S("Crimson Fungus"),
|
desc = S("Crimson Fungus"),
|
||||||
image = "mcl_crimson_crimson_fungus.png",
|
image = "farming_crimson_fungus.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_crimson:crimson_roots", {
|
minetest.register_node("mcl_crimson:crimson_roots", {
|
||||||
description = S("Crimson Roots"),
|
description = S("Crimson Roots"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = { "mcl_crimson_crimson_roots.png" },
|
tiles = { "crimson_roots.png" },
|
||||||
inventory_image = "mcl_crimson_crimson_roots.png",
|
inventory_image = "crimson_roots.png",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
@ -514,7 +514,7 @@ minetest.register_node("mcl_crimson:crimson_roots", {
|
||||||
mcl_flowerpots.register_potted_flower("mcl_crimson:crimson_roots", {
|
mcl_flowerpots.register_potted_flower("mcl_crimson:crimson_roots", {
|
||||||
name = "crimson roots",
|
name = "crimson roots",
|
||||||
desc = S("Crimson Roots"),
|
desc = S("Crimson Roots"),
|
||||||
image = "mcl_crimson_crimson_roots.png",
|
image = "crimson_roots.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_crimson:crimson_hyphae", {
|
minetest.register_node("mcl_crimson:crimson_hyphae", {
|
||||||
|
@ -522,10 +522,10 @@ minetest.register_node("mcl_crimson:crimson_hyphae", {
|
||||||
_doc_items_longdesc = S("The stem of a crimson hyphae"),
|
_doc_items_longdesc = S("The stem of a crimson hyphae"),
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
tiles = {
|
tiles = {
|
||||||
"mcl_crimson_crimson_hyphae.png",
|
"crimson_hyphae.png",
|
||||||
"mcl_crimson_crimson_hyphae.png",
|
"crimson_hyphae.png",
|
||||||
{
|
{
|
||||||
image="mcl_crimson_crimson_hyphae_side.png",
|
image="crimson_hyphae_side.png",
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}
|
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -545,7 +545,7 @@ minetest.register_node("mcl_crimson:crimson_hyphae_bark", {
|
||||||
_doc_items_longdesc = S("This is a decorative block surrounded by the bark of an hyphae."),
|
_doc_items_longdesc = S("This is a decorative block surrounded by the bark of an hyphae."),
|
||||||
tiles = {
|
tiles = {
|
||||||
{
|
{
|
||||||
image="mcl_crimson_crimson_hyphae_side.png",
|
image="crimson_hyphae_side.png",
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}
|
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -571,7 +571,7 @@ minetest.register_node("mcl_crimson:stripped_crimson_hyphae", {
|
||||||
description = S("Stripped Crimson Hyphae"),
|
description = S("Stripped Crimson Hyphae"),
|
||||||
_doc_items_longdesc = S("The stripped stem of a crimson hyphae"),
|
_doc_items_longdesc = S("The stripped stem of a crimson hyphae"),
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
tiles = {"mcl_crimson_crimson_stem_stripped_top.png", "mcl_crimson_crimson_stem_stripped_top.png", "mcl_crimson_crimson_stem_stripped_side.png"},
|
tiles = {"crimson_stem_stripped_top.png", "crimson_stem_stripped_top.png", "crimson_stem_stripped_side.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = mcl_util.rotate_axis,
|
on_place = mcl_util.rotate_axis,
|
||||||
groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
|
groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
|
||||||
|
@ -583,7 +583,7 @@ minetest.register_node("mcl_crimson:stripped_crimson_hyphae", {
|
||||||
minetest.register_node("mcl_crimson:stripped_crimson_hyphae_bark", {
|
minetest.register_node("mcl_crimson:stripped_crimson_hyphae_bark", {
|
||||||
description = S("Stripped Crimson Hyphae Bark"),
|
description = S("Stripped Crimson Hyphae Bark"),
|
||||||
_doc_items_longdesc = S("The stripped wood of a crimson hyphae"),
|
_doc_items_longdesc = S("The stripped wood of a crimson hyphae"),
|
||||||
tiles = {"mcl_crimson_crimson_stem_stripped_side.png"},
|
tiles = {"crimson_stem_stripped_side.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = mcl_util.rotate_axis,
|
on_place = mcl_util.rotate_axis,
|
||||||
groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
|
groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
|
||||||
|
@ -603,7 +603,7 @@ minetest.register_craft({
|
||||||
|
|
||||||
minetest.register_node("mcl_crimson:crimson_hyphae_wood", {
|
minetest.register_node("mcl_crimson:crimson_hyphae_wood", {
|
||||||
description = S("Crimson Hyphae Wood"),
|
description = S("Crimson Hyphae Wood"),
|
||||||
tiles = {"mcl_crimson_crimson_hyphae_wood.png"},
|
tiles = {"crimson_hyphae_wood.png"},
|
||||||
groups = {handy = 5, axey = 1, wood = 1, building_block = 1, material_wood = 1},
|
groups = {handy = 5, axey = 1, wood = 1, building_block = 1, material_wood = 1},
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
|
@ -612,12 +612,12 @@ minetest.register_node("mcl_crimson:crimson_hyphae_wood", {
|
||||||
minetest.register_node("mcl_crimson:crimson_nylium", {
|
minetest.register_node("mcl_crimson:crimson_nylium", {
|
||||||
description = S("Crimson Nylium"),
|
description = S("Crimson Nylium"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"mcl_crimson_crimson_nylium.png",
|
"crimson_nylium.png",
|
||||||
"mcl_nether_netherrack.png",
|
"mcl_nether_netherrack.png",
|
||||||
"mcl_nether_netherrack.png^mcl_crimson_crimson_nylium_side.png",
|
"mcl_nether_netherrack.png^crimson_nylium_side.png",
|
||||||
"mcl_nether_netherrack.png^mcl_crimson_crimson_nylium_side.png",
|
"mcl_nether_netherrack.png^crimson_nylium_side.png",
|
||||||
"mcl_nether_netherrack.png^mcl_crimson_crimson_nylium_side.png",
|
"mcl_nether_netherrack.png^crimson_nylium_side.png",
|
||||||
"mcl_nether_netherrack.png^mcl_crimson_crimson_nylium_side.png",
|
"mcl_nether_netherrack.png^crimson_nylium_side.png",
|
||||||
},
|
},
|
||||||
groups = {pickaxey = 1, building_block = 1, material_stone = 1},
|
groups = {pickaxey = 1, building_block = 1, material_stone = 1},
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
|
@ -676,7 +676,7 @@ mcl_doors:register_trapdoor("mcl_crimson:crimson_trapdoor", {
|
||||||
_doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."),
|
_doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."),
|
||||||
_doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."),
|
_doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."),
|
||||||
tile_front = "mcl_crimson_crimson_trapdoor.png",
|
tile_front = "mcl_crimson_crimson_trapdoor.png",
|
||||||
tile_side = "mcl_crimson_crimson_hyphae_wood.png",
|
tile_side = "crimson_hyphae_wood.png",
|
||||||
wield_image = "mcl_crimson_crimson_trapdoor.png",
|
wield_image = "mcl_crimson_crimson_trapdoor.png",
|
||||||
groups = {handy=1,axey=1, mesecon_effector_on=1, material_wood=1, flammable=-1},
|
groups = {handy=1,axey=1, mesecon_effector_on=1, material_wood=1, flammable=-1},
|
||||||
_mcl_hardness = 3,
|
_mcl_hardness = 3,
|
||||||
|
@ -714,7 +714,7 @@ mcl_doors:register_trapdoor("mcl_crimson:warped_trapdoor", {
|
||||||
_doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."),
|
_doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."),
|
||||||
_doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."),
|
_doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."),
|
||||||
tile_front = "mcl_crimson_warped_trapdoor.png",
|
tile_front = "mcl_crimson_warped_trapdoor.png",
|
||||||
tile_side = "mcl_crimson_warped_hyphae_wood.png",
|
tile_side = "warped_hyphae_wood.png",
|
||||||
wield_image = "mcl_crimson_warped_trapdoor.png",
|
wield_image = "mcl_crimson_warped_trapdoor.png",
|
||||||
groups = {handy=1,axey=1, mesecon_effector_on=1, material_wood=1, flammable=-1},
|
groups = {handy=1,axey=1, mesecon_effector_on=1, material_wood=1, flammable=-1},
|
||||||
_mcl_hardness = 3,
|
_mcl_hardness = 3,
|
||||||
|
|
|
@ -456,12 +456,6 @@ minetest.register_craft({
|
||||||
recipe = {{"mcl_core:lapis"}},
|
recipe = {{"mcl_core:lapis"}},
|
||||||
})
|
})
|
||||||
|
|
||||||
--[[ Uncomment when crafting blue dye back into lapis is removed.
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mcl_dye:blue",
|
|
||||||
recipe = {{"mcl_flowers:cornflower"}},
|
|
||||||
})]]
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "mcl_dye:lightblue",
|
output = "mcl_dye:lightblue",
|
||||||
recipe = {{"mcl_flowers:blue_orchid"}},
|
recipe = {{"mcl_flowers:blue_orchid"}},
|
||||||
|
@ -532,12 +526,6 @@ minetest.register_craft({
|
||||||
recipe = {{"mcl_flowers:rose_bush"}},
|
recipe = {{"mcl_flowers:rose_bush"}},
|
||||||
})
|
})
|
||||||
|
|
||||||
--[[Uncomment when crafting white dye back into bonemeal is removed
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mcl_dye:white",
|
|
||||||
recipe = {{"mcl_flowers:lily_of_the_valley"}},
|
|
||||||
})]]
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "cooking",
|
type = "cooking",
|
||||||
output = "mcl_dye:dark_green",
|
output = "mcl_dye:dark_green",
|
||||||
|
@ -545,13 +533,6 @@ minetest.register_craft({
|
||||||
cooktime = 10,
|
cooktime = 10,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
output = "mcl_dye:green",
|
|
||||||
recipe = "group:sea_pickle",
|
|
||||||
cooktime = 10,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Dye mixing recipes.
|
-- Dye mixing recipes.
|
||||||
--
|
--
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
|
|
@ -448,29 +448,19 @@ function mcl_fire.set_fire(pointed_thing, player, allow_on_fire)
|
||||||
else
|
else
|
||||||
pname = player:get_player_name()
|
pname = player:get_player_name()
|
||||||
end
|
end
|
||||||
|
local n = get_node(pointed_thing.above)
|
||||||
|
local nu = get_node(pointed_thing.under)
|
||||||
|
if allow_on_fire == false and get_item_group(nu.name, "fire") ~= 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
if minetest.is_protected(pointed_thing.above, pname) then
|
if minetest.is_protected(pointed_thing.above, pname) then
|
||||||
minetest.record_protection_violation(pointed_thing.above, pname)
|
minetest.record_protection_violation(pointed_thing.above, pname)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if n.name == "air" then
|
||||||
local n_pointed = minetest.get_node(pointed_thing.under)
|
|
||||||
if allow_on_fire == false and get_item_group(n_pointed.name, "fire") ~= 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local n_fire_pos = minetest.get_node(pointed_thing.above)
|
|
||||||
if n_fire_pos.name ~= "air" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local n_below = minetest.get_node(vector.offset(pointed_thing.above, 0, -1, 0))
|
|
||||||
if minetest.get_item_group(n_below.name, "water") ~= 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
add_node(pointed_thing.above, {name="mcl_fire:fire"})
|
add_node(pointed_thing.above, {name="mcl_fire:fire"})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
label = "Smoke particles from fire",
|
label = "Smoke particles from fire",
|
||||||
|
|
|
@ -427,7 +427,6 @@ minetest.register_node("mcl_flowers:waterlily", {
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
tiles = {"flowers_waterlily.png", "flowers_waterlily.png^[transformFY"},
|
tiles = {"flowers_waterlily.png", "flowers_waterlily.png^[transformFY"},
|
||||||
color = "#208030",
|
|
||||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||||
inventory_image = "flowers_waterlily.png",
|
inventory_image = "flowers_waterlily.png",
|
||||||
wield_image = "flowers_waterlily.png",
|
wield_image = "flowers_waterlily.png",
|
||||||
|
|
|
@ -11,9 +11,6 @@ White Tulip=
|
||||||
Allium=
|
Allium=
|
||||||
Azure Bluet=
|
Azure Bluet=
|
||||||
Blue Orchid=
|
Blue Orchid=
|
||||||
Wither Rose=
|
|
||||||
Lily of the Valley=
|
|
||||||
Cornflower=
|
|
||||||
Tall Grass=
|
Tall Grass=
|
||||||
Tall grass is a small plant which often occurs on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high.=
|
Tall grass is a small plant which often occurs on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high.=
|
||||||
Fern=
|
Fern=
|
||||||
|
|
|
@ -66,15 +66,3 @@ mcl_flowers.register_simple_flower("wither_rose", {
|
||||||
selection_box = { -3/16, -0.5, -3/16, 3/16, 6/16, 3/16 },
|
selection_box = { -3/16, -0.5, -3/16, 3/16, 6/16, 3/16 },
|
||||||
potted = true,
|
potted = true,
|
||||||
})
|
})
|
||||||
mcl_flowers.register_simple_flower("lily_of_the_valley", {
|
|
||||||
desc = S("Lily of the Valley"),
|
|
||||||
image = "mcl_flowers_lily_of_the_valley.png",
|
|
||||||
selection_box = { -5/16, -0.5, -5/16, 4/16, 5/16, 5/16 },
|
|
||||||
potted = true,
|
|
||||||
})
|
|
||||||
mcl_flowers.register_simple_flower("cornflower", {
|
|
||||||
desc = S("Cornflower"),
|
|
||||||
image = "mcl_flowers_cornflower.png",
|
|
||||||
selection_box = { -4/16, -0.5, -4/16, 4/16, 3/16, 4/16 },
|
|
||||||
potted = true,
|
|
||||||
})
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ local function update_map_texture (self, staticdata)
|
||||||
self.object:set_properties({ textures = { texture } })
|
self.object:set_properties({ textures = { texture } })
|
||||||
end)
|
end)
|
||||||
if result ~= nil and result == false then
|
if result ~= nil and result == false then
|
||||||
minetest.log("error", "[mcl_itemframes] Error setting up Map Item.")
|
mintest.log("error", "[mcl_itemframes] Error setting up Map Item.")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -92,15 +92,13 @@ local l_def = {
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
drawtype = "allfaces_optional",
|
drawtype = "allfaces_optional",
|
||||||
waving = 2,
|
waving = 2,
|
||||||
|
place_param2 = 1, -- Prevent leafdecay for placed nodes
|
||||||
tiles = {"mcl_mangrove_leaves.png"},
|
tiles = {"mcl_mangrove_leaves.png"},
|
||||||
color = "#48B518",
|
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "color",
|
|
||||||
palette = "mcl_core_palette_foliage.png",
|
|
||||||
groups = {
|
groups = {
|
||||||
handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1,
|
handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1,
|
||||||
flammable = 2, fire_encouragement = 30, fire_flammability = 60,
|
flammable = 2, fire_encouragement = 30, fire_flammability = 60,
|
||||||
leaves = 1, deco_block = 1, compostability = 30, foliage_palette = 1
|
leaves = 1, deco_block = 1, compostability = 30
|
||||||
},
|
},
|
||||||
drop = get_drops(0),
|
drop = get_drops(0),
|
||||||
_mcl_shears_drop = true,
|
_mcl_shears_drop = true,
|
||||||
|
@ -109,24 +107,13 @@ local l_def = {
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
_mcl_fortune_drop = { get_drops(1), get_drops(2), get_drops(3), get_drops(4) },
|
_mcl_fortune_drop = { get_drops(1), get_drops(2), get_drops(3), get_drops(4) },
|
||||||
on_construct = function(pos)
|
|
||||||
local node = minetest.get_node(pos)
|
|
||||||
if node.param2 == 0 or node.param2 == 1 then -- Check if param2 is 1 as well, since the schematics accidentally have the param2 of mangrove leaves be 1.
|
|
||||||
local new_node = mcl_core.get_foliage_block_type(pos)
|
|
||||||
if new_node.param2 ~= 0 then
|
|
||||||
minetest.swap_node(pos, new_node)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
after_place_node = function(pos)
|
|
||||||
mcl_core.make_player_leaves(pos) -- Leaves placed by the player should always be player leaves.
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
minetest.register_node("mcl_mangrove:mangroveleaves", l_def)
|
minetest.register_node("mcl_mangrove:mangroveleaves", l_def)
|
||||||
|
|
||||||
local o_def = table.copy(l_def)
|
local o_def = table.copy(l_def)
|
||||||
o_def._doc_items_create_entry = false
|
o_def._doc_items_create_entry = false
|
||||||
|
o_def.place_param2 = nil
|
||||||
o_def.groups.not_in_creative_inventory = 1
|
o_def.groups.not_in_creative_inventory = 1
|
||||||
o_def.groups.orphan_leaves = 1
|
o_def.groups.orphan_leaves = 1
|
||||||
o_def._mcl_shears_drop = {"mcl_mangrove:mangroveleaves"}
|
o_def._mcl_shears_drop = {"mcl_mangrove:mangroveleaves"}
|
||||||
|
@ -311,7 +298,7 @@ mcl_flowerpots.register_potted_flower("mcl_mangrove:propagule", {
|
||||||
image = "mcl_mangrove_propagule.png",
|
image = "mcl_mangrove_propagule.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
local water_tex = "default_water_source_animated.png^[verticalframe:16:0^[multiply:#3F76E4"
|
local water_tex = "default_water_source_animated.png^[verticalframe:16:0"
|
||||||
|
|
||||||
local wlroots = {
|
local wlroots = {
|
||||||
description = S("water logged mangrove roots"),
|
description = S("water logged mangrove roots"),
|
||||||
|
@ -363,7 +350,7 @@ local rwlroots = table.copy(wlroots)
|
||||||
-- FIXME luacheck complains that this is a repeated definition of water_tex.
|
-- FIXME luacheck complains that this is a repeated definition of water_tex.
|
||||||
-- Maybe the tiles definition below should be replaced with the animated tile
|
-- Maybe the tiles definition below should be replaced with the animated tile
|
||||||
-- definition as per above?
|
-- definition as per above?
|
||||||
water_tex = "default_water_source_animated.png^[verticalframe:16:0^[multiply:#0084FF"
|
water_tex = "default_river_water_source_animated.png^[verticalframe:16:0"
|
||||||
rwlroots.tiles = {
|
rwlroots.tiles = {
|
||||||
"("..water_tex..")^mcl_mangrove_roots_top.png",
|
"("..water_tex..")^mcl_mangrove_roots_top.png",
|
||||||
"("..water_tex..")^mcl_mangrove_roots_side.png",
|
"("..water_tex..")^mcl_mangrove_roots_side.png",
|
||||||
|
@ -562,7 +549,6 @@ minetest.register_abm({
|
||||||
local nn = minetest.find_nodes_in_area(vector.offset(pos,0,-1,0),vector.offset(pos,0,h,0),{"group:water","air"})
|
local nn = minetest.find_nodes_in_area(vector.offset(pos,0,-1,0),vector.offset(pos,0,h,0),{"group:water","air"})
|
||||||
if #nn >= h then
|
if #nn >= h then
|
||||||
minetest.place_schematic(pos, path, "random", function()
|
minetest.place_schematic(pos, path, "random", function()
|
||||||
mcl_core.update_sapling_foliage_colors(pos)
|
|
||||||
local nnv = minetest.find_nodes_in_area(vector.offset(pos,-5,-1,-5),vector.offset(pos,5,h/2,5),{"mcl_core:vine"})
|
local nnv = minetest.find_nodes_in_area(vector.offset(pos,-5,-1,-5),vector.offset(pos,5,h/2,5),{"mcl_core:vine"})
|
||||||
minetest.bulk_set_node(nnv,{"air"})
|
minetest.bulk_set_node(nnv,{"air"})
|
||||||
end, true, "place_center_x, place_center_z")
|
end, true, "place_center_x, place_center_z")
|
||||||
|
@ -572,7 +558,6 @@ minetest.register_abm({
|
||||||
if r > 3 then h = 18 end
|
if r > 3 then h = 18 end
|
||||||
if mcl_core.check_growth_width(pos,w,h) then
|
if mcl_core.check_growth_width(pos,w,h) then
|
||||||
minetest.place_schematic(pos, path, "random", nil, true, "place_center_x, place_center_z")
|
minetest.place_schematic(pos, path, "random", nil, true, "place_center_x, place_center_z")
|
||||||
mcl_core.update_sapling_foliage_colors(pos)
|
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
})
|
})
|
||||||
|
|
|
@ -24,7 +24,7 @@ minetest.mkdir(map_textures_path)
|
||||||
|
|
||||||
local function load_json_file(name)
|
local function load_json_file(name)
|
||||||
local file = assert(io.open(modpath .. "/" .. name .. ".json", "r"))
|
local file = assert(io.open(modpath .. "/" .. name .. ".json", "r"))
|
||||||
local data = minetest.parse_json(file:read("*all"))
|
local data = minetest.parse_json(file:read())
|
||||||
file:close()
|
file:close()
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
|
|
|
@ -413,7 +413,7 @@ minetest.register_craftitem("mcl_mobitems:glow_ink_sac", {
|
||||||
description = S("Glow Ink Sac"),
|
description = S("Glow Ink Sac"),
|
||||||
_doc_items_longdesc = S("Use it to craft the Glow Item Frame."),
|
_doc_items_longdesc = S("Use it to craft the Glow Item Frame."),
|
||||||
_doc_items_usagehelp = S("Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame."),
|
_doc_items_usagehelp = S("Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame."),
|
||||||
inventory_image = "mcl_mobitems_glow_ink_sac.png",
|
inventory_image = "extra_mobs_glow_ink_sac.png",
|
||||||
groups = { craftitem = 1 },
|
groups = { craftitem = 1 },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -317,9 +317,7 @@ minetest.register_node("mcl_mobspawners:spawner", {
|
||||||
if obj then
|
if obj then
|
||||||
obj:remove()
|
obj:remove()
|
||||||
end
|
end
|
||||||
if not minetest.is_creative_enabled(name) then
|
|
||||||
mcl_experience.throw_xp(pos, math.random(15, 43))
|
mcl_experience.throw_xp(pos, math.random(15, 43))
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_punch = function(pos)
|
on_punch = function(pos)
|
||||||
|
|
|
@ -25,7 +25,9 @@ local mt_get_node = minetest.get_node
|
||||||
local mt_get_node_level = minetest.get_node_level
|
local mt_get_node_level = minetest.get_node_level
|
||||||
local mt_get_node_max_level = minetest.get_node_max_level
|
local mt_get_node_max_level = minetest.get_node_max_level
|
||||||
local mt_get_node_or_nil = minetest.get_node_or_nil
|
local mt_get_node_or_nil = minetest.get_node_or_nil
|
||||||
|
local mt_get_node_timer = minetest.get_node_timer
|
||||||
local mt_get_meta = minetest.get_meta
|
local mt_get_meta = minetest.get_meta
|
||||||
|
local mt_hash_node_position = minetest.hash_node_position
|
||||||
local mt_set_node = minetest.set_node
|
local mt_set_node = minetest.set_node
|
||||||
local mt_swap_node = minetest.swap_node
|
local mt_swap_node = minetest.swap_node
|
||||||
local mt_pos_to_string = minetest.pos_to_string
|
local mt_pos_to_string = minetest.pos_to_string
|
||||||
|
@ -50,11 +52,18 @@ local table = table
|
||||||
local kelp = {}
|
local kelp = {}
|
||||||
mcl_ocean.kelp = kelp
|
mcl_ocean.kelp = kelp
|
||||||
|
|
||||||
-- Once reach the maximum, kelp no longer grows.
|
-- Kelp minimum and maximum age. Once reached the maximum, kelp no longer grows.
|
||||||
kelp.MIN_AGE = 0
|
kelp.MIN_AGE = 0
|
||||||
kelp.MAX_AGE = 25
|
kelp.MAX_AGE = 25
|
||||||
|
|
||||||
kelp.TICK = 0.2 -- Tick interval (in seconds) for updating kelp.
|
-- Tick interval (in seconds) for updating kelp.
|
||||||
|
kelp.TICK = 0.2
|
||||||
|
|
||||||
|
-- Tick interval (in seconds) to store kelp meta.
|
||||||
|
kelp.META_TICK = 2
|
||||||
|
|
||||||
|
-- Max age queue length
|
||||||
|
kelp.MAX_AGE_QUEUE = 20
|
||||||
|
|
||||||
-- The average amount of growth for kelp in a day is 2.16 (https://youtu.be/5Bp4lAjAk3I)
|
-- The average amount of growth for kelp in a day is 2.16 (https://youtu.be/5Bp4lAjAk3I)
|
||||||
-- Normally, a day lasts 20 minutes, meaning kelp.next_grow() is executed
|
-- Normally, a day lasts 20 minutes, meaning kelp.next_grow() is executed
|
||||||
|
@ -72,6 +81,19 @@ kelp.ROLL_GROWTH_DENOMINATOR = 100 * 1200
|
||||||
-- Sounds used to dig and place kelp.
|
-- Sounds used to dig and place kelp.
|
||||||
kelp.leaf_sounds = mcl_sounds.node_sound_leaves_defaults()
|
kelp.leaf_sounds = mcl_sounds.node_sound_leaves_defaults()
|
||||||
|
|
||||||
|
-- Pool storing nodetimers
|
||||||
|
kelp.timers_pool = {}
|
||||||
|
|
||||||
|
-- Pool storing age, indexed by pos_hash.
|
||||||
|
kelp.age_pool = {}
|
||||||
|
|
||||||
|
-- Queue(List) of hashed positions to save their ages.
|
||||||
|
-- Invalid ones may still persist in this queue.
|
||||||
|
kelp.age_queue = {}
|
||||||
|
-- Stores only valid positions of each hashed postiions.
|
||||||
|
kelp.age_queue_pos = {}
|
||||||
|
|
||||||
|
|
||||||
-- is age in the growable range?
|
-- is age in the growable range?
|
||||||
function kelp.is_age_growable(age)
|
function kelp.is_age_growable(age)
|
||||||
return age >= 0 and age < kelp.MAX_AGE
|
return age >= 0 and age < kelp.MAX_AGE
|
||||||
|
@ -155,8 +177,7 @@ end
|
||||||
-- Roll whether to grow kelp or not.
|
-- Roll whether to grow kelp or not.
|
||||||
function kelp.roll_growth(numerator, denominator)
|
function kelp.roll_growth(numerator, denominator)
|
||||||
-- Optional params: numerator, denominator
|
-- Optional params: numerator, denominator
|
||||||
--return math.random(denominator or kelp.ROLL_GROWTH_DENOMINATOR) <= (numerator or kelp.ROLL_GROWTH_NUMERATOR)
|
return math.random(denominator or kelp.ROLL_GROWTH_DENOMINATOR) <= (numerator or kelp.ROLL_GROWTH_NUMERATOR)
|
||||||
return true -- probability done by ABM
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -209,50 +230,87 @@ function kelp.next_param2(param2)
|
||||||
return math.min(param2+16 - param2 % 16, 255);
|
return math.min(param2+16 - param2 % 16, 255);
|
||||||
end
|
end
|
||||||
|
|
||||||
local function store_age (pos, age)
|
|
||||||
|
-- Stores age from kelp.age_queue* into their respective meta
|
||||||
|
function kelp.store_meta()
|
||||||
|
local count = 0
|
||||||
|
for _ in pairs(kelp.age_queue_pos) do
|
||||||
|
count = count + 1
|
||||||
|
end
|
||||||
|
-- chatlog(string.format("Storing age metadata: %d in queue", #kelp.age_queue))
|
||||||
|
-- chatlog(string.format("Storing age metadata: %d valid in queue", count))
|
||||||
|
for i=1,#kelp.age_queue do
|
||||||
|
local pos_hash = kelp.age_queue[i]
|
||||||
|
local pos = kelp.age_queue_pos[pos_hash]
|
||||||
|
-- queued hashes may no longer point to a valid pos, e.g. kelp is destroyed.
|
||||||
if pos then
|
if pos then
|
||||||
--minetest.log("age: ".. tostring(age) .. ", pos: ".. mt_pos_to_string(pos))
|
mt_get_meta(pos):set_int("mcl_ocean:kelp_age", kelp.age_pool[pos_hash])
|
||||||
mt_get_meta(pos):set_int("mcl_ocean:kelp_age", age)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
kelp.age_queue = {}
|
||||||
|
kelp.age_queue_pos = {}
|
||||||
|
end
|
||||||
|
|
||||||
local function retrieve_age (pos, include_nil)
|
|
||||||
local meta = mt_get_meta(pos)
|
|
||||||
|
|
||||||
if include_nil then
|
-- Store and queue a kelp's age to be saved into meta later.
|
||||||
local age_set = meta:contains("mcl_ocean:kelp_age")
|
function kelp.store_age(age, pos, pos_hash)
|
||||||
if not age_set then
|
-- Watched params: pos
|
||||||
return nil
|
-- Optional params: pos_hash
|
||||||
|
local pos_hash = pos_hash or mt_hash_node_position(pos)
|
||||||
|
|
||||||
|
kelp.age_pool[pos_hash] = age
|
||||||
|
if not kelp.age_queue_pos[pos_hash] then
|
||||||
|
table.insert(kelp.age_queue, pos_hash)
|
||||||
|
kelp.age_queue_pos[pos_hash] = pos
|
||||||
|
return true, pos_hash
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return false, pos_hash
|
||||||
end
|
end
|
||||||
return meta:get_int("mcl_ocean:kelp_age")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Initialise a kelp's age.
|
-- Initialise a kelp's age.
|
||||||
function kelp.init_age(pos, age, from_lbm)
|
function kelp.init_age(pos, age, pos_hash, meta)
|
||||||
-- Watched params: pos
|
-- Watched params: pos
|
||||||
-- Optional params: age, from_lbm
|
-- Optional params: age, pos_hash, meta
|
||||||
|
local pos_hash = pos_hash or mt_hash_node_position(pos)
|
||||||
local new_age
|
local meta = meta or mt_get_meta(pos)
|
||||||
|
|
||||||
local stored_age = retrieve_age(pos, from_lbm)
|
|
||||||
|
|
||||||
|
local age = age
|
||||||
if age then
|
if age then
|
||||||
--minetest.log("age: " .. tostring(age))
|
kelp.store_age(age, pos, pos_hash)
|
||||||
store_age(pos, age)
|
elseif not meta:contains("mcl_ocean:kelp_age") then
|
||||||
new_age = age
|
age = kelp.roll_init_age()
|
||||||
elseif not stored_age then
|
kelp.store_age(age, pos, pos_hash)
|
||||||
new_age = kelp.roll_init_age()
|
|
||||||
--minetest.log("no kelp age set so init with: " .. tostring(new_age))
|
|
||||||
store_age(pos, new_age)
|
|
||||||
else
|
else
|
||||||
--minetest.log("stored_age: " .. tostring(stored_age))
|
age = meta:get_int("mcl_ocean:kelp_age")
|
||||||
new_age = stored_age
|
if not kelp.age_pool[pos_hash] then
|
||||||
|
kelp.age_pool[pos_hash] = age
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return new_age
|
return age, pos_hash, meta
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Initialise kelp nodetimer.
|
||||||
|
function kelp.init_timer(pos, pos_hash)
|
||||||
|
-- Optional params: pos_hash
|
||||||
|
local pos_hash = pos_hash or mt_hash_node_position(pos)
|
||||||
|
|
||||||
|
local timer = kelp.timers_pool[pos_hash]
|
||||||
|
if not timer then
|
||||||
|
timer = mt_get_node_timer(pos)
|
||||||
|
kelp.timers_pool[pos_hash] = timer
|
||||||
|
end
|
||||||
|
if not timer:is_started() then
|
||||||
|
timer:start(kelp.TICK)
|
||||||
|
end
|
||||||
|
|
||||||
|
return pos_hash
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Apply next kelp height. The surface is swapped. so on_construct is skipped.
|
-- Apply next kelp height. The surface is swapped. so on_construct is skipped.
|
||||||
function kelp.next_height(pos, node, pos_tip, node_tip, submerged, downward_flowing)
|
function kelp.next_height(pos, node, pos_tip, node_tip, submerged, downward_flowing)
|
||||||
-- Modified params: node
|
-- Modified params: node
|
||||||
|
@ -284,11 +342,12 @@ end
|
||||||
|
|
||||||
|
|
||||||
-- Grow next kelp.
|
-- Grow next kelp.
|
||||||
function kelp.next_grow(age, pos, node, pos_tip, node_tip, submerged, downward_flowing)
|
function kelp.next_grow(age, pos, node, pos_hash, pos_tip, node_tip, submerged, downward_flowing)
|
||||||
-- Watched params: pos
|
-- Watched params: pos
|
||||||
-- Modified params: node
|
-- Modified params: node
|
||||||
-- Optional params: node, pos_tip, node_tip, submerged, downward_flowing
|
-- Optional params: node, pos_hash, pos_tip, node_tip, submerged, downward_flowing
|
||||||
local node = node or mt_get_node(pos)
|
local node = node or mt_get_node(pos)
|
||||||
|
local pos_hash = pos_hash or mt_hash_node_position(pos)
|
||||||
local pos_tip = pos_tip
|
local pos_tip = pos_tip
|
||||||
local node_tip = node_tip or (pos_tip and mt_get_node(pos_tip))
|
local node_tip = node_tip or (pos_tip and mt_get_node(pos_tip))
|
||||||
if not pos_tip then
|
if not pos_tip then
|
||||||
|
@ -302,8 +361,8 @@ function kelp.next_grow(age, pos, node, pos_tip, node_tip, submerged, downward_f
|
||||||
end
|
end
|
||||||
|
|
||||||
kelp.next_height(pos, node, pos_tip, node_tip, submerged, downward_flowing)
|
kelp.next_height(pos, node, pos_tip, node_tip, submerged, downward_flowing)
|
||||||
store_age(pos, age)
|
|
||||||
return true, node, pos_tip, node_tip, submerged, downward_flowing
|
return kelp.store_age(age, pos, pos_hash), node, pos_hash, pos_tip, node_tip, submerged, downward_flowing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -361,68 +420,75 @@ function kelp.surface_on_dig(pos, node, digger)
|
||||||
kelp.detach_dig(pos, pos, true, node)
|
kelp.detach_dig(pos, pos, true, node)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function kelp.surface_after_dig_node(pos, node)
|
function kelp.surface_after_dig_node(pos, node)
|
||||||
return mt_set_node(pos, {name=minetest.registered_nodes[node.name].node_dig_prediction})
|
return mt_set_node(pos, {name=minetest.registered_nodes[node.name].node_dig_prediction})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function detach_unsubmerged(pos)
|
function kelp.surface_on_timer(pos)
|
||||||
local node = mt_get_node(pos)
|
local node = mt_get_node(pos)
|
||||||
|
local pos_hash
|
||||||
|
|
||||||
|
-- Update detahed kelps
|
||||||
local dig_pos,_, height = kelp.find_unsubmerged(pos, node)
|
local dig_pos,_, height = kelp.find_unsubmerged(pos, node)
|
||||||
if dig_pos then
|
if dig_pos then
|
||||||
|
pos_hash = mt_hash_node_position(pos)
|
||||||
mt_sound_play(mt_registered_nodes[node.name].sounds.dug, { gain = 0.5, pos = dig_pos }, true)
|
mt_sound_play(mt_registered_nodes[node.name].sounds.dug, { gain = 0.5, pos = dig_pos }, true)
|
||||||
kelp.detach_dig(dig_pos, pos, true, node, height)
|
kelp.detach_dig(dig_pos, pos, true, node, height)
|
||||||
local new_age = kelp.roll_init_age()
|
kelp.store_age(kelp.roll_init_age(), pos, pos_hash)
|
||||||
store_age(pos, new_age)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function grow_kelp (pos)
|
-- Grow kelp on chance
|
||||||
local node = mt_get_node(pos)
|
|
||||||
|
|
||||||
if kelp.roll_growth() then
|
if kelp.roll_growth() then
|
||||||
local age = retrieve_age(pos)
|
pos_hash = pos_hash or mt_hash_node_position(pos)
|
||||||
|
local age = kelp.age_pool[pos_hash]
|
||||||
if not age then
|
|
||||||
--minetest.log("init a new age as not set: " .. mt_pos_to_string(pos))
|
|
||||||
kelp.init_age(pos, nil)
|
|
||||||
end
|
|
||||||
|
|
||||||
if kelp.is_age_growable(age) then
|
if kelp.is_age_growable(age) then
|
||||||
--minetest.log("age growable: ".. tostring(age) .. ", pos: ".. mt_pos_to_string(pos))
|
kelp.next_grow(age+1, pos, node, pos_hash)
|
||||||
kelp.next_grow(age+1, pos, node)
|
|
||||||
else
|
|
||||||
--minetest.log("age not: ".. tostring(age) .. ", pos: ".. mt_pos_to_string(pos))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function kelp.surface_on_construct(pos)
|
function kelp.surface_on_construct(pos)
|
||||||
--minetest.log("on construct kelp called")
|
local pos_hash = mt_hash_node_position(pos)
|
||||||
kelp.init_age(pos, nil)
|
kelp.init_age(pos, nil, pos_hash)
|
||||||
|
kelp.init_timer(pos, pos_hash)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function kelp.surface_on_destruct(pos)
|
function kelp.surface_on_destruct(pos)
|
||||||
local node = mt_get_node(pos)
|
local node = mt_get_node(pos)
|
||||||
|
local pos_hash = mt_hash_node_position(pos)
|
||||||
|
|
||||||
-- on_falling callback. Activated by pistons for falling nodes too.
|
-- on_falling callback. Activated by pistons for falling nodes too.
|
||||||
-- I'm not sure this works. I think piston digs water and the unsubmerged nature drops kelp.
|
|
||||||
if kelp.is_falling(pos, node) then
|
if kelp.is_falling(pos, node) then
|
||||||
kelp.detach_drop(pos, kelp.get_height(node.param2))
|
kelp.detach_drop(pos, kelp.get_height(node.param2))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Removes position from queue
|
||||||
|
kelp.age_queue_pos[pos_hash] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function kelp.surface_on_mvps_move(pos, node, oldpos, nodemeta)
|
function kelp.surface_on_mvps_move(pos, node, oldpos, nodemeta)
|
||||||
-- Pistons moving falling nodes will have already activated on_falling callback.
|
-- Pistons moving falling nodes will have already activated on_falling callback.
|
||||||
--minetest.log("kelp.surface_on_mvps_move: " .. mt_pos_to_string(pos))
|
|
||||||
kelp.detach_dig(pos, pos, mt_get_item_group(node.name, "falling_node") ~= 1, node)
|
kelp.detach_dig(pos, pos, mt_get_item_group(node.name, "falling_node") ~= 1, node)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- NOTE: Old ABM implementation.
|
||||||
|
-- local function surface_unsubmerged_abm(pos, node)
|
||||||
|
-- local dig_pos = find_unsubmerged(pos, node)
|
||||||
|
-- if dig_pos then
|
||||||
|
-- detach_dig(dig_pos, pos, node, true)
|
||||||
|
-- end
|
||||||
|
-- return true
|
||||||
|
-- end
|
||||||
|
|
||||||
|
|
||||||
function kelp.kelp_on_place(itemstack, placer, pointed_thing)
|
function kelp.kelp_on_place(itemstack, placer, pointed_thing)
|
||||||
if pointed_thing.type ~= "node" or not placer then
|
if pointed_thing.type ~= "node" or not placer then
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -510,29 +576,48 @@ function kelp.kelp_on_place(itemstack, placer, pointed_thing)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Initialize age and timer when it's planted on a new surface.
|
-- Initialize age and timer when it's planted on a new surface.
|
||||||
local init_age = kelp.roll_init_age()
|
local pos_hash = mt_hash_node_position(pos_under)
|
||||||
|
|
||||||
if new_surface then
|
if new_surface then
|
||||||
kelp.init_age(pos_under, init_age)
|
kelp.init_age(pos_under, nil, pos_hash)
|
||||||
|
kelp.init_timer(pos_under, pos_hash)
|
||||||
else
|
else
|
||||||
store_age(pos_under, init_age)
|
kelp.store_age(kelp.roll_init_age(), pos_under, pos_hash)
|
||||||
end
|
end
|
||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
function kelp.lbm_register(pos)
|
|
||||||
kelp.init_age(pos, nil, true)
|
function kelp.lbm_register_nodetimer(pos, node)
|
||||||
|
local pos_hash = mt_hash_node_position(pos)
|
||||||
|
kelp.init_age(pos, nil, pos_hash)
|
||||||
|
kelp.init_timer(pos, pos_hash)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_lbm({
|
|
||||||
label = "Kelp initialise",
|
|
||||||
name = "mcl_ocean:kelp_init",
|
|
||||||
nodenames = { "group:kelp" },
|
|
||||||
run_at_every_load = true, -- so old kelps are also initialised
|
|
||||||
action = kelp.lbm_register,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
local gstep_time = 0
|
||||||
|
function kelp.globalstep(dtime)
|
||||||
|
if #kelp.age_queue > kelp.MAX_AGE_QUEUE then
|
||||||
|
kelp.store_meta()
|
||||||
|
end
|
||||||
|
|
||||||
|
gstep_time = gstep_time + dtime
|
||||||
|
if gstep_time < kelp.META_TICK then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
gstep_time = 0
|
||||||
|
|
||||||
|
if #kelp.age_queue > 0 then
|
||||||
|
kelp.store_meta()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function kelp.on_shutdown()
|
||||||
|
if #kelp.age_queue > 0 then
|
||||||
|
kelp.store_meta()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Kelp registration API
|
-- Kelp registration API
|
||||||
|
@ -579,6 +664,7 @@ kelp.surface_deftemplate = {
|
||||||
on_destruct = kelp.surface_on_destruct,
|
on_destruct = kelp.surface_on_destruct,
|
||||||
on_dig = kelp.surface_on_dig,
|
on_dig = kelp.surface_on_dig,
|
||||||
after_dig_node = kelp.surface_after_dig_node,
|
after_dig_node = kelp.surface_after_dig_node,
|
||||||
|
on_timer = kelp.surface_on_timer,
|
||||||
mesecon = { on_mvps_move = kelp.surface_on_mvps_move, },
|
mesecon = { on_mvps_move = kelp.surface_on_mvps_move, },
|
||||||
drop = "", -- drops are handled in on_dig
|
drop = "", -- drops are handled in on_dig
|
||||||
--_mcl_falling_node_alternative = is_falling and nodename or nil,
|
--_mcl_falling_node_alternative = is_falling and nodename or nil,
|
||||||
|
@ -725,28 +811,35 @@ minetest.register_craft({
|
||||||
burntime = 200,
|
burntime = 200,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_abm({
|
-- Global registration ------------------------------------------------------------------------
|
||||||
label = "Kelp drops",
|
|
||||||
|
minetest.register_lbm({
|
||||||
|
label = "Kelp initialise",
|
||||||
|
name = "mcl_ocean:kelp_init",
|
||||||
nodenames = { "group:kelp" },
|
nodenames = { "group:kelp" },
|
||||||
interval = 1.0,
|
run_at_every_load = true, -- so old kelps are also initialised
|
||||||
chance = 1,
|
action = kelp.lbm_register_nodetimer,
|
||||||
catch_up = false,
|
|
||||||
action = detach_unsubmerged, --surface_unsubmerged_abm,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- 50% growth over a minute https://minecraft.fandom.com/wiki/Tutorials/Kelp_farming
|
minetest.register_globalstep(kelp.globalstep)
|
||||||
-- 14% chance every random tick
|
minetest.register_on_shutdown(kelp.on_shutdown)
|
||||||
-- On average, blocks are updated every 68.27 seconds (1365.33 game ticks)
|
|
||||||
-- 1 in 7 every 68
|
-- NOTE: Old ABM implementation.
|
||||||
-- 1 in 28 every 17
|
-- minetest.register_abm({
|
||||||
-- 1 in 21 every 22
|
-- label = "Kelp drops",
|
||||||
-- https://minecraft.fandom.com/wiki/Tick#Random_tick
|
-- nodenames = { "group:kelp" },
|
||||||
minetest.register_abm({
|
-- interval = 1.0,
|
||||||
label = "Kelp growth",
|
-- chance = 1,
|
||||||
nodenames = { "group:kelp" },
|
-- catch_up = false,
|
||||||
interval = 17, --17
|
-- action = surface_unsubmerged_abm,
|
||||||
chance = 28,
|
-- })
|
||||||
catch_up = false,
|
--
|
||||||
action = grow_kelp,
|
-- minetest.register_abm({
|
||||||
})
|
-- label = "Kelp growth",
|
||||||
|
-- nodenames = { "group:kelp" },
|
||||||
|
-- interval = 45,
|
||||||
|
-- chance = 12,
|
||||||
|
-- catch_up = false,
|
||||||
|
-- action = grow_abm,
|
||||||
|
-- })
|
||||||
|
|
|
@ -98,22 +98,22 @@ mcl_signs.register_sign_craft("mcl_core", "mcl_core:wood", "")
|
||||||
|
|
||||||
-- birchwood Sign "#d5cb8d" / "#ffdba7"
|
-- birchwood Sign "#d5cb8d" / "#ffdba7"
|
||||||
mcl_signs.register_sign_custom("mcl_core", "_birchwood",
|
mcl_signs.register_sign_custom("mcl_core", "_birchwood",
|
||||||
"mcl_signs_sign_greyscale.png","#ffdba7", "mcl_signs_default_sign_greyscale.png",
|
"mcl_signs_sign_greyscale.png","#ffdba7", "default_sign_greyscale.png",
|
||||||
"mcl_signs_default_sign_greyscale.png", "Birch Sign"
|
"default_sign_greyscale.png", "Birch Sign"
|
||||||
)
|
)
|
||||||
mcl_signs.register_sign_craft("mcl_core", "mcl_core:birchwood", "_birchwood")
|
mcl_signs.register_sign_craft("mcl_core", "mcl_core:birchwood", "_birchwood")
|
||||||
|
|
||||||
-- sprucewood Sign
|
-- sprucewood Sign
|
||||||
mcl_signs.register_sign_custom("mcl_core", "_sprucewood",
|
mcl_signs.register_sign_custom("mcl_core", "_sprucewood",
|
||||||
"mcl_signs_sign_dark.png","#ffffff", "mcl_signs_default_sign_dark.png",
|
"mcl_signs_sign_dark.png","#ffffff", "default_sign_dark.png",
|
||||||
"mcl_signs_default_sign_dark.png", "Spruce Sign"
|
"default_sign_dark.png", "Spruce Sign"
|
||||||
)
|
)
|
||||||
mcl_signs.register_sign_craft("mcl_core", "mcl_core:sprucewood", "_sprucewood")
|
mcl_signs.register_sign_craft("mcl_core", "mcl_core:sprucewood", "_sprucewood")
|
||||||
|
|
||||||
-- darkwood Sign "#291f1a" / "#856443"
|
-- darkwood Sign "#291f1a" / "#856443"
|
||||||
mcl_signs.register_sign_custom("mcl_core", "_darkwood",
|
mcl_signs.register_sign_custom("mcl_core", "_darkwood",
|
||||||
"mcl_signs_sign_greyscale.png","#856443", "mcl_signs_default_sign_greyscale.png",
|
"mcl_signs_sign_greyscale.png","#856443", "default_sign_greyscale.png",
|
||||||
"mcl_signs_default_sign_greyscale.png", "Dark Oak Sign"
|
"default_sign_greyscale.png", "Dark Oak Sign"
|
||||||
)
|
)
|
||||||
mcl_signs.register_sign_craft("mcl_core", "mcl_core:darkwood", "_darkwood")
|
mcl_signs.register_sign_craft("mcl_core", "mcl_core:darkwood", "_darkwood")
|
||||||
|
|
||||||
|
@ -136,13 +136,13 @@ if minetest.get_modpath("mcl_crimson") then
|
||||||
|
|
||||||
-- warped_hyphae_wood Sign
|
-- warped_hyphae_wood Sign
|
||||||
mcl_signs.register_sign_custom("mcl_crimson","_warped_hyphae_wood", "mcl_signs_sign_greyscale.png",
|
mcl_signs.register_sign_custom("mcl_crimson","_warped_hyphae_wood", "mcl_signs_sign_greyscale.png",
|
||||||
"#9f7dcf", "mcl_signs_default_sign_greyscale.png", "mcl_signs_default_sign_greyscale.png",
|
"#9f7dcf", "default_sign_greyscale.png", "default_sign_greyscale.png",
|
||||||
"Warped Hyphae Sign")
|
"Warped Hyphae Sign")
|
||||||
mcl_signs.register_sign_craft("mcl_crimson", "mcl_crimson:warped_hyphae_wood", "_warped_hyphae_wood")
|
mcl_signs.register_sign_craft("mcl_crimson", "mcl_crimson:warped_hyphae_wood", "_warped_hyphae_wood")
|
||||||
|
|
||||||
-- crimson_hyphae_wood Sign
|
-- crimson_hyphae_wood Sign
|
||||||
mcl_signs.register_sign_custom("mcl_crimson", "_crimson_hyphae_wood","mcl_signs_sign_greyscale.png",
|
mcl_signs.register_sign_custom("mcl_crimson", "_crimson_hyphae_wood","mcl_signs_sign_greyscale.png",
|
||||||
"#c35f51","mcl_signs_default_sign_greyscale.png", "mcl_signs_default_sign_greyscale.png",
|
"#c35f51","default_sign_greyscale.png", "default_sign_greyscale.png",
|
||||||
"Crimson Hyphae Sign")
|
"Crimson Hyphae Sign")
|
||||||
mcl_signs.register_sign_craft("mcl_crimson", "mcl_crimson:crimson_hyphae_wood", "_crimson_hyphae_wood")
|
mcl_signs.register_sign_craft("mcl_crimson", "mcl_crimson:crimson_hyphae_wood", "_crimson_hyphae_wood")
|
||||||
|
|
||||||
|
|
|
@ -147,10 +147,10 @@ mcl_signs.wall_standard = {
|
||||||
_tt_help = S("Can be written"),
|
_tt_help = S("Can be written"),
|
||||||
_doc_items_longdesc = S("Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them."),
|
_doc_items_longdesc = S("Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them."),
|
||||||
_doc_items_usagehelp = S("After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again. Can be colored and made to glow."),
|
_doc_items_usagehelp = S("After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again. Can be colored and made to glow."),
|
||||||
inventory_image = "mcl_signs_default_sign.png",
|
inventory_image = "default_sign.png",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
wield_image = "mcl_signs_default_sign.png",
|
wield_image = "default_sign.png",
|
||||||
node_placement_prediction = "",
|
node_placement_prediction = "",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -552,9 +552,9 @@ function mcl_signs.register_sign (modname, color, _name, ttsign)
|
||||||
new_sign = table.copy(mcl_signs.wall_standard)
|
new_sign = table.copy(mcl_signs.wall_standard)
|
||||||
new_sign.description = S(ttsign)
|
new_sign.description = S(ttsign)
|
||||||
|
|
||||||
new_sign.wield_image = "(mcl_signs_default_sign.png^[multiply:" .. color .. ")"
|
new_sign.wield_image = "(default_sign.png^[multiply:" .. color .. ")"
|
||||||
new_sign.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" }
|
new_sign.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" }
|
||||||
new_sign.inventory_image = "(mcl_signs_default_sign.png^[multiply:" .. color .. ")"
|
new_sign.inventory_image = "(default_sign.png^[multiply:" .. color .. ")"
|
||||||
|
|
||||||
-- currently have to do this, because of how the base node placement works.
|
-- currently have to do this, because of how the base node placement works.
|
||||||
new_sign.on_place = function(itemstack, placer, pointed_thing)
|
new_sign.on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
@ -676,9 +676,9 @@ function mcl_signs.register_sign (modname, color, _name, ttsign)
|
||||||
local new_sign_standing = {}
|
local new_sign_standing = {}
|
||||||
new_sign_standing = table.copy(mcl_signs.standing_standard)
|
new_sign_standing = table.copy(mcl_signs.standing_standard)
|
||||||
new_sign_standing.drop = "mcl_signs:wall_sign" .. _name
|
new_sign_standing.drop = "mcl_signs:wall_sign" .. _name
|
||||||
new_sign_standing.wield_image = "(mcl_signs_default_sign.png^[multiply:" .. color .. ")"
|
new_sign_standing.wield_image = "(default_sign.png^[multiply:" .. color .. ")"
|
||||||
new_sign_standing.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" }
|
new_sign_standing.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" }
|
||||||
new_sign_standing.inventory_image = "(mcl_signs_default_sign.png^[multiply:" .. color .. ")"
|
new_sign_standing.inventory_image = "(default_sign.png^[multiply:" .. color .. ")"
|
||||||
|
|
||||||
new_sign_standing.on_rotate = function(pos, node, user, mode)
|
new_sign_standing.on_rotate = function(pos, node, user, mode)
|
||||||
if mode == screwdriver.ROTATE_FACE then
|
if mode == screwdriver.ROTATE_FACE then
|
||||||
|
@ -763,7 +763,7 @@ function mcl_signs.register_sign (modname, color, _name, ttsign)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- The same as register_sign, except caller defines the textures. Note, there is a greyscale version of the sign,
|
--- The same as register_sign, except caller defines the textures. Note, there is a greyscale version of the sign,
|
||||||
--- called "mcl_signs_default_sign_greyscale.png" and "mcl_signs_sign_greyscale.png" for optional use in the textures directory.
|
--- called "default_sign_greyscale.png" and "mcl_signs_sign_greyscale.png" for optional use in the textures directory.
|
||||||
---
|
---
|
||||||
--- modname: optional (pass "" or "false" to ignore), for use with other mods to
|
--- modname: optional (pass "" or "false" to ignore), for use with other mods to
|
||||||
--- allow the creation of a sign from the mod's wood (if installed).
|
--- allow the creation of a sign from the mod's wood (if installed).
|
||||||
|
@ -1015,9 +1015,9 @@ function mcl_signs.reregister_sign (modname, color, _name, ttsign)
|
||||||
new_sign = table.copy(mcl_signs.wall_standard)
|
new_sign = table.copy(mcl_signs.wall_standard)
|
||||||
new_sign.description = S(ttsign)
|
new_sign.description = S(ttsign)
|
||||||
|
|
||||||
new_sign.wield_image = "(mcl_signs_default_sign.png^[multiply:" .. color .. ")"
|
new_sign.wield_image = "(default_sign.png^[multiply:" .. color .. ")"
|
||||||
new_sign.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" }
|
new_sign.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" }
|
||||||
new_sign.inventory_image = "(mcl_signs_default_sign.png^[multiply:" .. color .. ")"
|
new_sign.inventory_image = "(default_sign.png^[multiply:" .. color .. ")"
|
||||||
|
|
||||||
-- currently have to do this, because of how the base node placement works.
|
-- currently have to do this, because of how the base node placement works.
|
||||||
new_sign.on_place = function(itemstack, placer, pointed_thing)
|
new_sign.on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
@ -1134,9 +1134,9 @@ function mcl_signs.reregister_sign (modname, color, _name, ttsign)
|
||||||
local new_sign_standing = {}
|
local new_sign_standing = {}
|
||||||
new_sign_standing = table.copy(mcl_signs.standing_standard)
|
new_sign_standing = table.copy(mcl_signs.standing_standard)
|
||||||
new_sign_standing.drop = "mcl_signs:wall_sign" .. _name
|
new_sign_standing.drop = "mcl_signs:wall_sign" .. _name
|
||||||
new_sign_standing.wield_image = "(mcl_signs_default_sign.png^[multiply:" .. color .. ")"
|
new_sign_standing.wield_image = "(default_sign.png^[multiply:" .. color .. ")"
|
||||||
new_sign_standing.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" }
|
new_sign_standing.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" }
|
||||||
new_sign_standing.inventory_image = "(mcl_signs_default_sign.png^[multiply:" .. color .. ")"
|
new_sign_standing.inventory_image = "(default_sign.png^[multiply:" .. color .. ")"
|
||||||
new_sign_standing.on_rotate = function(pos, node, user, mode)
|
new_sign_standing.on_rotate = function(pos, node, user, mode)
|
||||||
if mode == screwdriver.ROTATE_FACE then
|
if mode == screwdriver.ROTATE_FACE then
|
||||||
node.name = "mcl_signs:standing_sign22_5" .. _name
|
node.name = "mcl_signs:standing_sign22_5" .. _name
|
||||||
|
@ -1219,7 +1219,7 @@ function mcl_signs.reregister_sign (modname, color, _name, ttsign)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- The same as reregister_sign, except caller defines the textures. Note, there is a greyscale version of the sign,
|
--- The same as reregister_sign, except caller defines the textures. Note, there is a greyscale version of the sign,
|
||||||
--- called "mcl_signs_default_sign_greyscale.png" and "mcl_signs_sign_greyscale.png" for optional use in the textures directory.
|
--- called "default_sign_greyscale.png" and "mcl_signs_sign_greyscale.png" for optional use in the textures directory.
|
||||||
---
|
---
|
||||||
--- modname: optional (pass "" or "false" to ignore), for use with other mods to
|
--- modname: optional (pass "" or "false" to ignore), for use with other mods to
|
||||||
--- allow the creation of a sign from the mod's wood (if installed).
|
--- allow the creation of a sign from the mod's wood (if installed).
|
||||||
|
|
|
@ -6,10 +6,10 @@ local eat = minetest.item_eat(6, "mcl_core:bowl") --6 hunger points, player rece
|
||||||
|
|
||||||
local flower_effect = {
|
local flower_effect = {
|
||||||
[ "mcl_flowers:allium" ] = "fire_resistance",
|
[ "mcl_flowers:allium" ] = "fire_resistance",
|
||||||
[ "mcl_flowers:lily_of_the_valley" ] = "poison",
|
[ "mcl_flowers:tulip_white" ] = "poison",
|
||||||
[ "mcl_flowers:blue_orchid" ] = "hunger",
|
[ "mcl_flowers:blue_orchid" ] = "hunger",
|
||||||
[ "mcl_flowers:dandelion" ] = "hunger",
|
[ "mcl_flowers:dandelion" ] = "hunger",
|
||||||
[ "mcl_flowers:cornflower" ] = "jump",
|
[ "mcl_flowers:peony" ] = "jump",
|
||||||
[ "mcl_flowers:oxeye_daisy" ] = "regeneration",
|
[ "mcl_flowers:oxeye_daisy" ] = "regeneration",
|
||||||
[ "mcl_flowers:poppy" ] = "night_vision"
|
[ "mcl_flowers:poppy" ] = "night_vision"
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ minetest.register_craft({
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "mcl_sus_stew:stew",
|
output = "mcl_sus_stew:stew",
|
||||||
recipe = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown", "mcl_core:bowl", "mcl_flowers:lily_of_the_valley"},
|
recipe = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown", "mcl_core:bowl", "mcl_flowers:tulip_white"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -126,7 +126,7 @@ minetest.register_craft({
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "mcl_sus_stew:stew",
|
output = "mcl_sus_stew:stew",
|
||||||
recipe = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown", "mcl_core:bowl", "mcl_flowers:cornflower"},
|
recipe = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown", "mcl_core:bowl", "mcl_flowers:peony"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
|
|
@ -6,9 +6,6 @@ local source = table.copy(minetest.registered_nodes["mcl_core:water_source"])
|
||||||
source.description = S("River Water Source")
|
source.description = S("River Water Source")
|
||||||
source.liquid_range = 2
|
source.liquid_range = 2
|
||||||
source.waving = 3
|
source.waving = 3
|
||||||
source.color = "#0084FF"
|
|
||||||
source.paramtype2 = nil
|
|
||||||
source.palette = nil
|
|
||||||
source.liquid_alternative_flowing = "mclx_core:river_water_flowing"
|
source.liquid_alternative_flowing = "mclx_core:river_water_flowing"
|
||||||
source.liquid_alternative_source = "mclx_core:river_water_source"
|
source.liquid_alternative_source = "mclx_core:river_water_source"
|
||||||
source.liquid_renewable = false
|
source.liquid_renewable = false
|
||||||
|
@ -16,17 +13,40 @@ source._doc_items_longdesc = S("River water has the same properties as water, bu
|
||||||
source._doc_items_entry_name = S("River Water")
|
source._doc_items_entry_name = S("River Water")
|
||||||
-- Auto-expose entry only in valleys mapgen
|
-- Auto-expose entry only in valleys mapgen
|
||||||
source._doc_items_hidden = minetest.get_mapgen_setting("mg_name") ~= "valleys"
|
source._doc_items_hidden = minetest.get_mapgen_setting("mg_name") ~= "valleys"
|
||||||
source.post_effect_color = {a=60, r=0, g=132, b=255}
|
source.post_effect_color = {a=192, r=0x2c, g=0x88, b=0x8c}
|
||||||
|
source.tiles = {
|
||||||
|
{name="default_river_water_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=5.0}}
|
||||||
|
}
|
||||||
|
source.special_tiles = {
|
||||||
|
-- New-style water source material (mostly unused)
|
||||||
|
{
|
||||||
|
name="default_river_water_source_animated.png",
|
||||||
|
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=5.0},
|
||||||
|
backface_culling = false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
local flowing = table.copy(minetest.registered_nodes["mcl_core:water_flowing"])
|
local flowing = table.copy(minetest.registered_nodes["mcl_core:water_flowing"])
|
||||||
flowing.description = S("Flowing River Water")
|
flowing.description = S("Flowing River Water")
|
||||||
flowing.liquid_range = 2
|
flowing.liquid_range = 2
|
||||||
flowing.waving = 3
|
flowing.waving = 3
|
||||||
flowing.color = "#0084FF"
|
|
||||||
flowing.liquid_alternative_flowing = "mclx_core:river_water_flowing"
|
flowing.liquid_alternative_flowing = "mclx_core:river_water_flowing"
|
||||||
flowing.liquid_alternative_source = "mclx_core:river_water_source"
|
flowing.liquid_alternative_source = "mclx_core:river_water_source"
|
||||||
flowing.liquid_renewable = false
|
flowing.liquid_renewable = false
|
||||||
flowing.post_effect_color = {a=60, r=0, g=132, b=255}
|
flowing.tiles = {"default_river_water_flowing_animated.png^[verticalframe:64:0"}
|
||||||
|
flowing.post_effect_color = {a=192, r=0x2c, g=0x88, b=0x8c}
|
||||||
|
flowing.special_tiles = {
|
||||||
|
{
|
||||||
|
image="default_river_water_flowing_animated.png",
|
||||||
|
backface_culling=false,
|
||||||
|
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=4.0}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image="default_river_water_flowing_animated.png",
|
||||||
|
backface_culling=false,
|
||||||
|
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=4.0}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
minetest.register_node("mclx_core:river_water_source", source)
|
minetest.register_node("mclx_core:river_water_source", source)
|
||||||
minetest.register_node("mclx_core:river_water_flowing", flowing)
|
minetest.register_node("mclx_core:river_water_flowing", flowing)
|
||||||
|
|
|
@ -7,12 +7,6 @@ local nether_skycolor = "#6EB1FF" -- The Nether biomes seemingly don't use the s
|
||||||
local end_skycolor = "#000000"
|
local end_skycolor = "#000000"
|
||||||
local end_fogcolor = "#A080A0" -- The End biomes seemingly don't use the fog colour, despite having this value according to the wiki. The sky colour is used for both sky and fog.
|
local end_fogcolor = "#A080A0" -- The End biomes seemingly don't use the fog colour, despite having this value according to the wiki. The sky colour is used for both sky and fog.
|
||||||
|
|
||||||
local default_waterfogcolor = "#3F76E4"
|
|
||||||
local lukewarm_waterfogcolor = "#45ADF2"
|
|
||||||
local warm_waterfogcolor = "#43D5EE"
|
|
||||||
local cold_waterfogcolor = "#3D57D6"
|
|
||||||
local frozen_waterfogcolor = "#3938C9"
|
|
||||||
|
|
||||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||||
local mg_seed = minetest.get_mapgen_setting("seed")
|
local mg_seed = minetest.get_mapgen_setting("seed")
|
||||||
|
|
||||||
|
@ -57,9 +51,6 @@ local function register_classic_superflat_biome()
|
||||||
heat_point = 50,
|
heat_point = 50,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 1,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#78A7FF",
|
_mcl_skycolor = "#78A7FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -170,9 +161,6 @@ local function register_biomes()
|
||||||
heat_point = -5,
|
heat_point = -5,
|
||||||
_mcl_biome_type = "snowy",
|
_mcl_biome_type = "snowy",
|
||||||
_mcl_grass_palette_index = 2,
|
_mcl_grass_palette_index = 2,
|
||||||
_mcl_foliage_palette_index = 2,
|
|
||||||
_mcl_water_palette_index = 5,
|
|
||||||
_mcl_waterfogcolor = frozen_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7FA1FF",
|
_mcl_skycolor = "#7FA1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -191,9 +179,6 @@ local function register_biomes()
|
||||||
heat_point = -5,
|
heat_point = -5,
|
||||||
_mcl_biome_type = "snowy",
|
_mcl_biome_type = "snowy",
|
||||||
_mcl_grass_palette_index = 2,
|
_mcl_grass_palette_index = 2,
|
||||||
_mcl_foliage_palette_index = 2,
|
|
||||||
_mcl_water_palette_index = 5,
|
|
||||||
_mcl_waterfogcolor = frozen_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7FA1FF",
|
_mcl_skycolor = "#7FA1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -214,9 +199,6 @@ local function register_biomes()
|
||||||
heat_point = 8,
|
heat_point = 8,
|
||||||
_mcl_biome_type = "snowy",
|
_mcl_biome_type = "snowy",
|
||||||
_mcl_grass_palette_index = 3,
|
_mcl_grass_palette_index = 3,
|
||||||
_mcl_foliage_palette_index = 2,
|
|
||||||
_mcl_water_palette_index = 5,
|
|
||||||
_mcl_waterfogcolor = frozen_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#839EFF",
|
_mcl_skycolor = "#839EFF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -239,9 +221,6 @@ local function register_biomes()
|
||||||
heat_point = 8,
|
heat_point = 8,
|
||||||
_mcl_biome_type = "snowy",
|
_mcl_biome_type = "snowy",
|
||||||
_mcl_grass_palette_index = 3,
|
_mcl_grass_palette_index = 3,
|
||||||
_mcl_foliage_palette_index = 16,
|
|
||||||
_mcl_water_palette_index = 5,
|
|
||||||
_mcl_waterfogcolor = frozen_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7FA1FF",
|
_mcl_skycolor = "#7FA1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -262,9 +241,6 @@ local function register_biomes()
|
||||||
heat_point = 8,
|
heat_point = 8,
|
||||||
_mcl_biome_type = "snowy",
|
_mcl_biome_type = "snowy",
|
||||||
_mcl_grass_palette_index = 3,
|
_mcl_grass_palette_index = 3,
|
||||||
_mcl_foliage_palette_index = 16,
|
|
||||||
_mcl_water_palette_index = 5,
|
|
||||||
_mcl_waterfogcolor = frozen_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7FA1FF",
|
_mcl_skycolor = "#7FA1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -283,9 +259,6 @@ local function register_biomes()
|
||||||
vertical_blend = 1,
|
vertical_blend = 1,
|
||||||
_mcl_biome_type = "snowy",
|
_mcl_biome_type = "snowy",
|
||||||
_mcl_grass_palette_index = 3,
|
_mcl_grass_palette_index = 3,
|
||||||
_mcl_foliage_palette_index = 2,
|
|
||||||
_mcl_water_palette_index = 5,
|
|
||||||
_mcl_waterfogcolor = frozen_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7FA1FF",
|
_mcl_skycolor = "#7FA1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -305,9 +278,6 @@ local function register_biomes()
|
||||||
heat_point = 10,
|
heat_point = 10,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 4,
|
_mcl_grass_palette_index = 4,
|
||||||
_mcl_foliage_palette_index = 9,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7CA3FF",
|
_mcl_skycolor = "#7CA3FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -325,9 +295,6 @@ local function register_biomes()
|
||||||
heat_point = 10,
|
heat_point = 10,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 4,
|
_mcl_grass_palette_index = 4,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -347,9 +314,6 @@ local function register_biomes()
|
||||||
heat_point = 8,
|
heat_point = 8,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 5,
|
_mcl_grass_palette_index = 5,
|
||||||
_mcl_foliage_palette_index = 10,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7DA3FF",
|
_mcl_skycolor = "#7DA3FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -367,9 +331,6 @@ local function register_biomes()
|
||||||
heat_point = 8,
|
heat_point = 8,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 5,
|
_mcl_grass_palette_index = 5,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -390,9 +351,6 @@ local function register_biomes()
|
||||||
heat_point = 45,
|
heat_point = 45,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 6,
|
_mcl_grass_palette_index = 6,
|
||||||
_mcl_foliage_palette_index = 11,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7DA2FF",
|
_mcl_skycolor = "#7DA2FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -411,9 +369,6 @@ local function register_biomes()
|
||||||
heat_point = 45,
|
heat_point = 45,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 6,
|
_mcl_grass_palette_index = 6,
|
||||||
_mcl_foliage_palette_index = 1,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = beach_skycolor,
|
_mcl_skycolor = beach_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -432,9 +387,6 @@ local function register_biomes()
|
||||||
heat_point = 45,
|
heat_point = 45,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 6,
|
_mcl_grass_palette_index = 6,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -455,9 +407,6 @@ local function register_biomes()
|
||||||
heat_point = 25,
|
heat_point = 25,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 7,
|
_mcl_grass_palette_index = 7,
|
||||||
_mcl_foliage_palette_index = 11,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7DA2FF",
|
_mcl_skycolor = "#7DA2FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -475,9 +424,6 @@ local function register_biomes()
|
||||||
heat_point = 25,
|
heat_point = 25,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 7,
|
_mcl_grass_palette_index = 7,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -500,9 +446,6 @@ local function register_biomes()
|
||||||
vertical_blend = 6,
|
vertical_blend = 6,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 8,
|
_mcl_grass_palette_index = 8,
|
||||||
_mcl_foliage_palette_index = 11,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7DA2FF",
|
_mcl_skycolor = "#7DA2FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -523,9 +466,6 @@ local function register_biomes()
|
||||||
heat_point = 25,
|
heat_point = 25,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 8,
|
_mcl_grass_palette_index = 8,
|
||||||
_mcl_foliage_palette_index = 11,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7DA2FF",
|
_mcl_skycolor = "#7DA2FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -543,9 +483,6 @@ local function register_biomes()
|
||||||
heat_point = 25,
|
heat_point = 25,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 8,
|
_mcl_grass_palette_index = 8,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -563,9 +500,6 @@ local function register_biomes()
|
||||||
heat_point = 8,
|
heat_point = 8,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 9,
|
_mcl_grass_palette_index = 9,
|
||||||
_mcl_foliage_palette_index = 11,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7DA2FF",
|
_mcl_skycolor = "#7DA2FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -583,9 +517,6 @@ local function register_biomes()
|
||||||
heat_point = 8,
|
heat_point = 8,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 9,
|
_mcl_grass_palette_index = 9,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -609,9 +540,6 @@ local function register_biomes()
|
||||||
heat_point = 8,
|
heat_point = 8,
|
||||||
_mcl_biome_type = "snowy",
|
_mcl_biome_type = "snowy",
|
||||||
_mcl_grass_palette_index = 10,
|
_mcl_grass_palette_index = 10,
|
||||||
_mcl_foliage_palette_index = 2,
|
|
||||||
_mcl_water_palette_index = 5,
|
|
||||||
_mcl_waterfogcolor = frozen_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7FA1FF",
|
_mcl_skycolor = "#7FA1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -629,9 +557,6 @@ local function register_biomes()
|
||||||
heat_point = 8,
|
heat_point = 8,
|
||||||
_mcl_biome_type = "snowy",
|
_mcl_biome_type = "snowy",
|
||||||
_mcl_grass_palette_index = 10,
|
_mcl_grass_palette_index = 10,
|
||||||
_mcl_foliage_palette_index = 2,
|
|
||||||
_mcl_water_palette_index = 5,
|
|
||||||
_mcl_waterfogcolor = frozen_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7FA1FF",
|
_mcl_skycolor = "#7FA1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -651,9 +576,6 @@ local function register_biomes()
|
||||||
heat_point = 58,
|
heat_point = 58,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 1,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#78A7FF",
|
_mcl_skycolor = "#78A7FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -671,9 +593,6 @@ local function register_biomes()
|
||||||
heat_point = 58,
|
heat_point = 58,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 1,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = beach_skycolor,
|
_mcl_skycolor = beach_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -691,9 +610,6 @@ local function register_biomes()
|
||||||
heat_point = 58,
|
heat_point = 58,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -713,9 +629,6 @@ local function register_biomes()
|
||||||
heat_point = 45,
|
heat_point = 45,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 11,
|
_mcl_grass_palette_index = 11,
|
||||||
_mcl_foliage_palette_index = 1,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#78A7FF",
|
_mcl_skycolor = "#78A7FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -733,9 +646,6 @@ local function register_biomes()
|
||||||
heat_point = 45,
|
heat_point = 45,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 11,
|
_mcl_grass_palette_index = 11,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -755,9 +665,6 @@ local function register_biomes()
|
||||||
heat_point = 22,
|
heat_point = 22,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 12,
|
_mcl_grass_palette_index = 12,
|
||||||
_mcl_foliage_palette_index = 10,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7DA3FF",
|
_mcl_skycolor = "#7DA3FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -775,9 +682,6 @@ local function register_biomes()
|
||||||
heat_point = 22,
|
heat_point = 22,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 12,
|
_mcl_grass_palette_index = 12,
|
||||||
_mcl_foliage_palette_index = 1,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = beach_skycolor,
|
_mcl_skycolor = beach_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -795,9 +699,6 @@ local function register_biomes()
|
||||||
heat_point = 22,
|
heat_point = 22,
|
||||||
_mcl_biome_type = "cold",
|
_mcl_biome_type = "cold",
|
||||||
_mcl_grass_palette_index = 12,
|
_mcl_grass_palette_index = 12,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 4,
|
|
||||||
_mcl_waterfogcolor = cold_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -817,9 +718,6 @@ local function register_biomes()
|
||||||
heat_point = 45,
|
heat_point = 45,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 13,
|
_mcl_grass_palette_index = 13,
|
||||||
_mcl_foliage_palette_index = 7,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#79A6FF",
|
_mcl_skycolor = "#79A6FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -837,9 +735,6 @@ local function register_biomes()
|
||||||
heat_point = 45,
|
heat_point = 45,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 13,
|
_mcl_grass_palette_index = 13,
|
||||||
_mcl_foliage_palette_index = 1,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = beach_skycolor,
|
_mcl_skycolor = beach_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -857,9 +752,6 @@ local function register_biomes()
|
||||||
heat_point = 45,
|
heat_point = 45,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 13,
|
_mcl_grass_palette_index = 13,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -879,9 +771,6 @@ local function register_biomes()
|
||||||
heat_point = 32,
|
heat_point = 32,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 14,
|
_mcl_grass_palette_index = 14,
|
||||||
_mcl_foliage_palette_index = 7,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#79A6FF",
|
_mcl_skycolor = "#79A6FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -899,9 +788,6 @@ local function register_biomes()
|
||||||
heat_point = 32,
|
heat_point = 32,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 14,
|
_mcl_grass_palette_index = 14,
|
||||||
_mcl_foliage_palette_index = 1,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = beach_skycolor,
|
_mcl_skycolor = beach_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -919,9 +805,6 @@ local function register_biomes()
|
||||||
heat_point = 32,
|
heat_point = 32,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 14,
|
_mcl_grass_palette_index = 14,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -941,9 +824,6 @@ local function register_biomes()
|
||||||
heat_point = 31,
|
heat_point = 31,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 15,
|
_mcl_grass_palette_index = 15,
|
||||||
_mcl_foliage_palette_index = 8,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7AA5FF",
|
_mcl_skycolor = "#7AA5FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -961,9 +841,6 @@ local function register_biomes()
|
||||||
heat_point = 31,
|
heat_point = 31,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 15,
|
_mcl_grass_palette_index = 15,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -983,9 +860,6 @@ local function register_biomes()
|
||||||
heat_point = 27,
|
heat_point = 27,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 16,
|
_mcl_grass_palette_index = 16,
|
||||||
_mcl_foliage_palette_index = 8,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#7AA5FF",
|
_mcl_skycolor = "#7AA5FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1003,9 +877,6 @@ local function register_biomes()
|
||||||
heat_point = 27,
|
heat_point = 27,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 16,
|
_mcl_grass_palette_index = 16,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1026,9 +897,6 @@ local function register_biomes()
|
||||||
heat_point = 94,
|
heat_point = 94,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
_mcl_foliage_palette_index = 3,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1046,9 +914,6 @@ local function register_biomes()
|
||||||
heat_point = 94,
|
heat_point = 94,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1068,9 +933,6 @@ local function register_biomes()
|
||||||
heat_point = 27,
|
heat_point = 27,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 18,
|
_mcl_grass_palette_index = 18,
|
||||||
_mcl_foliage_palette_index = 7,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#79A6FF",
|
_mcl_skycolor = "#79A6FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1088,9 +950,6 @@ local function register_biomes()
|
||||||
heat_point = 27,
|
heat_point = 27,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 18,
|
_mcl_grass_palette_index = 18,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1111,9 +970,6 @@ local function register_biomes()
|
||||||
heat_point = 100,
|
heat_point = 100,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 19,
|
_mcl_grass_palette_index = 19,
|
||||||
_mcl_foliage_palette_index = 4,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1133,9 +989,6 @@ local function register_biomes()
|
||||||
heat_point = 100,
|
heat_point = 100,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 19,
|
_mcl_grass_palette_index = 19,
|
||||||
_mcl_foliage_palette_index = 4,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1154,9 +1007,6 @@ local function register_biomes()
|
||||||
heat_point = 100,
|
heat_point = 100,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 19,
|
_mcl_grass_palette_index = 19,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1176,9 +1026,6 @@ local function register_biomes()
|
||||||
heat_point = 100,
|
heat_point = 100,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 20,
|
_mcl_grass_palette_index = 20,
|
||||||
_mcl_foliage_palette_index = 4,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1197,9 +1044,6 @@ local function register_biomes()
|
||||||
heat_point = 100,
|
heat_point = 100,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 20,
|
_mcl_grass_palette_index = 20,
|
||||||
_mcl_foliage_palette_index = 4,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1218,9 +1062,6 @@ local function register_biomes()
|
||||||
heat_point = 100,
|
heat_point = 100,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 20,
|
_mcl_grass_palette_index = 20,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1242,9 +1083,6 @@ local function register_biomes()
|
||||||
vertical_blend = 0, -- we want a sharp transition
|
vertical_blend = 0, -- we want a sharp transition
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 21,
|
_mcl_grass_palette_index = 21,
|
||||||
_mcl_foliage_palette_index = 4,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1266,9 +1104,6 @@ local function register_biomes()
|
||||||
heat_point = 60,
|
heat_point = 60,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 21,
|
_mcl_grass_palette_index = 21,
|
||||||
_mcl_foliage_palette_index = 4,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1287,9 +1122,6 @@ local function register_biomes()
|
||||||
heat_point = 60,
|
heat_point = 60,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 21,
|
_mcl_grass_palette_index = 21,
|
||||||
_mcl_foliage_palette_index = 4,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1308,9 +1140,6 @@ local function register_biomes()
|
||||||
heat_point = 60,
|
heat_point = 60,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 21,
|
_mcl_grass_palette_index = 21,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1334,9 +1163,6 @@ local function register_biomes()
|
||||||
vertical_blend = 5,
|
vertical_blend = 5,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 22,
|
_mcl_grass_palette_index = 22,
|
||||||
_mcl_foliage_palette_index = 4,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1356,9 +1182,6 @@ local function register_biomes()
|
||||||
heat_point = 60,
|
heat_point = 60,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 22,
|
_mcl_grass_palette_index = 22,
|
||||||
_mcl_foliage_palette_index = 4,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1379,9 +1202,6 @@ local function register_biomes()
|
||||||
vertical_blend = 4,
|
vertical_blend = 4,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 22,
|
_mcl_grass_palette_index = 22,
|
||||||
_mcl_foliage_palette_index = 4,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1400,9 +1220,6 @@ local function register_biomes()
|
||||||
heat_point = 60,
|
heat_point = 60,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 22,
|
_mcl_grass_palette_index = 22,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 3,
|
|
||||||
_mcl_waterfogcolor = warm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1423,9 +1240,6 @@ local function register_biomes()
|
||||||
heat_point = 79,
|
heat_point = 79,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 1,
|
_mcl_grass_palette_index = 1,
|
||||||
_mcl_foliage_palette_index = 3,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1443,9 +1257,6 @@ local function register_biomes()
|
||||||
heat_point = 79,
|
heat_point = 79,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 1,
|
_mcl_grass_palette_index = 1,
|
||||||
_mcl_foliage_palette_index = 1,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = beach_skycolor,
|
_mcl_skycolor = beach_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1463,9 +1274,6 @@ local function register_biomes()
|
||||||
heat_point = 79,
|
heat_point = 79,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 1,
|
_mcl_grass_palette_index = 1,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1487,9 +1295,6 @@ local function register_biomes()
|
||||||
heat_point = 100,
|
heat_point = 100,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 23,
|
_mcl_grass_palette_index = 23,
|
||||||
_mcl_foliage_palette_index = 3,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#6EB1FF",
|
_mcl_skycolor = "#6EB1FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1507,9 +1312,6 @@ local function register_biomes()
|
||||||
heat_point = 100,
|
heat_point = 100,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 23,
|
_mcl_grass_palette_index = 23,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1529,9 +1331,6 @@ local function register_biomes()
|
||||||
heat_point = 81,
|
heat_point = 81,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 24,
|
_mcl_grass_palette_index = 24,
|
||||||
_mcl_foliage_palette_index = 12,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1549,9 +1348,6 @@ local function register_biomes()
|
||||||
heat_point = 81,
|
heat_point = 81,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 24,
|
_mcl_grass_palette_index = 24,
|
||||||
_mcl_foliage_palette_index = 12,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1570,9 +1366,6 @@ local function register_biomes()
|
||||||
heat_point = 81,
|
heat_point = 81,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 24,
|
_mcl_grass_palette_index = 24,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1593,9 +1386,6 @@ local function register_biomes()
|
||||||
heat_point = 81,
|
heat_point = 81,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 25,
|
_mcl_grass_palette_index = 25,
|
||||||
_mcl_foliage_palette_index = 12,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1613,9 +1403,6 @@ local function register_biomes()
|
||||||
heat_point = 81,
|
heat_point = 81,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 25,
|
_mcl_grass_palette_index = 25,
|
||||||
_mcl_foliage_palette_index = 12,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1634,9 +1421,6 @@ local function register_biomes()
|
||||||
heat_point = 81,
|
heat_point = 81,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 25,
|
_mcl_grass_palette_index = 25,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1656,9 +1440,6 @@ local function register_biomes()
|
||||||
heat_point = 76,
|
heat_point = 76,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 26,
|
_mcl_grass_palette_index = 26,
|
||||||
_mcl_foliage_palette_index = 13,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1676,9 +1457,6 @@ local function register_biomes()
|
||||||
heat_point = 76,
|
heat_point = 76,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 26,
|
_mcl_grass_palette_index = 26,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1701,9 +1479,6 @@ local function register_biomes()
|
||||||
heat_point = 79,
|
heat_point = 79,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 27,
|
_mcl_grass_palette_index = 27,
|
||||||
_mcl_foliage_palette_index = 13,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1721,9 +1496,6 @@ local function register_biomes()
|
||||||
heat_point = 79,
|
heat_point = 79,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 27,
|
_mcl_grass_palette_index = 27,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1744,9 +1516,6 @@ local function register_biomes()
|
||||||
heat_point = 94,
|
heat_point = 94,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 27,
|
_mcl_grass_palette_index = 27,
|
||||||
_mcl_foliage_palette_index = 6,
|
|
||||||
_mcl_water_palette_index = 7,
|
|
||||||
_mcl_waterfogcolor = "#3A7A6A",
|
|
||||||
_mcl_skycolor = "#78A7FF",
|
_mcl_skycolor = "#78A7FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1764,9 +1533,6 @@ local function register_biomes()
|
||||||
heat_point = 94,
|
heat_point = 94,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 27,
|
_mcl_grass_palette_index = 27,
|
||||||
_mcl_foliage_palette_index = 6,
|
|
||||||
_mcl_water_palette_index = 7,
|
|
||||||
_mcl_waterfogcolor = "#3A7A6A",
|
|
||||||
_mcl_skycolor = "#78A7FF",
|
_mcl_skycolor = "#78A7FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1785,9 +1551,6 @@ local function register_biomes()
|
||||||
heat_point = 94,
|
heat_point = 94,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 27,
|
_mcl_grass_palette_index = 27,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 7,
|
|
||||||
_mcl_waterfogcolor = "#3A7A6A",
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1807,9 +1570,6 @@ local function register_biomes()
|
||||||
heat_point = 50,
|
heat_point = 50,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 28,
|
_mcl_grass_palette_index = 28,
|
||||||
_mcl_foliage_palette_index = 5,
|
|
||||||
_mcl_water_palette_index = 1,
|
|
||||||
_mcl_waterfogcolor = "#617B64",
|
|
||||||
_mcl_skycolor = "#78A7FF",
|
_mcl_skycolor = "#78A7FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1827,9 +1587,6 @@ local function register_biomes()
|
||||||
heat_point = 50,
|
heat_point = 50,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 28,
|
_mcl_grass_palette_index = 28,
|
||||||
_mcl_foliage_palette_index = 5,
|
|
||||||
_mcl_water_palette_index = 1,
|
|
||||||
_mcl_waterfogcolor = "#617B64",
|
|
||||||
_mcl_skycolor = "#78A7FF",
|
_mcl_skycolor = "#78A7FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1848,9 +1605,6 @@ local function register_biomes()
|
||||||
heat_point = 50,
|
heat_point = 50,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 28,
|
_mcl_grass_palette_index = 28,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 1,
|
|
||||||
_mcl_waterfogcolor = "#617B64",
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1873,9 +1627,6 @@ local function register_biomes()
|
||||||
heat_point = 50,
|
heat_point = 50,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 29,
|
_mcl_grass_palette_index = 29,
|
||||||
_mcl_foliage_palette_index = 17,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1894,9 +1645,6 @@ local function register_biomes()
|
||||||
heat_point = 50,
|
heat_point = 50,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 29,
|
_mcl_grass_palette_index = 29,
|
||||||
_mcl_foliage_palette_index = 17,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1914,9 +1662,6 @@ local function register_biomes()
|
||||||
heat_point = 50,
|
heat_point = 50,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 29,
|
_mcl_grass_palette_index = 29,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1937,9 +1682,6 @@ local function register_biomes()
|
||||||
heat_point = 95,
|
heat_point = 95,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 24,
|
_mcl_grass_palette_index = 24,
|
||||||
_mcl_foliage_palette_index = 12,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1957,9 +1699,6 @@ local function register_biomes()
|
||||||
heat_point = 95,
|
heat_point = 95,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 24,
|
_mcl_grass_palette_index = 24,
|
||||||
_mcl_foliage_palette_index = 12,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -1978,9 +1717,6 @@ local function register_biomes()
|
||||||
heat_point = 90,
|
heat_point = 90,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 24,
|
_mcl_grass_palette_index = 24,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2001,9 +1737,6 @@ local function register_biomes()
|
||||||
heat_point = 95,
|
heat_point = 95,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 25,
|
_mcl_grass_palette_index = 25,
|
||||||
_mcl_foliage_palette_index = 12,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2021,9 +1754,6 @@ local function register_biomes()
|
||||||
heat_point = 90,
|
heat_point = 90,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 25,
|
_mcl_grass_palette_index = 25,
|
||||||
_mcl_foliage_palette_index = 12,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2042,9 +1772,6 @@ local function register_biomes()
|
||||||
heat_point = 95,
|
heat_point = 95,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 25,
|
_mcl_grass_palette_index = 25,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2064,9 +1791,6 @@ local function register_biomes()
|
||||||
heat_point = 90,
|
heat_point = 90,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 26,
|
_mcl_grass_palette_index = 26,
|
||||||
_mcl_foliage_palette_index = 13,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2084,9 +1808,6 @@ local function register_biomes()
|
||||||
heat_point = 88,
|
heat_point = 88,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 26,
|
_mcl_grass_palette_index = 26,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2109,9 +1830,6 @@ local function register_biomes()
|
||||||
heat_point = 95,
|
heat_point = 95,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 27,
|
_mcl_grass_palette_index = 27,
|
||||||
_mcl_foliage_palette_index = 13,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = "#77A8FF",
|
_mcl_skycolor = "#77A8FF",
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2129,9 +1847,6 @@ local function register_biomes()
|
||||||
heat_point = 90,
|
heat_point = 90,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 27,
|
_mcl_grass_palette_index = 27,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 2,
|
|
||||||
_mcl_waterfogcolor = lukewarm_waterfogcolor,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2156,8 +1871,6 @@ local function register_biomes()
|
||||||
vertical_blend = 5,
|
vertical_blend = 5,
|
||||||
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
|
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
|
||||||
_mcl_grass_palette_index = minetest.registered_biomes[biome]._mcl_grass_palette_index,
|
_mcl_grass_palette_index = minetest.registered_biomes[biome]._mcl_grass_palette_index,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = minetest.registered_biomes[biome]._mcl_water_palette_index,
|
|
||||||
_mcl_skycolor = ocean_skycolor,
|
_mcl_skycolor = ocean_skycolor,
|
||||||
_mcl_fogcolor = overworld_fogcolor
|
_mcl_fogcolor = overworld_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2172,8 +1885,6 @@ local function register_biomes()
|
||||||
y_max = DEEP_OCEAN_MIN - 1,
|
y_max = DEEP_OCEAN_MIN - 1,
|
||||||
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
|
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
|
||||||
_mcl_grass_palette_index = minetest.registered_biomes[biome]._mcl_grass_palette_index,
|
_mcl_grass_palette_index = minetest.registered_biomes[biome]._mcl_grass_palette_index,
|
||||||
_mcl_foliage_palette_index = minetest.registered_biomes[biome]._mcl_foliage_palette_index,
|
|
||||||
_mcl_water_palette_index = minetest.registered_biomes[biome]._mcl_water_palette_index,
|
|
||||||
_mcl_skycolor = minetest.registered_biomes[biome]._mcl_skycolor,
|
_mcl_skycolor = minetest.registered_biomes[biome]._mcl_skycolor,
|
||||||
_mcl_fogcolor = minetest.registered_biomes[biome]._mcl_fogcolor,
|
_mcl_fogcolor = minetest.registered_biomes[biome]._mcl_fogcolor,
|
||||||
})
|
})
|
||||||
|
@ -2229,9 +1940,6 @@ local function register_dimension_biomes()
|
||||||
humidity_point = 0,
|
humidity_point = 0,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
_mcl_foliage_palette_index = 3,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = nether_skycolor,
|
_mcl_skycolor = nether_skycolor,
|
||||||
_mcl_fogcolor = "#330808"
|
_mcl_fogcolor = "#330808"
|
||||||
})
|
})
|
||||||
|
@ -2263,9 +1971,6 @@ local function register_dimension_biomes()
|
||||||
humidity_point = 33,
|
humidity_point = 33,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
_mcl_foliage_palette_index = 3,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = nether_skycolor,
|
_mcl_skycolor = nether_skycolor,
|
||||||
_mcl_fogcolor = "#1B4745"
|
_mcl_fogcolor = "#1B4745"
|
||||||
})
|
})
|
||||||
|
@ -2317,9 +2022,6 @@ local function register_dimension_biomes()
|
||||||
humidity_point = 47,
|
humidity_point = 47,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
_mcl_foliage_palette_index = 3,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = nether_skycolor,
|
_mcl_skycolor = nether_skycolor,
|
||||||
_mcl_fogcolor = "#330303"
|
_mcl_fogcolor = "#330303"
|
||||||
})
|
})
|
||||||
|
@ -2349,9 +2051,6 @@ local function register_dimension_biomes()
|
||||||
humidity_point = 70,
|
humidity_point = 70,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
_mcl_foliage_palette_index = 3,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = nether_skycolor,
|
_mcl_skycolor = nether_skycolor,
|
||||||
_mcl_fogcolor = "#1A051A"
|
_mcl_fogcolor = "#1A051A"
|
||||||
})
|
})
|
||||||
|
@ -2381,9 +2080,6 @@ local function register_dimension_biomes()
|
||||||
humidity_point = 80,
|
humidity_point = 80,
|
||||||
_mcl_biome_type = "hot",
|
_mcl_biome_type = "hot",
|
||||||
_mcl_grass_palette_index = 17,
|
_mcl_grass_palette_index = 17,
|
||||||
_mcl_foliage_palette_index = 3,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = nether_skycolor,
|
_mcl_skycolor = nether_skycolor,
|
||||||
_mcl_fogcolor = "#685F70"
|
_mcl_fogcolor = "#685F70"
|
||||||
})
|
})
|
||||||
|
@ -2438,9 +2134,6 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
_mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2458,9 +2151,6 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
_mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2478,9 +2168,6 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
_mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2498,9 +2185,6 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
_mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2518,9 +2202,6 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
_mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2541,9 +2222,6 @@ local function register_dimension_biomes()
|
||||||
min_pos = {x = -1250, y = mcl_vars.mg_end_min, z = -1250},
|
min_pos = {x = -1250, y = mcl_vars.mg_end_min, z = -1250},
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
_mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -2562,9 +2240,6 @@ local function register_dimension_biomes()
|
||||||
vertical_blend = 16,
|
vertical_blend = 16,
|
||||||
_mcl_biome_type = "medium",
|
_mcl_biome_type = "medium",
|
||||||
_mcl_grass_palette_index = 0,
|
_mcl_grass_palette_index = 0,
|
||||||
_mcl_foliage_palette_index = 0,
|
|
||||||
_mcl_water_palette_index = 0,
|
|
||||||
_mcl_waterfogcolor = default_waterfogcolor,
|
|
||||||
_mcl_skycolor = end_skycolor,
|
_mcl_skycolor = end_skycolor,
|
||||||
_mcl_fogcolor = end_fogcolor
|
_mcl_fogcolor = end_fogcolor
|
||||||
})
|
})
|
||||||
|
@ -5613,8 +5288,6 @@ local function register_decorations()
|
||||||
register_flower("allium", nil, 0) -- flower Forest only
|
register_flower("allium", nil, 0) -- flower Forest only
|
||||||
register_flower("blue_orchid", {"Swampland"}, 64500, false)
|
register_flower("blue_orchid", {"Swampland"}, 64500, false)
|
||||||
|
|
||||||
register_flower("lily_of_the_valley", nil, 325)
|
|
||||||
register_flower("cornflower", flower_biomes2, 486)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Decorations in non-Overworld dimensions
|
-- Decorations in non-Overworld dimensions
|
||||||
|
|
|
@ -57,7 +57,6 @@ dofile(modpath.."/api.lua")
|
||||||
dofile(modpath.."/ores.lua")
|
dofile(modpath.."/ores.lua")
|
||||||
|
|
||||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||||
local sea_level = tonumber(minetest.get_mapgen_setting("water_level"))
|
|
||||||
local superflat = mg_name == "flat" and minetest.get_mapgen_setting("mcl_superflat_classic") == "true"
|
local superflat = mg_name == "flat" and minetest.get_mapgen_setting("mcl_superflat_classic") == "true"
|
||||||
|
|
||||||
-- Content IDs
|
-- Content IDs
|
||||||
|
@ -269,7 +268,7 @@ local function set_layers(data, area, content_id, check, min, max, minp, maxp, l
|
||||||
return lvm_used
|
return lvm_used
|
||||||
end
|
end
|
||||||
|
|
||||||
local function set_grass_palette(minp,maxp,data2,area,biomemap,nodes)
|
local function set_palette(minp,maxp,data2,area,biomemap,nodes)
|
||||||
-- Flat area at y=0 to read biome 3 times faster than 5.3.0.get_biome_data(pos).biome: 43us vs 125us per iteration:
|
-- Flat area at y=0 to read biome 3 times faster than 5.3.0.get_biome_data(pos).biome: 43us vs 125us per iteration:
|
||||||
if not biomemap then return end
|
if not biomemap then return end
|
||||||
local aream = VoxelArea:new({MinEdge={x=minp.x, y=0, z=minp.z}, MaxEdge={x=maxp.x, y=0, z=maxp.z}})
|
local aream = VoxelArea:new({MinEdge={x=minp.x, y=0, z=minp.z}, MaxEdge={x=maxp.x, y=0, z=maxp.z}})
|
||||||
|
@ -345,15 +344,13 @@ local function world_structure(vm, data, data2, emin, emax, area, minp, maxp, bl
|
||||||
return lvm_used, lvm_used, deco, ores
|
return lvm_used, lvm_used, deco, ores
|
||||||
end
|
end
|
||||||
|
|
||||||
local affected_grass_blocks = {"mcl_core:dirt_with_grass", "mcl_flowers:tallgrass", "mcl_flowers:double_grass", "mcl_flowers:double_grass_top", "mcl_flowers:fern", "mcl_flowers:double_fern", "mcl_flowers:double_fern_top", "mcl_core:reeds", "mcl_core:dirt_with_grass_snow"}
|
local function block_fixes(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
||||||
|
|
||||||
local function block_fixes_grass(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
|
||||||
local biomemap = minetest.get_mapgen_object("biomemap")
|
local biomemap = minetest.get_mapgen_object("biomemap")
|
||||||
local lvm_used = false
|
local lvm_used = false
|
||||||
local pr = PseudoRandom(blockseed)
|
local pr = PseudoRandom(blockseed)
|
||||||
if minp.y <= mcl_vars.mg_overworld_max and maxp.y >= mcl_vars.mg_overworld_min then
|
if minp.y <= mcl_vars.mg_overworld_max and maxp.y >= mcl_vars.mg_overworld_min then
|
||||||
-- Set param2 (=color) of nodes which use the grass colour palette.
|
-- Set param2 (=color) of nodes which use the grass colour palette.
|
||||||
lvm_used = set_grass_palette(minp,maxp,data2,area,biomemap,affected_grass_blocks)
|
lvm_used = set_palette(minp,maxp,data2,area,biomemap,{"mcl_core:dirt_with_grass", "mcl_flowers:tallgrass", "mcl_flowers:double_grass", "mcl_flowers:double_grass_top", "mcl_flowers:fern", "mcl_flowers:double_fern", "mcl_flowers:double_fern_top", "mcl_core:reeds", "mcl_core:dirt_with_grass_snow"})
|
||||||
end
|
end
|
||||||
return lvm_used
|
return lvm_used
|
||||||
end
|
end
|
||||||
|
@ -385,7 +382,7 @@ mcl_mapgen_core.register_generator("end_fixes", end_basic, function(minp,maxp)
|
||||||
end, 9999, true)
|
end, 9999, true)
|
||||||
|
|
||||||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||||
mcl_mapgen_core.register_generator("block_fixes_grass", block_fixes_grass, nil, 9999, true)
|
mcl_mapgen_core.register_generator("block_fixes", block_fixes, nil, 9999, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
if mg_name == "v6" then
|
if mg_name == "v6" then
|
||||||
|
@ -422,92 +419,20 @@ mcl_mapgen_core.register_generator("structures",nil, function(minp, maxp, blocks
|
||||||
end, 100, true)
|
end, 100, true)
|
||||||
|
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
label = "Fix grass palette indexes", -- This LBM fixes any incorrect grass palette indexes.
|
label = "Fix grass palette indexes",
|
||||||
name = "mcl_mapgen_core:fix_grass_palette_indexes",
|
name = "mcl_mapgen_core:fix_grass_palette_indexes",
|
||||||
nodenames = affected_grass_blocks,
|
nodenames = {"mcl_core:dirt_with_grass", "mcl_flowers:tallgrass", "mcl_flowers:double_grass", "mcl_flowers:double_grass_top", "mcl_flowers:fern", "mcl_flowers:double_fern", "mcl_flowers:double_fern_top", "mcl_core:reeds", "mcl_core:dirt_with_grass_snow"},
|
||||||
run_at_every_load = false,
|
run_at_every_load = true,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
local grass_palette_index = mcl_util.get_palette_indexes_from_pos(pos).grass_palette_index
|
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||||
if node.param2 ~= grass_palette_index then
|
local biome_data = minetest.get_biome_data(pos)
|
||||||
node.param2 = grass_palette_index
|
local biome = biome_data.biome
|
||||||
|
local biome_name = minetest.get_biome_name(biome)
|
||||||
|
local reg_biome = minetest.registered_biomes[biome_name]
|
||||||
|
if node.param2 ~= reg_biome._mcl_grass_palette_index then
|
||||||
|
node.param2 = reg_biome._mcl_grass_palette_index
|
||||||
minetest.set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_lbm({
|
|
||||||
label = "Fix foliage palette indexes", -- Set correct palette indexes of foliage in old mapblocks.
|
|
||||||
name = "mcl_mapgen_core:fix_foliage_palette_indexes",
|
|
||||||
nodenames = {"group:foliage_palette", "group:foliage_palette_wallmounted"},
|
|
||||||
run_at_every_load = false,
|
|
||||||
action = function(pos, node)
|
|
||||||
local foliage_palette_index = mcl_util.get_palette_indexes_from_pos(pos).foliage_palette_index
|
|
||||||
local noplconvert = {"mcl_mangrove:mangroveleaves", "mcl_core:vine"} -- These do not convert into player leaves.
|
|
||||||
if node.param2 == 1 and node.name ~= noplconvert then -- Convert old player leaves into the new versions.
|
|
||||||
node.param2 = foliage_palette_index
|
|
||||||
minetest.remove_node(pos) -- Required, since otherwise this conversion won't work.
|
|
||||||
minetest.place_node(vector.offset(pos, 0, 1, 0), node) -- Offset required, since otherwise the leaves sink one node for some reason.
|
|
||||||
elseif node.param2 ~= foliage_palette_index and node.name ~= "mcl_core:vine" then
|
|
||||||
node.param2 = foliage_palette_index
|
|
||||||
minetest.set_node(pos, node)
|
|
||||||
elseif node.name == "mcl_core:vine" then
|
|
||||||
local biome_param2 = foliage_palette_index
|
|
||||||
local rotation_param2 = node.param2
|
|
||||||
local final_param2 = (biome_param2 * 8) + rotation_param2
|
|
||||||
if node.param2 ~= final_param2 and rotation_param2 < 6 then
|
|
||||||
node.param2 = final_param2
|
|
||||||
minetest.set_node(pos, node)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_on_generated(function(minp, maxp, blockseed) -- Set correct palette indexes of foliage in new mapblocks.
|
|
||||||
local pos1, pos2 = vector.offset(minp, -16, -16, -16), vector.offset(maxp, 16, 16, 16)
|
|
||||||
local foliage = minetest.find_nodes_in_area(pos1, pos2, {"group:foliage_palette", "group:foliage_palette_wallmounted"})
|
|
||||||
for _, fpos in pairs(foliage) do
|
|
||||||
local fnode = minetest.get_node(fpos)
|
|
||||||
local foliage_palette_index = mcl_util.get_palette_indexes_from_pos(fpos).foliage_palette_index
|
|
||||||
if fnode.param2 ~= foliage_palette_index and fnode.name ~= "mcl_core:vine" then
|
|
||||||
fnode.param2 = foliage_palette_index
|
|
||||||
minetest.set_node(fpos, fnode)
|
|
||||||
elseif fnode.name == "mcl_core:vine" then
|
|
||||||
local biome_param2 = foliage_palette_index
|
|
||||||
local rotation_param2 = fnode.param2
|
|
||||||
local final_param2 = (biome_param2 * 8) + rotation_param2
|
|
||||||
if fnode.param2 ~= final_param2 and rotation_param2 < 6 then
|
|
||||||
fnode.param2 = final_param2
|
|
||||||
minetest.set_node(fpos, fnode)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
minetest.register_lbm({
|
|
||||||
label = "Fix water palette indexes", -- Set correct palette indexes of water in old mapblocks.
|
|
||||||
name = "mcl_mapgen_core:fix_water_palette_indexes",
|
|
||||||
nodenames = {"group:water_palette"},
|
|
||||||
run_at_every_load = false,
|
|
||||||
action = function(pos, node)
|
|
||||||
local water_palette_index = mcl_util.get_palette_indexes_from_pos(pos).water_palette_index
|
|
||||||
if node.param2 ~= water_palette_index then
|
|
||||||
node.param2 = water_palette_index
|
|
||||||
minetest.set_node(pos, node)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_on_generated(function(minp, maxp, blockseed) -- Set correct palette indexes of water in new mapblocks.
|
|
||||||
local pos1, pos2 = vector.offset(minp, -16, -16, -16), vector.offset(maxp, 16, 16, 16)
|
|
||||||
local water = minetest.find_nodes_in_area(pos1, pos2, {"group:water_palette"})
|
|
||||||
for _, wpos in pairs(water) do
|
|
||||||
local wnode = minetest.get_node(wpos)
|
|
||||||
local water_palette_index = mcl_util.get_palette_indexes_from_pos(wpos).water_palette_index
|
|
||||||
if wnode.param2 ~= water_palette_index then
|
|
||||||
wnode.param2 = water_palette_index
|
|
||||||
minetest.set_node(wpos, wnode)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
|
@ -224,14 +224,6 @@ local function spawn_villagers(minp,maxp)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function fix_village_water(minp,maxp)
|
|
||||||
local palettenodes = minetest.find_nodes_in_area(vector.offset(minp,-20,-20,-20),vector.offset(maxp,20,20,20), "group:water_palette")
|
|
||||||
for _, palettenodepos in pairs(palettenodes) do
|
|
||||||
local palettenode = minetest.get_node(palettenodepos)
|
|
||||||
minetest.set_node(palettenodepos, {name = palettenode.name})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function init_nodes(p1, p2, size, rotation, pr)
|
local function init_nodes(p1, p2, size, rotation, pr)
|
||||||
construct_node(p1, p2, "mcl_itemframes:item_frame")
|
construct_node(p1, p2, "mcl_itemframes:item_frame")
|
||||||
construct_node(p1, p2, "mcl_furnaces:furnace")
|
construct_node(p1, p2, "mcl_furnaces:furnace")
|
||||||
|
@ -335,7 +327,6 @@ function settlements.place_schematics(settlement_info, pr)
|
||||||
else
|
else
|
||||||
init_nodes(p1, p2, size, rotation, pr)
|
init_nodes(p1, p2, size, rotation, pr)
|
||||||
spawn_villagers(p1,p2)
|
spawn_villagers(p1,p2)
|
||||||
fix_village_water(p1,p2)
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
pr
|
pr
|
||||||
|
|
|
@ -115,15 +115,6 @@ mobs_griefing (Mobs change blocks) bool true
|
||||||
# If enabled, mobs won't damage particles when they got hurt.
|
# If enabled, mobs won't damage particles when they got hurt.
|
||||||
mobs_disable_blood (Disable mob damage particles) bool false
|
mobs_disable_blood (Disable mob damage particles) bool false
|
||||||
|
|
||||||
#Percentage of peaceful spawn attempts that succeed (default:35)
|
|
||||||
mcl_mob_peaceful_percentage_spawned (Peaceful percentage success) int 35 0 100
|
|
||||||
|
|
||||||
#Percentage of peaceful spawn attempts that are group spawns (default:15)
|
|
||||||
mcl_mob_peaceful_group_percentage_spawned (Peaceful group percentage) int 15 0 100
|
|
||||||
|
|
||||||
#Percentage of hostile spawn attempts that are group spawns (default:20)
|
|
||||||
mcl_mob_hostile_group_percentage_spawned (Hostile group percentage) int 20 0 100
|
|
||||||
|
|
||||||
#Maximum amount mobs (default:500)
|
#Maximum amount mobs (default:500)
|
||||||
mcl_mob_cap_total (Global mob cap) int 500 0 2048
|
mcl_mob_cap_total (Global mob cap) int 500 0 2048
|
||||||
|
|
||||||
|
@ -133,11 +124,8 @@ mcl_mob_cap_player (Mob cap per player) int 75 0 2048
|
||||||
#Maximum amount of monsters that will spawn near a player (default:70)
|
#Maximum amount of monsters that will spawn near a player (default:70)
|
||||||
mcl_mob_cap_monster (Mob cap monsters) int 70 0 2048
|
mcl_mob_cap_monster (Mob cap monsters) int 70 0 2048
|
||||||
|
|
||||||
#Maximum amount of animals that will spawn near a player (default:13)
|
#Maximum amount of animals that will spawn near a player (default:10)
|
||||||
mcl_mob_cap_animal (Mob cap animals) int 13 0 1024
|
mcl_mob_cap_animal (Mob cap animals) int 10 0 1024
|
||||||
|
|
||||||
#Maximum amount of water mobs that will spawn near a player (default:8)
|
|
||||||
mcl_mob_cap_water (Mob cap water) int 8 0 1024
|
|
||||||
|
|
||||||
#Maximum amount of ambient mobs that will spawn near a player (default:15)
|
#Maximum amount of ambient mobs that will spawn near a player (default:15)
|
||||||
mcl_mob_cap_ambient (Mob cap ambient mobs) int 15 0 1024
|
mcl_mob_cap_ambient (Mob cap ambient mobs) int 15 0 1024
|
||||||
|
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 297 B After Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 495 B |
Before Width: | Height: | Size: 785 B After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 194 B After Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 224 B |