forked from VoxeLibre/VoxeLibre
Compare commits
1 Commits
master
...
fix_villag
Author | SHA1 | Date |
---|---|---|
|
634c0c6561 |
|
@ -204,7 +204,7 @@ end
|
|||
|
||||
-- Checks if the given node would drop its useful drop if dug by a given tool.
|
||||
-- Returns true if it will yield its useful drop, false otherwise.
|
||||
function mcl_autogroup.can_harvest(nodename, toolname, player)
|
||||
function mcl_autogroup.can_harvest(nodename, toolname)
|
||||
local ndef = minetest.registered_nodes[nodename]
|
||||
|
||||
if not ndef then
|
||||
|
@ -228,9 +228,7 @@ function mcl_autogroup.can_harvest(nodename, toolname, player)
|
|||
end
|
||||
|
||||
-- Check if it can be dug by hand
|
||||
if not player or not player:is_player() then return false end
|
||||
local name = player:get_inventory():get_stack("hand", 1):get_name()
|
||||
local tdef = minetest.registered_items[name]
|
||||
local tdef = minetest.registered_tools[""]
|
||||
if tdef then
|
||||
for g, gdef in pairs(tdef._mcl_diggroups) do
|
||||
if ndef.groups[g] then
|
||||
|
@ -262,7 +260,7 @@ local function get_tool_capabilities(tdef)
|
|||
|
||||
-- If the damage group and punch interval from hand is not included,
|
||||
-- then the user will not be able to attack with the tool.
|
||||
local hand_toolcaps = mcl_meshhand.survival_hand_tool_caps
|
||||
local hand_toolcaps = minetest.registered_tools[""].tool_capabilities
|
||||
return {
|
||||
full_punch_interval = hand_toolcaps.full_punch_interval,
|
||||
damage_groups = hand_toolcaps.damage_groups
|
||||
|
@ -282,7 +280,7 @@ end
|
|||
-- would have to add _mcl_autogroup as a dependency which would break the mod
|
||||
-- loading order.
|
||||
function mcl_autogroup.get_groupcaps(toolname, efficiency)
|
||||
local tdef = minetest.registered_items[toolname]
|
||||
local tdef = minetest.registered_tools[toolname]
|
||||
local groupcaps = table.copy(get_tool_capabilities(tdef).groupcaps or {})
|
||||
add_groupcaps(toolname, groupcaps, tdef._mcl_diggroups, efficiency)
|
||||
return groupcaps
|
||||
|
@ -352,7 +350,7 @@ local function overwrite()
|
|||
end
|
||||
end
|
||||
|
||||
for tname, tdef in pairs(minetest.registered_items) do
|
||||
for tname, tdef in pairs(minetest.registered_tools) do
|
||||
-- Assign groupcaps for digging the registered digging groups
|
||||
-- depending on the _mcl_diggroups in the tool definition
|
||||
if tdef._mcl_diggroups then
|
||||
|
@ -362,12 +360,6 @@ local function overwrite()
|
|||
minetest.override_item(tname, {
|
||||
tool_capabilities = toolcaps
|
||||
})
|
||||
else
|
||||
-- This is needed to deal damage when punching mobs
|
||||
-- with random items in hand in survival mode
|
||||
minetest.override_item(tname, {
|
||||
tool_capabilities = mcl_meshhand.survival_hand_tool_caps
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
# mcl_autogroup
|
||||
This mod emulate digging times from mc.
|
||||
|
||||
## mcl_autogroup.can_harvest(nodename, toolname, player)
|
||||
Return true if <nodename> can be dig with <toolname> by <player>.
|
||||
## mcl_autogroup.can_harvest(nodename, toolname)
|
||||
Return true if <nodename> can be dig with <toolname>.
|
||||
* nodename: string, valid nodename
|
||||
* toolname: (optional) string, valid toolname
|
||||
* player: (optinal) ObjectRef, valid player
|
||||
|
||||
## mcl_autogroup.get_groupcaps(toolname, efficiency)
|
||||
This function is used to calculate diggroups for tools.
|
||||
|
|
|
@ -252,17 +252,10 @@ function minetest.handle_node_drops(pos, drops, digger)
|
|||
-- NOTE: This function override allows digger to be nil.
|
||||
-- This means there is no digger. This is a special case which allows this function to be called
|
||||
-- by hand. Creative Mode is intentionally ignored in this case.
|
||||
if digger and digger:is_player() and minetest.is_creative_enabled(digger:get_player_name()) then
|
||||
local inv = digger:get_inventory()
|
||||
if inv then
|
||||
for _, item in ipairs(drops) do
|
||||
if not inv:contains_item("main", item, true) then
|
||||
inv:add_item("main", item)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (digger and digger:is_player() and minetest.is_creative_enabled(digger:get_player_name())) or doTileDrops == false then
|
||||
return
|
||||
elseif not doTileDrops then return end
|
||||
end
|
||||
|
||||
-- Check if node will yield its useful drop by the digger's tool
|
||||
local dug_node = minetest.get_node(pos)
|
||||
|
@ -270,9 +263,9 @@ function minetest.handle_node_drops(pos, drops, digger)
|
|||
local tool
|
||||
if digger then
|
||||
tool = digger:get_wielded_item()
|
||||
tooldef = minetest.registered_items[tool:get_name()]
|
||||
tooldef = minetest.registered_tools[tool:get_name()]
|
||||
|
||||
if not mcl_autogroup.can_harvest(dug_node.name, tool:get_name(), digger) then
|
||||
if not mcl_autogroup.can_harvest(dug_node.name, tool:get_name()) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
|
@ -335,27 +335,24 @@ function mob_class:on_step(dtime)
|
|||
|
||||
if self:check_despawn(pos, dtime) then return true end
|
||||
|
||||
if self:check_death_and_slow_mob() then
|
||||
--minetest.log("action", "Mob is dying: ".. tostring(self.name))
|
||||
-- Do we abandon out of here now?
|
||||
end
|
||||
|
||||
self:slow_mob()
|
||||
if self:falling(pos) then return end
|
||||
self:check_suspend()
|
||||
|
||||
self:check_water_flow()
|
||||
|
||||
self:env_danger_movement_checks (dtime)
|
||||
|
||||
if not self.fire_resistant then
|
||||
mcl_burning.tick(self.object, dtime, self)
|
||||
-- mcl_burning.tick may remove object immediately
|
||||
if not self.object:get_pos() then return end
|
||||
end
|
||||
|
||||
if self.state == "die" then return end
|
||||
|
||||
self:check_water_flow()
|
||||
self:env_danger_movement_checks (dtime)
|
||||
|
||||
if mobs_debug then self:update_tag() end
|
||||
|
||||
if self.state == "die" then return end
|
||||
|
||||
self:follow_flop() -- Mob following code.
|
||||
|
||||
self:set_animation_speed() -- set animation speed relitive to velocity
|
||||
|
|
|
@ -279,7 +279,6 @@ function mob_class:env_danger_movement_checks(dtime)
|
|||
yaw = self:set_yaw( yaw, 8)
|
||||
end
|
||||
else
|
||||
-- This code should probably be moved to movement code
|
||||
if self.move_in_group ~= false then
|
||||
self:check_herd(dtime)
|
||||
end
|
||||
|
|
|
@ -47,8 +47,7 @@ end
|
|||
|
||||
function mob_class:player_in_active_range()
|
||||
for _,p in pairs(minetest.get_connected_players()) do
|
||||
local pos = self.object:get_pos()
|
||||
if pos and vector.distance(pos, p:get_pos()) <= mob_active_range then return true end
|
||||
if vector.distance(self.object:get_pos(),p:get_pos()) <= mob_active_range then return true end
|
||||
-- slightly larger than the mc 32 since mobs spawn on that circle and easily stand still immediately right after spawning.
|
||||
end
|
||||
end
|
||||
|
@ -183,17 +182,15 @@ function mob_class:collision()
|
|||
return({x,z})
|
||||
end
|
||||
|
||||
function mob_class:check_death_and_slow_mob()
|
||||
function mob_class:slow_mob()
|
||||
local d = 0.85
|
||||
local dying = self:check_dying()
|
||||
if dying then d = 0.92 end
|
||||
if self:check_dying() then d = 0.92 end
|
||||
|
||||
local v = self.object:get_velocity()
|
||||
if v then
|
||||
--diffuse object velocity
|
||||
self.object:set_velocity({x = v.x*d, y = v.y, z = v.z*d})
|
||||
end
|
||||
return dying
|
||||
end
|
||||
|
||||
-- move mob in facing direction
|
||||
|
@ -522,16 +519,17 @@ function mob_class:check_for_death(cause, cmi_cause)
|
|||
|
||||
self:set_velocity(0)
|
||||
local acc = self.object:get_acceleration()
|
||||
if acc then
|
||||
acc.x, acc.y, acc.z = 0, DEFAULT_FALL_SPEED, 0
|
||||
self.object:set_acceleration(acc)
|
||||
end
|
||||
|
||||
local length
|
||||
-- default death function and die animation (if defined)
|
||||
if self.instant_death then
|
||||
length = 0
|
||||
elseif self.animation and self.animation.die_start and self.animation.die_end then
|
||||
elseif self.animation
|
||||
and self.animation.die_start
|
||||
and self.animation.die_end then
|
||||
|
||||
local frames = self.animation.die_end - self.animation.die_start
|
||||
local speed = self.animation.die_speed or 15
|
||||
length = math.max(frames / speed, 0) + DEATH_DELAY
|
||||
|
@ -547,6 +545,7 @@ function mob_class:check_for_death(cause, cmi_cause)
|
|||
if not self.object:get_luaentity() then
|
||||
return
|
||||
end
|
||||
|
||||
death_handle(self)
|
||||
local dpos = self.object:get_pos()
|
||||
local cbox = self.collisionbox
|
||||
|
@ -555,7 +554,6 @@ function mob_class:check_for_death(cause, cmi_cause)
|
|||
self.object:remove()
|
||||
mcl_mobs.death_effect(dpos, yaw, cbox, not self.instant_death)
|
||||
end
|
||||
|
||||
if length <= 0 then
|
||||
kill(self)
|
||||
else
|
||||
|
@ -872,8 +870,9 @@ function mob_class:falling(pos)
|
|||
|
||||
-- floating in water (or falling)
|
||||
local v = self.object:get_velocity()
|
||||
if v then
|
||||
|
||||
if v.y > 0 then
|
||||
|
||||
-- apply gravity when moving up
|
||||
self.object:set_acceleration({
|
||||
x = 0,
|
||||
|
@ -882,6 +881,7 @@ function mob_class:falling(pos)
|
|||
})
|
||||
|
||||
elseif v.y <= 0 and v.y > self.fall_speed then
|
||||
|
||||
-- fall downwards at set speed
|
||||
self.object:set_acceleration({
|
||||
x = 0,
|
||||
|
@ -892,12 +892,11 @@ function mob_class:falling(pos)
|
|||
-- stop accelerating once max fall speed hit
|
||||
self.object:set_acceleration({x = 0, y = 0, z = 0})
|
||||
end
|
||||
end
|
||||
|
||||
local acc = self.object:get_acceleration()
|
||||
|
||||
if minetest.registered_nodes[node_ok(pos).name].groups.lava then
|
||||
if acc and self.floats_on_lava == 1 then
|
||||
|
||||
if self.floats_on_lava == 1 then
|
||||
|
||||
self.object:set_acceleration({
|
||||
x = 0,
|
||||
y = -self.fall_speed / (math.max(1, v.y) ^ 2),
|
||||
|
@ -908,7 +907,9 @@ function mob_class:falling(pos)
|
|||
|
||||
-- in water then float up
|
||||
if minetest.registered_nodes[node_ok(pos).name].groups.water then
|
||||
if acc and self.floats == 1 then
|
||||
|
||||
if self.floats == 1 then
|
||||
|
||||
self.object:set_acceleration({
|
||||
x = 0,
|
||||
y = -self.fall_speed / (math.max(1, v.y) ^ 2),
|
||||
|
@ -916,8 +917,10 @@ function mob_class:falling(pos)
|
|||
})
|
||||
end
|
||||
else
|
||||
|
||||
-- fall damage onto solid ground
|
||||
if self.fall_damage == 1 and self.object:get_velocity().y == 0 then
|
||||
if self.fall_damage == 1
|
||||
and self.object:get_velocity().y == 0 then
|
||||
local n = node_ok(vector.offset(pos,0,-1,0)).name
|
||||
local d = (self.old_y or 0) - self.object:get_pos().y
|
||||
|
||||
|
@ -978,24 +981,18 @@ end
|
|||
function mob_class:check_dying()
|
||||
if ((self.state and self.state=="die") or self:check_for_death()) and not self.animation.die_end then
|
||||
local rot = self.object:get_rotation()
|
||||
if rot then
|
||||
rot.z = ((math.pi/2-rot.z)*.2)+rot.z
|
||||
self.object:set_rotation(rot)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
function mob_class:check_suspend()
|
||||
if not self:player_in_active_range() then
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
if pos and not self:player_in_active_range() then
|
||||
local node_under = node_ok(vector.offset(pos,0,-1,0)).name
|
||||
|
||||
self:set_animation( "stand", true)
|
||||
|
||||
local acc = self.object:get_acceleration()
|
||||
if acc then
|
||||
self:set_animation( "stand", true)
|
||||
if acc.y > 0 or node_under ~= "air" then
|
||||
self.object:set_acceleration(vector.new(0,0,0))
|
||||
self.object:set_velocity(vector.new(0,0,0))
|
||||
|
@ -1003,7 +1000,6 @@ function mob_class:check_suspend()
|
|||
if acc.y == 0 and node_under == "air" then
|
||||
self:falling(pos)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -210,23 +210,9 @@ mcl_weather.skycolor = {
|
|||
end
|
||||
end
|
||||
elseif dim == "end" then
|
||||
local biomesky = "#000000"
|
||||
local biomefog = "#A080A0"
|
||||
if mg_name ~= "v6" and mg_name ~= "singlenode" 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
|
||||
--minetest.log("action", string.format("Biome found for number: %s in biome: %s", tostring(biome_index), biome_name))
|
||||
biomesky = biome._mcl_skycolor
|
||||
biomefog = biome._mcl_fogcolor -- The End biomes seemingly don't use the fog colour, despite having this value according to the wiki. The sky colour is seemingly used for both sky and fog?
|
||||
else
|
||||
--minetest.log("action", string.format("No biome for number: %s in biome: %s", tostring(biome_index), biome_name))
|
||||
end
|
||||
end
|
||||
local t = "mcl_playerplus_end_sky.png"
|
||||
player:set_sky({ type = "skybox",
|
||||
base_color = biomesky,
|
||||
base_color = "#000000",
|
||||
textures = {t,t,t,t,t,t},
|
||||
clouds = false,
|
||||
})
|
||||
|
@ -235,29 +221,24 @@ mcl_weather.skycolor = {
|
|||
player:set_stars({visible = false})
|
||||
mcl_weather.skycolor.override_day_night_ratio(player, 0.5)
|
||||
elseif dim == "nether" then
|
||||
local biomesky = "#6EB1FF"
|
||||
local biomefog = "#330808"
|
||||
if mg_name ~= "v6" and mg_name ~= "singlenode" 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
|
||||
--minetest.log("action", string.format("Biome found for number: %s in biome: %s", tostring(biome_index), biome_name))
|
||||
biomesky = biome._mcl_skycolor -- The Nether biomes seemingly don't use the sky colour, despite having this value according to the wiki. The fog colour is used for both sky and fog.
|
||||
biomefog = biome._mcl_fogcolor
|
||||
else
|
||||
--minetest.log("action", string.format("No biome for number: %s in biome: %s", tostring(biome_index), biome_name))
|
||||
end
|
||||
end
|
||||
local nether_sky = {
|
||||
Nether = "#300808",
|
||||
BasaltDelta = "#685F70",
|
||||
SoulsandValley = "#1B4745",
|
||||
CrimsonForest = "#330303",
|
||||
WarpedForest = "#1A051A"
|
||||
}
|
||||
local biometint = nether_sky[minetest.get_biome_name(minetest.get_biome_data(player:get_pos()).biome)]
|
||||
|
||||
mcl_weather.set_sky_color(player, {
|
||||
type = "regular",
|
||||
sky_color = {
|
||||
day_sky = biomefog,
|
||||
day_horizon = biomefog,
|
||||
dawn_sky = biomefog,
|
||||
dawn_horizon = biomefog,
|
||||
night_sky = biomefog,
|
||||
night_horizon = biomefog,
|
||||
day_sky = "#300808",
|
||||
day_horizon = biometint,
|
||||
dawn_sky = "#300808",
|
||||
dawn_horizon = biometint,
|
||||
night_sky = "#300808",
|
||||
night_horizon = biometint,
|
||||
},
|
||||
clouds = false,
|
||||
})
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local ASSIST_TIMEOUT_SEC = 5
|
||||
|
||||
mcl_death_messages = {
|
||||
assist = {},
|
||||
messages = {
|
||||
|
@ -183,10 +181,8 @@ local function get_killer_message(obj, messages, reason)
|
|||
end
|
||||
|
||||
local function get_assist_message(obj, messages, reason)
|
||||
-- Avoid a timing issue if the assist passes its timeout.
|
||||
local assist_details = mcl_death_messages.assist[obj]
|
||||
if messages.assist and assist_details then
|
||||
return messages._translator(messages.assist, mcl_util.get_object_name(obj), assist_details.name)
|
||||
if messages.assist and mcl_death_messages.assist[obj] then
|
||||
return messages._translator(messages.assist, mcl_util.get_object_name(obj), mcl_death_messages.assist[obj].name)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -236,17 +232,20 @@ mcl_damage.register_on_death(function(obj, reason)
|
|||
end)
|
||||
|
||||
mcl_damage.register_on_damage(function(obj, damage, reason)
|
||||
if (obj:get_hp() - damage > 0) and reason.source and
|
||||
(reason.source:is_player() or obj:get_luaentity()) then
|
||||
-- To avoid timing issues we cancel the previous job before adding a new one.
|
||||
if mcl_death_messages.assist[obj] then
|
||||
mcl_death_messages.assist[obj].job:cancel()
|
||||
end
|
||||
|
||||
-- Add a new assist object with a timeout job.
|
||||
local new_job = minetest.after(ASSIST_TIMEOUT_SEC, function()
|
||||
if obj:get_hp() - damage > 0 then
|
||||
if reason.source then
|
||||
mcl_death_messages.assist[obj] = {name = mcl_util.get_object_name(reason.source), timeout = 5}
|
||||
else
|
||||
mcl_death_messages.assist[obj] = nil
|
||||
end)
|
||||
mcl_death_messages.assist[obj] = {name = mcl_util.get_object_name(reason.source), job = new_job}
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_globalstep(function(dtime)
|
||||
for obj, tbl in pairs(mcl_death_messages.assist) do
|
||||
tbl.timeout = tbl.timeout - dtime
|
||||
if not obj:is_player() and not obj:get_luaentity() or tbl.timeout > 0 then
|
||||
mcl_death_messages.assist[obj] = nil
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -156,7 +156,6 @@ local function set_inv_page(page, player)
|
|||
creative_list = inventory_lists[page]
|
||||
end
|
||||
inv:set_size("main", #creative_list)
|
||||
players[playername].inv_size = #creative_list
|
||||
inv:set_list("main", creative_list)
|
||||
end
|
||||
|
||||
|
@ -305,21 +304,37 @@ minetest.register_on_joinplayer(function (player)
|
|||
end
|
||||
end)
|
||||
|
||||
function mcl_inventory.set_creative_formspec(player)
|
||||
local playername = player:get_player_name()
|
||||
if not players[playername] then return end
|
||||
function mcl_inventory.set_creative_formspec(player, start_i, pagenum, inv_size, show, page, filter)
|
||||
--reset_menu_item_bg()
|
||||
pagenum = math.floor(pagenum) or 1
|
||||
|
||||
local start_i = players[playername].start_i
|
||||
local pagenum = start_i / (9*5) + 1
|
||||
local name = players[playername].page
|
||||
local inv_size = players[playername].inv_size
|
||||
local filter = players[playername].filter
|
||||
local playername = player:get_player_name()
|
||||
|
||||
if not inv_size then
|
||||
if page == "nix" then
|
||||
local inv = minetest.get_inventory({type="detached", name="creative_"..playername})
|
||||
inv_size = inv:get_size("main")
|
||||
elseif page and page ~= "inv" then
|
||||
inv_size = #(inventory_lists[page])
|
||||
else
|
||||
inv_size = 0
|
||||
end
|
||||
end
|
||||
local pagemax = math.max(1, math.floor((inv_size-1) / (9*5) + 1))
|
||||
local name = "nix"
|
||||
local main_list
|
||||
local listrings = "listring[detached:creative_"..playername..";main]"..
|
||||
"listring[current_player;main]"..
|
||||
"listring[detached:trash;main]"
|
||||
|
||||
if page then
|
||||
name = page
|
||||
if players[playername] then
|
||||
players[playername].page = page
|
||||
end
|
||||
end
|
||||
--bg[name] = "crafting_creative_bg.png"
|
||||
|
||||
local inv_bg = "crafting_inventory_creative.png"
|
||||
if name == "inv" then
|
||||
inv_bg = "crafting_inventory_creative_survival.png"
|
||||
|
@ -478,6 +493,9 @@ function mcl_inventory.set_creative_formspec(player)
|
|||
listrings
|
||||
|
||||
if name == "nix" then
|
||||
if filter == nil then
|
||||
filter = ""
|
||||
end
|
||||
formspec = formspec .. "field[5.3,1.34;4,0.75;search;;"..minetest.formspec_escape(filter).."]"
|
||||
formspec = formspec .. "field_close_on_enter[search;false]"
|
||||
end
|
||||
|
@ -564,11 +582,16 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
|
||||
if page then
|
||||
players[name].page = page
|
||||
else
|
||||
end
|
||||
if players[name].page then
|
||||
page = players[name].page
|
||||
end
|
||||
|
||||
-- Figure out current scroll bar from formspec
|
||||
--local formspec = player:get_inventory_formspec()
|
||||
|
||||
local start_i = players[name].start_i
|
||||
|
||||
if fields.creative_prev then
|
||||
start_i = start_i - 9*5
|
||||
elseif fields.creative_next then
|
||||
|
@ -590,7 +613,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
else
|
||||
inv_size = 0
|
||||
end
|
||||
players[name].inv_size = inv_size
|
||||
|
||||
if start_i >= inv_size then
|
||||
start_i = start_i - 9*5
|
||||
|
@ -600,19 +622,72 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
players[name].start_i = start_i
|
||||
|
||||
if not fields.nix and fields.search then
|
||||
players[name].filter = fields.search
|
||||
else
|
||||
players[name].filter = ""
|
||||
local filter = ""
|
||||
if not fields.nix and fields.search and fields.search ~= "" then
|
||||
filter = fields.search
|
||||
players[name].filter = filter
|
||||
end
|
||||
|
||||
mcl_inventory.set_creative_formspec(player)
|
||||
mcl_inventory.set_creative_formspec(player, start_i, start_i / (9*5) + 1, inv_size, false, page, filter)
|
||||
end)
|
||||
|
||||
|
||||
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
|
||||
return placer and placer:is_player() and minetest.is_creative_enabled(placer:get_player_name())
|
||||
end)
|
||||
if minetest.is_creative_enabled("") then
|
||||
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
|
||||
-- Place infinite nodes, except for shulker boxes
|
||||
local group = minetest.get_item_group(itemstack:get_name(), "shulker_box")
|
||||
return group == 0 or group == nil
|
||||
end)
|
||||
|
||||
function minetest.handle_node_drops(pos, drops, digger)
|
||||
if not digger or not digger:is_player() then
|
||||
for _,item in ipairs(drops) do
|
||||
minetest.add_item(pos, item)
|
||||
end
|
||||
end
|
||||
local inv = digger:get_inventory()
|
||||
if inv then
|
||||
for _,item in ipairs(drops) do
|
||||
if not inv:contains_item("main", item, true) then
|
||||
inv:add_item("main", item)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
mcl_inventory.update_inventory_formspec = function(player)
|
||||
local page
|
||||
|
||||
local name = player:get_player_name()
|
||||
|
||||
if players[name].page then
|
||||
page = players[name].page
|
||||
else
|
||||
page = "nix"
|
||||
end
|
||||
|
||||
-- Figure out current scroll bar from formspec
|
||||
--local formspec = player:get_inventory_formspec()
|
||||
local start_i = players[name].start_i
|
||||
|
||||
local inv_size
|
||||
if page == "nix" then
|
||||
local inv = minetest.get_inventory({type="detached", name="creative_"..name})
|
||||
inv_size = inv:get_size("main")
|
||||
elseif page and page ~= "inv" then
|
||||
inv_size = #(inventory_lists[page])
|
||||
else
|
||||
inv_size = 0
|
||||
end
|
||||
|
||||
local filter = players[name].filter
|
||||
if filter == nil then
|
||||
filter = ""
|
||||
end
|
||||
|
||||
mcl_inventory.set_creative_formspec(player, start_i, start_i / (9*5) + 1, inv_size, false, page, filter)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
-- Initialize variables and inventory
|
||||
|
@ -625,7 +700,7 @@ minetest.register_on_joinplayer(function(player)
|
|||
end
|
||||
init(player)
|
||||
-- Setup initial creative inventory to the "nix" page.
|
||||
mcl_inventory.set_creative_formspec(player)
|
||||
mcl_inventory.set_creative_formspec(player, 0, 1, nil, false, "nix", "")
|
||||
end)
|
||||
|
||||
minetest.register_on_player_inventory_action(function(player, action, inventory, inventory_info)
|
||||
|
|
|
@ -46,9 +46,14 @@ function return_fields(player, name)
|
|||
end
|
||||
end
|
||||
|
||||
local function set_inventory(player)
|
||||
local function set_inventory(player, armor_change_only)
|
||||
if minetest.is_creative_enabled(player:get_player_name()) then
|
||||
mcl_inventory.set_creative_formspec(player)
|
||||
if armor_change_only then
|
||||
-- Stay on survival inventory plage if only the armor has been changed
|
||||
mcl_inventory.set_creative_formspec(player, 0, 0, nil, nil, "inv")
|
||||
else
|
||||
mcl_inventory.set_creative_formspec(player, 0, 1)
|
||||
end
|
||||
return
|
||||
end
|
||||
local inv = player:get_inventory()
|
||||
|
@ -138,7 +143,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
end)
|
||||
|
||||
mcl_inventory.update_inventory_formspec = set_inventory
|
||||
if not minetest.is_creative_enabled("") then
|
||||
function mcl_inventory.update_inventory_formspec(player)
|
||||
set_inventory(player)
|
||||
end
|
||||
end
|
||||
|
||||
-- Drop crafting grid items on leaving
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
|
@ -190,6 +199,24 @@ function minetest.is_creative_enabled(name)
|
|||
return false
|
||||
end
|
||||
|
||||
--Insta "digging" nodes in gamemode-creative
|
||||
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
||||
if not puncher or not puncher:is_player() then return end
|
||||
local name = puncher:get_player_name()
|
||||
if not minetest.is_creative_enabled(name) then return end
|
||||
if pointed_thing.type ~= "node" then return end
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
if def then
|
||||
minetest.node_dig(pos,node,puncher)
|
||||
return true
|
||||
end
|
||||
end)
|
||||
|
||||
--Don't subtract from inv when placing in gamemode-creative
|
||||
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
|
||||
if placer and placer:is_player() and minetest.is_creative_enabled(placer:get_player_name()) then return true end
|
||||
end)
|
||||
|
||||
local function in_table(n,h)
|
||||
for k,v in pairs(h) do
|
||||
if v == n then return true end
|
||||
|
@ -211,7 +238,6 @@ function mcl_inventory.player_set_gamemode(p,g)
|
|||
elseif g == "creative" then
|
||||
mcl_experience.remove_hud(p)
|
||||
end
|
||||
mcl_meshhand.update_player(p)
|
||||
set_inventory(p)
|
||||
end
|
||||
|
||||
|
|
|
@ -809,7 +809,7 @@ function mcl_core.get_grass_palette_index(pos)
|
|||
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
|
||||
index = reg_biome._mcl_palette_index
|
||||
end
|
||||
end
|
||||
return index
|
||||
|
@ -939,7 +939,7 @@ minetest.register_lbm({
|
|||
else
|
||||
node.name = "mcl_core:dirt_with_grass"
|
||||
end
|
||||
node.param2 = reg_biome._mcl_grass_palette_index
|
||||
node.param2 = reg_biome._mcl_palette_index
|
||||
-- Fall back to savanna palette index
|
||||
if not node.param2 then
|
||||
node.param2 = SAVANNA_INDEX
|
||||
|
|
|
@ -373,7 +373,7 @@ minetest.register_node("mcl_core:dirt_with_grass", {
|
|||
overlay_tiles = {"mcl_core_grass_block_top.png", "", {name="mcl_core_grass_block_side_overlay.png", tileable_vertical=false}},
|
||||
palette = "mcl_core_palette_grass.png",
|
||||
palette_index = 0,
|
||||
color = "#7CBD6B",
|
||||
color = "#8EB971",
|
||||
is_ground_content = true,
|
||||
stack_max = 64,
|
||||
groups = {
|
||||
|
|
|
@ -35,14 +35,7 @@ function mcl_core.update_leaves(pos, oldnode)
|
|||
-- manually placed leaf nodes have param2
|
||||
-- set and will never decay automatically
|
||||
if lnode.param2 == 0 then
|
||||
local orphan_name = lnode.name .. "_orphan"
|
||||
local def = minetest.registered_nodes[orphan_name]
|
||||
if def then
|
||||
--minetest.log("Registered: ".. orphan_name)
|
||||
minetest.swap_node(lpos, {name = orphan_name})
|
||||
else
|
||||
--minetest.log("Not registered: ".. orphan_name)
|
||||
end
|
||||
minetest.swap_node(lpos, {name = lnode.name .. "_orphan"})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ local get_palette_color_from_pos = function(pos)
|
|||
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
|
||||
index = reg_biome._mcl_palette_index
|
||||
end
|
||||
end
|
||||
return index
|
||||
|
|
|
@ -19,6 +19,50 @@ dig_speed_class group:
|
|||
- 7: Instantaneous
|
||||
]]
|
||||
|
||||
-- The hand
|
||||
local groupcaps, hand_range, hand_groups
|
||||
|
||||
if minetest.is_creative_enabled("") then
|
||||
-- Instant breaking in creative mode
|
||||
groupcaps = { creative_breakable = { times = {0}, uses = 0 } }
|
||||
hand_range = tonumber(minetest.settings:get("mcl_hand_range_creative")) or 10
|
||||
hand_groups = { dig_speed_class = 7 }
|
||||
else
|
||||
groupcaps = {}
|
||||
hand_range = tonumber(minetest.settings:get("mcl_hand_range")) or 4.5
|
||||
hand_groups = { dig_speed_class = 1 }
|
||||
end
|
||||
minetest.register_tool(":", {
|
||||
type = "none",
|
||||
_doc_items_longdesc = S("You use your bare hand whenever you are not wielding any item. With your hand you can mine most blocks, but this is the slowest method and only the weakest blocks will yield their useful drop. The hand also deals minor damage by punching. Using the hand is often a last resort, as proper mining tools and weapons are much better.").."\n"..
|
||||
S("When you are wielding an item which is not a mining tool or a weapon, it will behave as if it were the hand when you start mining or punching.").."\n"..
|
||||
S("In Creative Mode, the hand is able to break all blocks instantly."),
|
||||
wield_image = "blank.png",
|
||||
wield_scale = {x=1.0,y=1.0,z=2.0},
|
||||
-- According to Minecraft Wiki, the exact range is 3.975.
|
||||
-- Minetest seems to only support whole numbers, so we use 4.
|
||||
range = hand_range,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.25,
|
||||
max_drop_level = 0,
|
||||
groupcaps = groupcaps,
|
||||
damage_groups = {fleshy=1},
|
||||
},
|
||||
groups = hand_groups,
|
||||
_mcl_diggroups = {
|
||||
handy = { speed = 1, level = 1, uses = 0 },
|
||||
axey = { speed = 1, level = 1, uses = 0 },
|
||||
shovely = { speed = 1, level = 1, uses = 0 },
|
||||
hoey = { speed = 1, level = 1, uses = 0 },
|
||||
pickaxey = { speed = 1, level = 0, uses = 0 },
|
||||
swordy = { speed = 1, level = 0, uses = 0 },
|
||||
swordy_cobweb = { speed = 1, level = 0, uses = 0 },
|
||||
shearsy = { speed = 1, level = 0, uses = 0 },
|
||||
shearsy_wool = { speed = 1, level = 0, uses = 0 },
|
||||
shearsy_cobweb = { speed = 1, level = 0, uses = 0 },
|
||||
}
|
||||
})
|
||||
|
||||
-- Help texts
|
||||
local pickaxe_longdesc = S("Pickaxes are mining tools to mine hard blocks, such as stone. A pickaxe can also be used as weapon, but it is rather inefficient.")
|
||||
local axe_longdesc = S("An axe is your tool of choice to cut down trees, wood-based blocks and other blocks. Axes deal a lot of damage as well, but they are rather slow.")
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
local overworld_fogcolor = "#C0D8FF"
|
||||
local beach_skycolor = "#78A7FF" -- This is the case for all beach biomes except for the snowy ones! Those beaches will have their own colour instead of this one.
|
||||
local ocean_skycolor = "#7BA4FF" -- This is the case for all ocean biomes except for non-deep frozen oceans! Those oceans will have their own colour instead of this one.
|
||||
|
||||
local nether_skycolor = "#6EB1FF" -- The Nether biomes seemingly don't use the sky colour, despite having this value according to the wiki. The fog colour is used for both sky and fog.
|
||||
|
||||
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 mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
local mg_seed = minetest.get_mapgen_setting("seed")
|
||||
|
||||
|
@ -50,7 +41,7 @@ local function register_classic_superflat_biome()
|
|||
humidity_point = 50,
|
||||
heat_point = 50,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_palette_index = 0,
|
||||
_mcl_skycolor = "#78A7FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -143,6 +134,15 @@ local function register_biomes()
|
|||
"BambooJungleEdgeM",
|
||||
}
|
||||
|
||||
local beach_skycolor = "#78A7FF" -- This is the case for all beach biomes except for the snowy ones! Those beaches will have their own colour instead of this one.
|
||||
local ocean_skycolor = "#7BA4FF" -- This is the case for all ocean biomes except for non-deep frozen oceans! Those oceans will have their own colour instead of this one.
|
||||
local overworld_fogcolor = "#C0D8FF"
|
||||
|
||||
local nether_skycolor = "#6EB1FF"
|
||||
|
||||
local end_fogcolor = "#A080A0"
|
||||
local end_skycolor = "#000000"
|
||||
|
||||
-- Ice Plains Spikes (rare)
|
||||
minetest.register_biome({
|
||||
name = "IcePlainsSpikes",
|
||||
|
@ -160,7 +160,7 @@ local function register_biomes()
|
|||
humidity_point = 24,
|
||||
heat_point = -5,
|
||||
_mcl_biome_type = "snowy",
|
||||
_mcl_grass_palette_index = 2,
|
||||
_mcl_palette_index = 2,
|
||||
_mcl_skycolor = "#7FA1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -178,7 +178,7 @@ local function register_biomes()
|
|||
humidity_point = 24,
|
||||
heat_point = -5,
|
||||
_mcl_biome_type = "snowy",
|
||||
_mcl_grass_palette_index = 2,
|
||||
_mcl_palette_index = 2,
|
||||
_mcl_skycolor = "#7FA1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -198,7 +198,7 @@ local function register_biomes()
|
|||
humidity_point = 58,
|
||||
heat_point = 8,
|
||||
_mcl_biome_type = "snowy",
|
||||
_mcl_grass_palette_index = 3,
|
||||
_mcl_palette_index = 3,
|
||||
_mcl_skycolor = "#839EFF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -220,7 +220,7 @@ local function register_biomes()
|
|||
humidity_point = 58,
|
||||
heat_point = 8,
|
||||
_mcl_biome_type = "snowy",
|
||||
_mcl_grass_palette_index = 3,
|
||||
_mcl_palette_index = 3,
|
||||
_mcl_skycolor = "#7FA1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -240,7 +240,7 @@ local function register_biomes()
|
|||
humidity_point = 58,
|
||||
heat_point = 8,
|
||||
_mcl_biome_type = "snowy",
|
||||
_mcl_grass_palette_index = 3,
|
||||
_mcl_palette_index = 3,
|
||||
_mcl_skycolor = "#7FA1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -258,7 +258,7 @@ local function register_biomes()
|
|||
heat_point = 8,
|
||||
vertical_blend = 1,
|
||||
_mcl_biome_type = "snowy",
|
||||
_mcl_grass_palette_index = 3,
|
||||
_mcl_palette_index = 3,
|
||||
_mcl_skycolor = "#7FA1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -277,7 +277,7 @@ local function register_biomes()
|
|||
humidity_point = 76,
|
||||
heat_point = 10,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 4,
|
||||
_mcl_palette_index = 4,
|
||||
_mcl_skycolor = "#7CA3FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -294,7 +294,7 @@ local function register_biomes()
|
|||
humidity_point = 76,
|
||||
heat_point = 10,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 4,
|
||||
_mcl_palette_index = 4,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -313,7 +313,7 @@ local function register_biomes()
|
|||
humidity_point = 100,
|
||||
heat_point = 8,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 5,
|
||||
_mcl_palette_index = 5,
|
||||
_mcl_skycolor = "#7DA3FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -330,7 +330,7 @@ local function register_biomes()
|
|||
humidity_point = 100,
|
||||
heat_point = 8,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 5,
|
||||
_mcl_palette_index = 5,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -350,7 +350,7 @@ local function register_biomes()
|
|||
humidity_point = 10,
|
||||
heat_point = 45,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 6,
|
||||
_mcl_palette_index = 6,
|
||||
_mcl_skycolor = "#7DA2FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -368,7 +368,7 @@ local function register_biomes()
|
|||
humidity_point = 10,
|
||||
heat_point = 45,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 6,
|
||||
_mcl_palette_index = 6,
|
||||
_mcl_skycolor = beach_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -386,7 +386,7 @@ local function register_biomes()
|
|||
humidity_point = 10,
|
||||
heat_point = 45,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 6,
|
||||
_mcl_palette_index = 6,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -406,7 +406,7 @@ local function register_biomes()
|
|||
humidity_point = 0,
|
||||
heat_point = 25,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 7,
|
||||
_mcl_palette_index = 7,
|
||||
_mcl_skycolor = "#7DA2FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -423,7 +423,7 @@ local function register_biomes()
|
|||
humidity_point = 0,
|
||||
heat_point = 25,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 7,
|
||||
_mcl_palette_index = 7,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -445,7 +445,7 @@ local function register_biomes()
|
|||
heat_point = 25,
|
||||
vertical_blend = 6,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 8,
|
||||
_mcl_palette_index = 8,
|
||||
_mcl_skycolor = "#7DA2FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -465,7 +465,7 @@ local function register_biomes()
|
|||
humidity_point = 24,
|
||||
heat_point = 25,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 8,
|
||||
_mcl_palette_index = 8,
|
||||
_mcl_skycolor = "#7DA2FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -482,7 +482,7 @@ local function register_biomes()
|
|||
humidity_point = 24,
|
||||
heat_point = 25,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 8,
|
||||
_mcl_palette_index = 8,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -499,7 +499,7 @@ local function register_biomes()
|
|||
humidity_point = 0,
|
||||
heat_point = 8,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 9,
|
||||
_mcl_palette_index = 9,
|
||||
_mcl_skycolor = "#7DA2FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -516,7 +516,7 @@ local function register_biomes()
|
|||
humidity_point = 0,
|
||||
heat_point = 8,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 9,
|
||||
_mcl_palette_index = 9,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -539,7 +539,7 @@ local function register_biomes()
|
|||
humidity_point = 24,
|
||||
heat_point = 8,
|
||||
_mcl_biome_type = "snowy",
|
||||
_mcl_grass_palette_index = 10,
|
||||
_mcl_palette_index = 10,
|
||||
_mcl_skycolor = "#7FA1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -556,7 +556,7 @@ local function register_biomes()
|
|||
humidity_point = 24,
|
||||
heat_point = 8,
|
||||
_mcl_biome_type = "snowy",
|
||||
_mcl_grass_palette_index = 10,
|
||||
_mcl_palette_index = 10,
|
||||
_mcl_skycolor = "#7FA1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -575,7 +575,7 @@ local function register_biomes()
|
|||
humidity_point = 39,
|
||||
heat_point = 58,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_palette_index = 0,
|
||||
_mcl_skycolor = "#78A7FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -592,7 +592,7 @@ local function register_biomes()
|
|||
humidity_point = 39,
|
||||
heat_point = 58,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_palette_index = 0,
|
||||
_mcl_skycolor = beach_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -609,7 +609,7 @@ local function register_biomes()
|
|||
humidity_point = 39,
|
||||
heat_point = 58,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_palette_index = 0,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -628,7 +628,7 @@ local function register_biomes()
|
|||
humidity_point = 28,
|
||||
heat_point = 45,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 11,
|
||||
_mcl_palette_index = 11,
|
||||
_mcl_skycolor = "#78A7FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -645,7 +645,7 @@ local function register_biomes()
|
|||
humidity_point = 28,
|
||||
heat_point = 45,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 11,
|
||||
_mcl_palette_index = 11,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -664,7 +664,7 @@ local function register_biomes()
|
|||
humidity_point = 58,
|
||||
heat_point = 22,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 12,
|
||||
_mcl_palette_index = 12,
|
||||
_mcl_skycolor = "#7DA3FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -681,7 +681,7 @@ local function register_biomes()
|
|||
humidity_point = 58,
|
||||
heat_point = 22,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 12,
|
||||
_mcl_palette_index = 12,
|
||||
_mcl_skycolor = beach_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -698,7 +698,7 @@ local function register_biomes()
|
|||
humidity_point = 58,
|
||||
heat_point = 22,
|
||||
_mcl_biome_type = "cold",
|
||||
_mcl_grass_palette_index = 12,
|
||||
_mcl_palette_index = 12,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -717,7 +717,7 @@ local function register_biomes()
|
|||
humidity_point = 61,
|
||||
heat_point = 45,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 13,
|
||||
_mcl_palette_index = 13,
|
||||
_mcl_skycolor = "#79A6FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -734,7 +734,7 @@ local function register_biomes()
|
|||
humidity_point = 61,
|
||||
heat_point = 45,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 13,
|
||||
_mcl_palette_index = 13,
|
||||
_mcl_skycolor = beach_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -751,7 +751,7 @@ local function register_biomes()
|
|||
humidity_point = 61,
|
||||
heat_point = 45,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 13,
|
||||
_mcl_palette_index = 13,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -770,7 +770,7 @@ local function register_biomes()
|
|||
humidity_point = 44,
|
||||
heat_point = 32,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 14,
|
||||
_mcl_palette_index = 14,
|
||||
_mcl_skycolor = "#79A6FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -787,7 +787,7 @@ local function register_biomes()
|
|||
humidity_point = 44,
|
||||
heat_point = 32,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 14,
|
||||
_mcl_palette_index = 14,
|
||||
_mcl_skycolor = beach_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -804,7 +804,7 @@ local function register_biomes()
|
|||
humidity_point = 44,
|
||||
heat_point = 32,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 14,
|
||||
_mcl_palette_index = 14,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -823,7 +823,7 @@ local function register_biomes()
|
|||
humidity_point = 78,
|
||||
heat_point = 31,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 15,
|
||||
_mcl_palette_index = 15,
|
||||
_mcl_skycolor = "#7AA5FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -840,7 +840,7 @@ local function register_biomes()
|
|||
humidity_point = 78,
|
||||
heat_point = 31,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 15,
|
||||
_mcl_palette_index = 15,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -859,7 +859,7 @@ local function register_biomes()
|
|||
humidity_point = 77,
|
||||
heat_point = 27,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 16,
|
||||
_mcl_palette_index = 16,
|
||||
_mcl_skycolor = "#7AA5FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -876,7 +876,7 @@ local function register_biomes()
|
|||
humidity_point = 77,
|
||||
heat_point = 27,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 16,
|
||||
_mcl_palette_index = 16,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -896,7 +896,7 @@ local function register_biomes()
|
|||
humidity_point = 26,
|
||||
heat_point = 94,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 17,
|
||||
_mcl_palette_index = 17,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -913,7 +913,7 @@ local function register_biomes()
|
|||
humidity_point = 26,
|
||||
heat_point = 94,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 17,
|
||||
_mcl_palette_index = 17,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -932,7 +932,7 @@ local function register_biomes()
|
|||
humidity_point = 94,
|
||||
heat_point = 27,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 18,
|
||||
_mcl_palette_index = 18,
|
||||
_mcl_skycolor = "#79A6FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -949,7 +949,7 @@ local function register_biomes()
|
|||
humidity_point = 94,
|
||||
heat_point = 27,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 18,
|
||||
_mcl_palette_index = 18,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -969,7 +969,7 @@ local function register_biomes()
|
|||
humidity_point = 0,
|
||||
heat_point = 100,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 19,
|
||||
_mcl_palette_index = 19,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -988,7 +988,7 @@ local function register_biomes()
|
|||
humidity_point = 0,
|
||||
heat_point = 100,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 19,
|
||||
_mcl_palette_index = 19,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1006,7 +1006,7 @@ local function register_biomes()
|
|||
humidity_point = 0,
|
||||
heat_point = 100,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 19,
|
||||
_mcl_palette_index = 19,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1025,7 +1025,7 @@ local function register_biomes()
|
|||
humidity_point = -5,
|
||||
heat_point = 100,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 20,
|
||||
_mcl_palette_index = 20,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1043,7 +1043,7 @@ local function register_biomes()
|
|||
humidity_point = -5,
|
||||
heat_point = 100,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 20,
|
||||
_mcl_palette_index = 20,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1061,7 +1061,7 @@ local function register_biomes()
|
|||
humidity_point = -5,
|
||||
heat_point = 100,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 20,
|
||||
_mcl_palette_index = 20,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1082,7 +1082,7 @@ local function register_biomes()
|
|||
heat_point = 60,
|
||||
vertical_blend = 0, -- we want a sharp transition
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 21,
|
||||
_mcl_palette_index = 21,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1103,7 +1103,7 @@ local function register_biomes()
|
|||
humidity_point = 0,
|
||||
heat_point = 60,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 21,
|
||||
_mcl_palette_index = 21,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1121,7 +1121,7 @@ local function register_biomes()
|
|||
humidity_point = 0,
|
||||
heat_point = 60,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 21,
|
||||
_mcl_palette_index = 21,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1139,7 +1139,7 @@ local function register_biomes()
|
|||
humidity_point = 0,
|
||||
heat_point = 60,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 21,
|
||||
_mcl_palette_index = 21,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1162,7 +1162,7 @@ local function register_biomes()
|
|||
heat_point = 60,
|
||||
vertical_blend = 5,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 22,
|
||||
_mcl_palette_index = 22,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1181,7 +1181,7 @@ local function register_biomes()
|
|||
humidity_point = -5,
|
||||
heat_point = 60,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 22,
|
||||
_mcl_palette_index = 22,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1201,7 +1201,7 @@ local function register_biomes()
|
|||
heat_point = 60,
|
||||
vertical_blend = 4,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 22,
|
||||
_mcl_palette_index = 22,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1219,7 +1219,7 @@ local function register_biomes()
|
|||
humidity_point = -5,
|
||||
heat_point = 60,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 22,
|
||||
_mcl_palette_index = 22,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1239,7 +1239,7 @@ local function register_biomes()
|
|||
humidity_point = 36,
|
||||
heat_point = 79,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 1,
|
||||
_mcl_palette_index = 1,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1256,7 +1256,7 @@ local function register_biomes()
|
|||
humidity_point = 36,
|
||||
heat_point = 79,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 1,
|
||||
_mcl_palette_index = 1,
|
||||
_mcl_skycolor = beach_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1273,7 +1273,7 @@ local function register_biomes()
|
|||
humidity_point = 36,
|
||||
heat_point = 79,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 1,
|
||||
_mcl_palette_index = 1,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1294,7 +1294,7 @@ local function register_biomes()
|
|||
humidity_point = 48,
|
||||
heat_point = 100,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 23,
|
||||
_mcl_palette_index = 23,
|
||||
_mcl_skycolor = "#6EB1FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1311,7 +1311,7 @@ local function register_biomes()
|
|||
humidity_point = 48,
|
||||
heat_point = 100,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 23,
|
||||
_mcl_palette_index = 23,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1330,7 +1330,7 @@ local function register_biomes()
|
|||
humidity_point = 88,
|
||||
heat_point = 81,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 24,
|
||||
_mcl_palette_index = 24,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1347,7 +1347,7 @@ local function register_biomes()
|
|||
humidity_point = 88,
|
||||
heat_point = 81,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 24,
|
||||
_mcl_palette_index = 24,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1365,7 +1365,7 @@ local function register_biomes()
|
|||
humidity_point = 88,
|
||||
heat_point = 81,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 24,
|
||||
_mcl_palette_index = 24,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1385,7 +1385,7 @@ local function register_biomes()
|
|||
humidity_point = 92,
|
||||
heat_point = 81,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 25,
|
||||
_mcl_palette_index = 25,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1402,7 +1402,7 @@ local function register_biomes()
|
|||
humidity_point = 92,
|
||||
heat_point = 81,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 25,
|
||||
_mcl_palette_index = 25,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1420,7 +1420,7 @@ local function register_biomes()
|
|||
humidity_point = 92,
|
||||
heat_point = 81,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 25,
|
||||
_mcl_palette_index = 25,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1439,7 +1439,7 @@ local function register_biomes()
|
|||
humidity_point = 88,
|
||||
heat_point = 76,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 26,
|
||||
_mcl_palette_index = 26,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1456,7 +1456,7 @@ local function register_biomes()
|
|||
humidity_point = 88,
|
||||
heat_point = 76,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 26,
|
||||
_mcl_palette_index = 26,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1478,7 +1478,7 @@ local function register_biomes()
|
|||
humidity_point = 90,
|
||||
heat_point = 79,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 27,
|
||||
_mcl_palette_index = 27,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1495,7 +1495,7 @@ local function register_biomes()
|
|||
humidity_point = 90,
|
||||
heat_point = 79,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 27,
|
||||
_mcl_palette_index = 27,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1515,7 +1515,7 @@ local function register_biomes()
|
|||
humidity_point = 95,
|
||||
heat_point = 94,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 27,
|
||||
_mcl_palette_index = 27,
|
||||
_mcl_skycolor = "#78A7FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1532,7 +1532,7 @@ local function register_biomes()
|
|||
humidity_point = 95,
|
||||
heat_point = 94,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 27,
|
||||
_mcl_palette_index = 27,
|
||||
_mcl_skycolor = "#78A7FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1550,7 +1550,7 @@ local function register_biomes()
|
|||
humidity_point = 95,
|
||||
heat_point = 94,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 27,
|
||||
_mcl_palette_index = 27,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1569,7 +1569,7 @@ local function register_biomes()
|
|||
humidity_point = 90,
|
||||
heat_point = 50,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 28,
|
||||
_mcl_palette_index = 28,
|
||||
_mcl_skycolor = "#78A7FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1586,7 +1586,7 @@ local function register_biomes()
|
|||
humidity_point = 90,
|
||||
heat_point = 50,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 28,
|
||||
_mcl_palette_index = 28,
|
||||
_mcl_skycolor = "#78A7FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1604,7 +1604,7 @@ local function register_biomes()
|
|||
humidity_point = 90,
|
||||
heat_point = 50,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 28,
|
||||
_mcl_palette_index = 28,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1626,7 +1626,7 @@ local function register_biomes()
|
|||
humidity_point = 106,
|
||||
heat_point = 50,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 29,
|
||||
_mcl_palette_index = 29,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1644,7 +1644,7 @@ local function register_biomes()
|
|||
humidity_point = 106,
|
||||
heat_point = 50,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 29,
|
||||
_mcl_palette_index = 29,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1661,7 +1661,7 @@ local function register_biomes()
|
|||
humidity_point = 106,
|
||||
heat_point = 50,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 29,
|
||||
_mcl_palette_index = 29,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1681,7 +1681,7 @@ local function register_biomes()
|
|||
humidity_point = 90,
|
||||
heat_point = 95,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 24,
|
||||
_mcl_palette_index = 24,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1698,7 +1698,7 @@ local function register_biomes()
|
|||
humidity_point = 90,
|
||||
heat_point = 95,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 24,
|
||||
_mcl_palette_index = 24,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1716,7 +1716,7 @@ local function register_biomes()
|
|||
humidity_point = 95,
|
||||
heat_point = 90,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 24,
|
||||
_mcl_palette_index = 24,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1736,7 +1736,7 @@ local function register_biomes()
|
|||
humidity_point = 95,
|
||||
heat_point = 95,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 25,
|
||||
_mcl_palette_index = 25,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1753,7 +1753,7 @@ local function register_biomes()
|
|||
humidity_point = 95,
|
||||
heat_point = 90,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 25,
|
||||
_mcl_palette_index = 25,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1771,7 +1771,7 @@ local function register_biomes()
|
|||
humidity_point = 95,
|
||||
heat_point = 95,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 25,
|
||||
_mcl_palette_index = 25,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1790,7 +1790,7 @@ local function register_biomes()
|
|||
humidity_point = 92,
|
||||
heat_point = 90,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 26,
|
||||
_mcl_palette_index = 26,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1807,7 +1807,7 @@ local function register_biomes()
|
|||
humidity_point = 95,
|
||||
heat_point = 88,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 26,
|
||||
_mcl_palette_index = 26,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1829,7 +1829,7 @@ local function register_biomes()
|
|||
humidity_point = 95,
|
||||
heat_point = 95,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 27,
|
||||
_mcl_palette_index = 27,
|
||||
_mcl_skycolor = "#77A8FF",
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1846,7 +1846,7 @@ local function register_biomes()
|
|||
humidity_point = 97,
|
||||
heat_point = 90,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 27,
|
||||
_mcl_palette_index = 27,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1870,7 +1870,7 @@ local function register_biomes()
|
|||
depth_riverbed = 2,
|
||||
vertical_blend = 5,
|
||||
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
|
||||
_mcl_grass_palette_index = minetest.registered_biomes[biome]._mcl_grass_palette_index,
|
||||
_mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index,
|
||||
_mcl_skycolor = ocean_skycolor,
|
||||
_mcl_fogcolor = overworld_fogcolor
|
||||
})
|
||||
|
@ -1884,7 +1884,7 @@ local function register_biomes()
|
|||
y_min = mcl_vars.mg_overworld_min,
|
||||
y_max = DEEP_OCEAN_MIN - 1,
|
||||
_mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type,
|
||||
_mcl_grass_palette_index = minetest.registered_biomes[biome]._mcl_grass_palette_index,
|
||||
_mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index,
|
||||
_mcl_skycolor = minetest.registered_biomes[biome]._mcl_skycolor,
|
||||
_mcl_fogcolor = minetest.registered_biomes[biome]._mcl_fogcolor,
|
||||
})
|
||||
|
@ -1939,9 +1939,9 @@ local function register_dimension_biomes()
|
|||
heat_point = 100,
|
||||
humidity_point = 0,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 17,
|
||||
_mcl_skycolor = nether_skycolor,
|
||||
_mcl_fogcolor = "#330808"
|
||||
_mcl_palette_index = 17,
|
||||
-- _mcl_skycolor = nether_skycolor,
|
||||
-- _mcl_fogcolor = "#330808"
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
|
@ -1970,9 +1970,9 @@ local function register_dimension_biomes()
|
|||
heat_point = 77,
|
||||
humidity_point = 33,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 17,
|
||||
_mcl_skycolor = nether_skycolor,
|
||||
_mcl_fogcolor = "#1B4745"
|
||||
_mcl_palette_index = 17,
|
||||
-- _mcl_skycolor = nether_skycolor,
|
||||
-- _mcl_fogcolor = "#1B4745"
|
||||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
|
@ -2021,9 +2021,9 @@ local function register_dimension_biomes()
|
|||
heat_point = 60,
|
||||
humidity_point = 47,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 17,
|
||||
_mcl_skycolor = nether_skycolor,
|
||||
_mcl_fogcolor = "#330303"
|
||||
_mcl_palette_index = 17,
|
||||
-- _mcl_skycolor = nether_skycolor,
|
||||
-- _mcl_fogcolor = "#330303"
|
||||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
|
@ -2050,9 +2050,9 @@ local function register_dimension_biomes()
|
|||
heat_point = 37,
|
||||
humidity_point = 70,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 17,
|
||||
_mcl_skycolor = nether_skycolor,
|
||||
_mcl_fogcolor = "#1A051A"
|
||||
_mcl_palette_index = 17,
|
||||
-- _mcl_skycolor = nether_skycolor,
|
||||
-- _mcl_fogcolor = "#1A051A"
|
||||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
|
@ -2079,9 +2079,9 @@ local function register_dimension_biomes()
|
|||
heat_point = 27,
|
||||
humidity_point = 80,
|
||||
_mcl_biome_type = "hot",
|
||||
_mcl_grass_palette_index = 17,
|
||||
_mcl_skycolor = nether_skycolor,
|
||||
_mcl_fogcolor = "#685F70"
|
||||
_mcl_palette_index = 17,
|
||||
-- _mcl_skycolor = nether_skycolor,
|
||||
-- _mcl_fogcolor = "#685F70"
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
|
@ -2133,9 +2133,9 @@ local function register_dimension_biomes()
|
|||
humidity_point = 1000,
|
||||
vertical_blend = 16,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_skycolor = end_skycolor,
|
||||
_mcl_fogcolor = end_fogcolor
|
||||
_mcl_palette_index = 0,
|
||||
-- _mcl_skycolor = end_skycolor,
|
||||
-- _mcl_fogcolor = end_fogcolor
|
||||
})
|
||||
minetest.register_biome({
|
||||
name = "EndBarrens",
|
||||
|
@ -2150,9 +2150,9 @@ local function register_dimension_biomes()
|
|||
humidity_point = 1000,
|
||||
vertical_blend = 16,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_skycolor = end_skycolor,
|
||||
_mcl_fogcolor = end_fogcolor
|
||||
_mcl_palette_index = 0,
|
||||
-- _mcl_skycolor = end_skycolor,
|
||||
-- _mcl_fogcolor = end_fogcolor
|
||||
})
|
||||
minetest.register_biome({
|
||||
name = "EndMidlands",
|
||||
|
@ -2167,9 +2167,9 @@ local function register_dimension_biomes()
|
|||
humidity_point = 1000,
|
||||
vertical_blend = 16,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_skycolor = end_skycolor,
|
||||
_mcl_fogcolor = end_fogcolor
|
||||
_mcl_palette_index = 0,
|
||||
-- _mcl_skycolor = end_skycolor,
|
||||
-- _mcl_fogcolor = end_fogcolor
|
||||
})
|
||||
minetest.register_biome({
|
||||
name = "EndHighlands",
|
||||
|
@ -2184,9 +2184,9 @@ local function register_dimension_biomes()
|
|||
humidity_point = 1000,
|
||||
vertical_blend = 16,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_skycolor = end_skycolor,
|
||||
_mcl_fogcolor = end_fogcolor
|
||||
_mcl_palette_index = 0,
|
||||
-- _mcl_skycolor = end_skycolor,
|
||||
-- _mcl_fogcolor = end_fogcolor
|
||||
})
|
||||
minetest.register_biome({
|
||||
name = "EndSmallIslands",
|
||||
|
@ -2201,9 +2201,9 @@ local function register_dimension_biomes()
|
|||
humidity_point = 1000,
|
||||
vertical_blend = 16,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_skycolor = end_skycolor,
|
||||
_mcl_fogcolor = end_fogcolor
|
||||
_mcl_palette_index = 0,
|
||||
-- _mcl_skycolor = end_skycolor,
|
||||
-- _mcl_fogcolor = end_fogcolor
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
|
@ -2221,9 +2221,9 @@ local function register_dimension_biomes()
|
|||
max_pos = {x = 1250, y = mcl_vars.mg_end_min + 512, z = 1250},
|
||||
min_pos = {x = -1250, y = mcl_vars.mg_end_min, z = -1250},
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_skycolor = end_skycolor,
|
||||
_mcl_fogcolor = end_fogcolor
|
||||
_mcl_palette_index = 0,
|
||||
-- _mcl_skycolor = end_skycolor,
|
||||
-- _mcl_fogcolor = end_fogcolor
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
|
@ -2239,9 +2239,9 @@ local function register_dimension_biomes()
|
|||
humidity_point = 50,
|
||||
vertical_blend = 16,
|
||||
_mcl_biome_type = "medium",
|
||||
_mcl_grass_palette_index = 0,
|
||||
_mcl_skycolor = end_skycolor,
|
||||
_mcl_fogcolor = end_fogcolor
|
||||
_mcl_palette_index = 0,
|
||||
-- _mcl_skycolor = end_skycolor,
|
||||
-- _mcl_fogcolor = end_fogcolor
|
||||
})
|
||||
|
||||
end
|
||||
|
@ -3050,7 +3050,7 @@ local function register_grass_decoration(grasstype, offset, scale, biomes)
|
|||
persist = 0.6
|
||||
}
|
||||
for b = 1, #biomes do
|
||||
local param2 = minetest.registered_biomes[biomes[b]]._mcl_grass_palette_index
|
||||
local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = place_on,
|
||||
|
@ -4395,7 +4395,7 @@ local function register_decorations()
|
|||
local function register_doubletall_grass(offset, scale, biomes)
|
||||
|
||||
for b = 1, #biomes do
|
||||
local param2 = minetest.registered_biomes[biomes[b]]._mcl_grass_palette_index
|
||||
local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
schematic = {
|
||||
|
@ -4430,7 +4430,7 @@ local function register_decorations()
|
|||
-- Large ferns
|
||||
local function register_double_fern(offset, scale, biomes)
|
||||
for b = 1, #biomes do
|
||||
local param2 = minetest.registered_biomes[biomes[b]]._mcl_grass_palette_index
|
||||
local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
schematic = {
|
||||
|
@ -5034,7 +5034,7 @@ local function register_decorations()
|
|||
size = {x = 1, y = 2, z = 1},
|
||||
data = {
|
||||
{name = "mcl_core:dirt_with_grass", force_place = true, },
|
||||
{name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["IcePlains"]._mcl_grass_palette_index},
|
||||
{name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["IcePlains"]._mcl_palette_index},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -5057,7 +5057,7 @@ local function register_decorations()
|
|||
size = {x = 1, y = 2, z = 1},
|
||||
data = {
|
||||
{name = "mcl_core:dirt_with_grass", force_place = true, },
|
||||
{name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["ExtremeHills+_snowtop"]._mcl_grass_palette_index},
|
||||
{name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["ExtremeHills+_snowtop"]._mcl_palette_index},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -280,8 +280,8 @@ local function set_palette(minp,maxp,data2,area,biomemap,nodes)
|
|||
local bn = minetest.get_biome_name(biomemap[b_pos])
|
||||
if bn then
|
||||
local biome = minetest.registered_biomes[bn]
|
||||
if biome and biome._mcl_biome_type and biome._mcl_grass_palette_index then
|
||||
data2[p_pos] = biome._mcl_grass_palette_index
|
||||
if biome and biome._mcl_biome_type then
|
||||
data2[p_pos] = biome._mcl_palette_index
|
||||
lvm_used = true
|
||||
end
|
||||
end
|
||||
|
@ -349,8 +349,8 @@ local function block_fixes(vm, data, data2, emin, emax, area, minp, maxp, blocks
|
|||
local lvm_used = false
|
||||
local pr = PseudoRandom(blockseed)
|
||||
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.
|
||||
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"})
|
||||
-- Set param2 (=color) of sugar cane and grass
|
||||
lvm_used = set_palette(minp,maxp,data2,area,biomemap,{"mcl_core:reeds","mcl_core:dirt_with_grass"})
|
||||
end
|
||||
return lvm_used
|
||||
end
|
||||
|
@ -417,20 +417,3 @@ mcl_mapgen_core.register_generator("structures",nil, function(minp, maxp, blocks
|
|||
end
|
||||
return false, false, false
|
||||
end, 100, true)
|
||||
|
||||
minetest.register_lbm({
|
||||
label = "Fix grass palette indexes",
|
||||
name = "mcl_mapgen_core:fix_grass_palette_indexes",
|
||||
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 = true,
|
||||
action = function(pos, node)
|
||||
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 node.param2 ~= reg_biome._mcl_grass_palette_index then
|
||||
node.param2 = reg_biome._mcl_grass_palette_index
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -198,6 +198,9 @@ end
|
|||
-------------------------------------------------------------------------------
|
||||
function settlements.evaluate_heightmap()
|
||||
local heightmap = minetest.get_mapgen_object("heightmap")
|
||||
|
||||
if not heightmap then return max_height_difference + 1 end
|
||||
|
||||
-- max height and min height, initialize with impossible values for easier first time setting
|
||||
local max_y = -50000
|
||||
local min_y = 50000
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
local mcl_skins_enabled = minetest.global_exists("mcl_skins")
|
||||
mcl_meshhand = { }
|
||||
|
||||
---This is a fake node that should never be placed in the world
|
||||
---@type node_definition
|
||||
|
@ -16,77 +15,43 @@ local node_def = {
|
|||
end,
|
||||
drop = "",
|
||||
on_drop = function(_, _, _) return ItemStack() end,
|
||||
groups = {
|
||||
dig_immediate = 3,
|
||||
not_in_creative_inventory = 1,
|
||||
dig_speed_class = 1,
|
||||
},
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.25,
|
||||
max_drop_level = 0,
|
||||
groupcaps = { },
|
||||
damage_groups = { fleshy = 1 },
|
||||
},
|
||||
_mcl_diggroups = {
|
||||
handy = { speed = 1, level = 1, uses = 0 },
|
||||
axey = { speed = 1, level = 1, uses = 0 },
|
||||
shovely = { speed = 1, level = 1, uses = 0 },
|
||||
hoey = { speed = 1, level = 1, uses = 0 },
|
||||
pickaxey = { speed = 1, level = 0, uses = 0 },
|
||||
swordy = { speed = 1, level = 0, uses = 0 },
|
||||
swordy_cobweb = { speed = 1, level = 0, uses = 0 },
|
||||
shearsy = { speed = 1, level = 0, uses = 0 },
|
||||
shearsy_wool = { speed = 1, level = 0, uses = 0 },
|
||||
shearsy_cobweb = { speed = 1, level = 0, uses = 0 },
|
||||
},
|
||||
range = tonumber(minetest.settings:get("mcl_hand_range")) or 4.5
|
||||
groups = { dig_immediate = 3, not_in_creative_inventory = 1 },
|
||||
range = minetest.registered_items[""].range
|
||||
}
|
||||
|
||||
-- This is for _mcl_autogroup to know about the survival hand tool capabilites
|
||||
mcl_meshhand.survival_hand_tool_caps = node_def.tool_capabilities
|
||||
|
||||
local creative_dig_speed = tonumber(minetest.settings:get("mcl_creative_dig_speed")) or 0.2
|
||||
local creative_hand_range = tonumber(minetest.settings:get("mcl_hand_range_creative")) or 10
|
||||
if mcl_skins_enabled then
|
||||
-- Generate a node for every skin
|
||||
local list = mcl_skins.get_skin_list()
|
||||
for _, skin in pairs(list) do
|
||||
local node_def = table.copy(node_def)
|
||||
node_def._mcl_hand_id = skin.id
|
||||
node_def.tiles = { skin.texture }
|
||||
node_def.mesh = skin.slim_arms and "mcl_meshhand_female.b3d" or "mcl_meshhand.b3d"
|
||||
if skin.creative then
|
||||
node_def.range = creative_hand_range
|
||||
node_def.groups.dig_speed_class = 7
|
||||
node_def.tool_capabilities.groupcaps.creative_breakable = { times = { creative_dig_speed }, uses = 0 }
|
||||
if skin.slim_arms then
|
||||
local female = table.copy(node_def)
|
||||
female._mcl_hand_id = skin.id
|
||||
female.mesh = "mcl_meshhand_female.b3d"
|
||||
female.tiles = { skin.texture }
|
||||
minetest.register_node("mcl_meshhand:" .. skin.id, female)
|
||||
else
|
||||
local male = table.copy(node_def)
|
||||
male._mcl_hand_id = skin.id
|
||||
male.mesh = "mcl_meshhand.b3d"
|
||||
male.tiles = { skin.texture }
|
||||
minetest.register_node("mcl_meshhand:" .. skin.id, male)
|
||||
end
|
||||
minetest.register_node("mcl_meshhand:" .. skin.id, node_def)
|
||||
end
|
||||
else
|
||||
node_def._mcl_hand_id = "hand"
|
||||
node_def.mesh = "mcl_meshhand.b3d"
|
||||
node_def.tiles = { "character.png" }
|
||||
minetest.register_node("mcl_meshhand:hand_surv", node_def)
|
||||
|
||||
node_def = table.copy(node_def)
|
||||
node_def.range = creative_hand_range
|
||||
node_def.groups.dig_speed_class = 7
|
||||
node_def.tool_capabilities.groupcaps.creative_breakable = { times = { creative_dig_speed }, uses = 0 }
|
||||
minetest.register_node("mcl_meshhand:hand_crea", node_def)
|
||||
end
|
||||
|
||||
function mcl_meshhand.update_player(player)
|
||||
if mcl_skins_enabled then
|
||||
local node_id = mcl_skins.get_node_id_by_player(player)
|
||||
player:get_inventory():set_stack("hand", 1, "mcl_meshhand:" .. node_id)
|
||||
else
|
||||
local creative = minetest.is_creative_enabled(player:get_player_name())
|
||||
player:get_inventory():set_stack("hand", 1, "mcl_meshhand:hand" .. (creative and "_crea" or "_surv"))
|
||||
end
|
||||
minetest.register_node("mcl_meshhand:hand", node_def)
|
||||
end
|
||||
|
||||
if mcl_skins_enabled then
|
||||
mcl_player.register_on_visual_change(mcl_meshhand.update_player)
|
||||
-- Change the player's hand to their skin
|
||||
mcl_player.register_on_visual_change(function(player)
|
||||
local node_id = mcl_skins.get_node_id_by_player(player)
|
||||
player:get_inventory():set_stack("hand", 1, "mcl_meshhand:" .. node_id)
|
||||
end)
|
||||
else
|
||||
minetest.register_on_joinplayer(mcl_meshhand.update_player)
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
player:get_inventory():set_stack("hand", 1, ItemStack("mcl_meshhand:hand"))
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -11,23 +11,20 @@ end
|
|||
|
||||
function mcl_skins.get_skin_list()
|
||||
local list = {}
|
||||
for _, game_mode in pairs({"_crea", "_surv"}) do
|
||||
for _, base in pairs(mcl_skins.base) do
|
||||
for _, base_color in pairs(mcl_skins.base_color) do
|
||||
local id = base:gsub(".png$", "") .. minetest.colorspec_to_colorstring(base_color):gsub("#", "")
|
||||
local female = {
|
||||
texture = make_texture(base, base_color),
|
||||
slim_arms = true,
|
||||
id = id .. "_female" .. game_mode,
|
||||
creative = game_mode == "_crea"
|
||||
id = id .. "_female"
|
||||
}
|
||||
table.insert(list, female)
|
||||
|
||||
local male = {
|
||||
texture = make_texture(base, base_color),
|
||||
slim_arms = false,
|
||||
id = id .. "_male" .. game_mode,
|
||||
creative = game_mode == "_crea"
|
||||
id = id .. "_male"
|
||||
}
|
||||
table.insert(list, male)
|
||||
end
|
||||
|
@ -36,26 +33,21 @@ function mcl_skins.get_skin_list()
|
|||
table.insert(list, {
|
||||
texture = skin.texture,
|
||||
slim_arms = skin.slim_arms,
|
||||
id = skin.texture:gsub(".png$", "") .. (skin.slim_arms and "_female" or "_male") .. game_mode,
|
||||
creative = game_mode == "_crea"
|
||||
id = skin.texture:gsub(".png$", "") .. "_" .. (skin.slim_arms and "female" or "male"),
|
||||
})
|
||||
end
|
||||
end
|
||||
return list
|
||||
end
|
||||
|
||||
function mcl_skins.get_node_id_by_player(player)
|
||||
local skin = mcl_skins.players[player]
|
||||
local simple_skin = skin.simple_skins_id
|
||||
if simple_skin then
|
||||
skin = mcl_skins.simple_skins[skin.simple_skins_id]
|
||||
end
|
||||
local creative = minetest.is_creative_enabled(player:get_player_name())
|
||||
local append = (skin.slim_arms and "_female" or "_male") .. (creative and "_crea" or "_surv")
|
||||
if simple_skin then
|
||||
return skin.texture:gsub(".png$", "") .. append
|
||||
if skin.simple_skins_id then
|
||||
local skin = mcl_skins.simple_skins[skin.simple_skins_id]
|
||||
return skin.texture:gsub(".png$", "") ..
|
||||
"_" .. (skin.slim_arms and "female" or "male")
|
||||
else
|
||||
return skin.base:gsub(".png$", "") ..
|
||||
minetest.colorspec_to_colorstring(skin.base_color):gsub("#", "") .. append
|
||||
minetest.colorspec_to_colorstring(skin.base_color):gsub("#", "") ..
|
||||
"_" .. (skin.slim_arms and "female" or "male")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -76,13 +76,10 @@ mcl_enable_skin_customization (Enable player skin customization) bool true
|
|||
# Default:4.5
|
||||
mcl_hand_range (Hand range) float 4.5 1 128
|
||||
|
||||
# How far the player hand can reach in creative mode
|
||||
# How far the player hand can reach in creative mode (not gamemode-creative)
|
||||
# Default:10
|
||||
mcl_hand_range_creative (Creative mode hand range) float 10 1 128
|
||||
|
||||
# Creative mode dig speed in seconds
|
||||
mcl_creative_dig_speed (Creative mode dig speed) float 0.2
|
||||
|
||||
# If enabled the hunger mechanic will be active
|
||||
mcl_enable_hunger (Hunger mechanic) bool true
|
||||
|
||||
|
|
Loading…
Reference in New Issue