Merge pull request 'master' (#1736) from master into mineclone5

Reviewed-on: MineClone2/MineClone2#1736
This commit is contained in:
Code-Sploit 2021-05-13 11:57:33 +00:00
commit ba333d016a
6 changed files with 44 additions and 54 deletions

View File

@ -22,6 +22,7 @@
* Nicu * Nicu
* aligator * aligator
* Code-Sploit * Code-Sploit
* NO11
## Contributors ## Contributors
* Laurent Rocher * Laurent Rocher
@ -40,7 +41,6 @@
* Jared Moody * Jared Moody
* Li0n * Li0n
* Midgard * Midgard
* NO11
* Saku Laesvuori * Saku Laesvuori
* Yukitty * Yukitty
* ZedekThePD * ZedekThePD
@ -102,6 +102,7 @@
* leorockway * leorockway
* xMrVizzy * xMrVizzy
* yutyo * yutyo
* NO11
## Translations ## Translations
* Wuzzy * Wuzzy

View File

@ -2,4 +2,4 @@ name = mcl_mobs
author = PilzAdam author = PilzAdam
description = Adds a mob API for mods to add animals or monsters, etc. description = Adds a mob API for mods to add animals or monsters, etc.
depends = mcl_particles depends = mcl_particles
optional_depends = mcl_weather, mcl_explosions, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor, mcl_portals, mcl_experience optional_depends = mcl_weather, mcl_explosions, mcl_hunger, mcl_worlds, invisibility, cmi, doc_identifier, mcl_armor, mcl_portals, mcl_experience

View File

@ -28,6 +28,7 @@ mcl_credits.people = {
"Nicu", "Nicu",
"aligator", "aligator",
"Code-Sploit", "Code-Sploit",
"NO11",
}}, }},
{"Contributors", 0x52FF00, { {"Contributors", 0x52FF00, {
"Laurent Rocher", "Laurent Rocher",
@ -46,7 +47,6 @@ mcl_credits.people = {
"Jared Moody", "Jared Moody",
"Li0n", "Li0n",
"Midgard", "Midgard",
"NO11",
"Saku Laesvuori", "Saku Laesvuori",
"Yukitty", "Yukitty",
"ZedekThePD", "ZedekThePD",
@ -107,7 +107,8 @@ mcl_credits.people = {
"kingoscargames", "kingoscargames",
"leorockway", "leorockway",
"xMrVizzy", "xMrVizzy",
"yutyo" "yutyo",
"NO11",
}}, }},
{"Translations", 0x00FF60, { {"Translations", 0x00FF60, {
"Wuzzy", "Wuzzy",

View File

@ -118,16 +118,6 @@ ARROW_ENTITY.on_step = function(self, dtime)
dpos = vector.round(dpos) dpos = vector.round(dpos)
local node = minetest.get_node(dpos) local node = minetest.get_node(dpos)
if self.object:get_attach() ~= nil and self.object:get_attach(parent):get_hp() < 1 then
self.object:remove()
end
minetest.register_on_leaveplayer(function(player)
if self.object:get_attach(parent) == player then
self.object:remove()
end
end)
if self._stuck then if self._stuck then
self._stucktimer = self._stucktimer + dtime self._stucktimer = self._stucktimer + dtime
self._stuckrechecktimer = self._stuckrechecktimer + dtime self._stuckrechecktimer = self._stuckrechecktimer + dtime

View File

@ -4,47 +4,45 @@
-- Crafting definition -- Crafting definition
-- --
minetest.register_craft({ local craft_planks = function(output, input)
output = 'mcl_core:wood 4', minetest.register_craft({
recipe = { output = "mcl_core:"..output.."wood 4",
{'mcl_core:tree'}, recipe = {
} {"mcl_core:"..input},
}) }
})
end
minetest.register_craft({ craft_planks("", "tree")
output = 'mcl_core:darkwood 4', craft_planks("", "tree_bark")
recipe = { craft_planks("", "stripped_oak")
{'mcl_core:darktree'}, craft_planks("", "stripped_oak_bark")
}
})
minetest.register_craft({ craft_planks("dark", "darktree")
output = 'mcl_core:junglewood 4', craft_planks("dark", "darktree_bark")
recipe = { craft_planks("dark", "stripped_dark_oak")
{'mcl_core:jungletree'}, craft_planks("dark", "stripped_dark_oak_bark")
}
})
minetest.register_craft({ craft_planks("jungle", "jungletree")
output = 'mcl_core:acaciawood 4', craft_planks("jungle", "jungletree_bark")
recipe = { craft_planks("jungle", "stripped_jungle")
{'mcl_core:acaciatree'}, craft_planks("jungle", "stripped_jungle_bark")
}
})
minetest.register_craft({ craft_planks("acacia", "acaciatree")
output = 'mcl_core:sprucewood 4', craft_planks("acacia", "acaciatree_bark")
recipe = { craft_planks("acacia", "stripped_acacia")
{'mcl_core:sprucetree'}, craft_planks("acacia", "stripped_acacia_bark")
}
}) craft_planks("spruce", "sprucetree")
craft_planks("spruce", "sprucetree_bark")
craft_planks("spruce", "stripped_spruce")
craft_planks("spruce", "stripped_spruce_bark")
craft_planks("birch", "birchtree")
craft_planks("birch", "birchtree_bark")
craft_planks("birch", "stripped_birch")
craft_planks("birch", "stripped_birch_bark")
minetest.register_craft({
output = 'mcl_core:birchwood 4',
recipe = {
{'mcl_core:birchtree'},
}
})
minetest.register_craft({ minetest.register_craft({
type = 'shapeless', type = 'shapeless',

View File

@ -137,14 +137,14 @@ local timerMult = 1 -- Cycles from 0 to 7, each time when timer hits half a seco
minetest.register_globalstep(function(dtime) minetest.register_globalstep(function(dtime)
main_timer = main_timer + dtime main_timer = main_timer + dtime
timer = timer + dtime timer = timer + dtime
if main_timer > mcl_hunger.HUD_TICK or timer > 0.5 then if main_timer > mcl_hunger.HUD_TICK or timer > 0.25 then
if main_timer > mcl_hunger.HUD_TICK then main_timer = 0 end if main_timer > mcl_hunger.HUD_TICK then main_timer = 0 end
for _,player in pairs(minetest.get_connected_players()) do for _,player in pairs(minetest.get_connected_players()) do
local name = player:get_player_name() local name = player:get_player_name()
local h = tonumber(mcl_hunger.get_hunger(player)) local h = tonumber(mcl_hunger.get_hunger(player))
local hp = player:get_hp() local hp = player:get_hp()
if timer > 0.5 then if timer > 0.25 then
-- Slow health regeneration, and hunger damage (every 4s). -- Slow health regeneration, and hunger damage (every 4s).
-- Regeneration rate based on tutorial video <https://www.youtube.com/watch?v=zs2t-xCVHBo>. -- Regeneration rate based on tutorial video <https://www.youtube.com/watch?v=zs2t-xCVHBo>.
-- Minecraft Wiki seems to be wrong in claiming that full hunger gives 0.5s regen rate. -- Minecraft Wiki seems to be wrong in claiming that full hunger gives 0.5s regen rate.
@ -166,9 +166,9 @@ minetest.register_globalstep(function(dtime)
end end
end end
end end
if timer > 0.5 then if timer > 0.25 then
timer = 0 timer = 0
timerMult = timerMult + 1 timerMult = timerMult + 2
if timerMult > 7 then if timerMult > 7 then
timerMult = 0 timerMult = 0
end end