mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-27 13:01:06 +01:00
Merge branch 'master' into mineclone5
This commit is contained in:
commit
8b5be69332
11 changed files with 26 additions and 47 deletions
|
@ -60,7 +60,7 @@ mobs:register_mob("mobs_mc:enderdragon", {
|
||||||
},
|
},
|
||||||
ignores_nametag = true,
|
ignores_nametag = true,
|
||||||
do_custom = function(self)
|
do_custom = function(self)
|
||||||
mcl_bossbars.update_boss(self, "Ender Dragon", "light_purple")
|
mcl_bossbars.update_boss(self.object, "Ender Dragon", "light_purple")
|
||||||
for _, obj in ipairs(minetest.get_objects_inside_radius(self.object:get_pos(), 80)) do
|
for _, obj in ipairs(minetest.get_objects_inside_radius(self.object:get_pos(), 80)) do
|
||||||
local luaentity = obj:get_luaentity()
|
local luaentity = obj:get_luaentity()
|
||||||
if luaentity and luaentity.name == "mcl_end:crystal" then
|
if luaentity and luaentity.name == "mcl_end:crystal" then
|
||||||
|
|
|
@ -73,7 +73,7 @@ mobs:register_mob("mobs_mc:wither", {
|
||||||
self.object:set_properties({textures={self.base_texture}})
|
self.object:set_properties({textures={self.base_texture}})
|
||||||
self.armor = {undead = 80, fleshy = 80}
|
self.armor = {undead = 80, fleshy = 80}
|
||||||
end
|
end
|
||||||
mcl_bossbars.update_boss(self, "Wither", "dark_purple")
|
mcl_bossbars.update_boss(self.object, "Wither", "dark_purple")
|
||||||
end,
|
end,
|
||||||
on_spawn = function(self)
|
on_spawn = function(self)
|
||||||
minetest.sound_play("mobs_mc_wither_spawn", {object=self.object, gain=1.0, max_hear_distance=64})
|
minetest.sound_play("mobs_mc_wither_spawn", {object=self.object, gain=1.0, max_hear_distance=64})
|
||||||
|
|
|
@ -60,12 +60,12 @@ function mcl_bossbars.add_bar(player, def, dynamic, priority)
|
||||||
bar.id = last_id + 1
|
bar.id = last_id + 1
|
||||||
last_id = bar.id
|
last_id = bar.id
|
||||||
mcl_bossbars.static[bar.id] = bar
|
mcl_bossbars.static[bar.id] = bar
|
||||||
return id
|
return bar.id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_bossbars.remove_bar(id)
|
function mcl_bossbars.remove_bar(id)
|
||||||
mcl_bossbars.static[id].bar.static = false
|
mcl_bossbars.static[id].bar.id = nil
|
||||||
mcl_bossbars.static[id] = nil
|
mcl_bossbars.static[id] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -76,16 +76,23 @@ function mcl_bossbars.update_bar(id, def, priority)
|
||||||
old.priority = priority or old.priority
|
old.priority = priority or old.priority
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_bossbars.update_boss(luaentity, name, color)
|
function mcl_bossbars.update_boss(object, name, color)
|
||||||
local object = luaentity.object
|
local props = object:get_luaentity()
|
||||||
|
if not props or not props._cmi_is_mob then
|
||||||
|
props = object:get_properties()
|
||||||
|
props.health = object:get_hp()
|
||||||
|
end
|
||||||
|
|
||||||
local bardef = {
|
local bardef = {
|
||||||
text = luaentity.nametag,
|
|
||||||
percentage = math.floor(luaentity.health / luaentity.hp_max * 100),
|
|
||||||
color = color,
|
color = color,
|
||||||
|
text = props.nametag,
|
||||||
|
percentage = math.floor(props.health / props.hp_max * 100),
|
||||||
}
|
}
|
||||||
|
|
||||||
if not bardef.text or bardef.text == "" then
|
if not bardef.text or bardef.text == "" then
|
||||||
bardef.text = name
|
bardef.text = name
|
||||||
end
|
end
|
||||||
|
|
||||||
local pos = object:get_pos()
|
local pos = object:get_pos()
|
||||||
for _, player in pairs(minetest.get_connected_players()) do
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
local d = vector.distance(pos, player:get_pos())
|
local d = vector.distance(pos, player:get_pos())
|
||||||
|
|
|
@ -14,7 +14,6 @@ mcl_autogroup.register_diggroup("shearsy_wool")
|
||||||
mcl_autogroup.register_diggroup("shearsy_cobweb")
|
mcl_autogroup.register_diggroup("shearsy_cobweb")
|
||||||
mcl_autogroup.register_diggroup("swordy")
|
mcl_autogroup.register_diggroup("swordy")
|
||||||
mcl_autogroup.register_diggroup("swordy_cobweb")
|
mcl_autogroup.register_diggroup("swordy_cobweb")
|
||||||
mcl_autogroup.register_diggroup("hoey")
|
|
||||||
|
|
||||||
-- Load files
|
-- Load files
|
||||||
local modpath = minetest.get_modpath("mcl_core")
|
local modpath = minetest.get_modpath("mcl_core")
|
||||||
|
|
|
@ -268,19 +268,7 @@ local register_leaves = function(subname, description, longdesc, tiles, sapling,
|
||||||
tiles = tiles,
|
tiles = tiles,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {
|
groups = {handy=1,shearsy=1,swordy=1, leafdecay=leafdecay_distance, flammable=2, leaves=1, deco_block=1, dig_by_piston=1, fire_encouragement=30, fire_flammability=60},
|
||||||
handy=1,
|
|
||||||
hoey=1,
|
|
||||||
shearsy=1,
|
|
||||||
swordy=1,
|
|
||||||
leafdecay=leafdecay_distance,
|
|
||||||
flammable=2,
|
|
||||||
leaves=1,
|
|
||||||
deco_block=1,
|
|
||||||
dig_by_piston=1,
|
|
||||||
fire_encouragement=30,
|
|
||||||
fire_flammability=60
|
|
||||||
},
|
|
||||||
drop = get_drops(0),
|
drop = get_drops(0),
|
||||||
_mcl_shears_drop = true,
|
_mcl_shears_drop = true,
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
|
|
|
@ -78,9 +78,6 @@ minetest.register_tool("mcl_farming:hoe_wood", {
|
||||||
},
|
},
|
||||||
_repair_material = "group:wood",
|
_repair_material = "group:wood",
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
_mcl_diggroups = {
|
|
||||||
hoey = { speed = 2, level = 1, uses = 60 }
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -121,9 +118,6 @@ minetest.register_tool("mcl_farming:hoe_stone", {
|
||||||
},
|
},
|
||||||
_repair_material = "mcl_core:cobble",
|
_repair_material = "mcl_core:cobble",
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
_mcl_diggroups = {
|
|
||||||
hoey = { speed = 4, level = 3, uses = 132 }
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -160,9 +154,6 @@ minetest.register_tool("mcl_farming:hoe_iron", {
|
||||||
},
|
},
|
||||||
_repair_material = "mcl_core:iron_ingot",
|
_repair_material = "mcl_core:iron_ingot",
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
_mcl_diggroups = {
|
|
||||||
hoey = { speed = 6, level = 4, uses = 251 }
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -205,9 +196,6 @@ minetest.register_tool("mcl_farming:hoe_gold", {
|
||||||
},
|
},
|
||||||
_repair_material = "mcl_core:gold_ingot",
|
_repair_material = "mcl_core:gold_ingot",
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
_mcl_diggroups = {
|
|
||||||
hoey = { speed = 12, level = 2, uses = 33 }
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -252,9 +240,6 @@ minetest.register_tool("mcl_farming:hoe_diamond", {
|
||||||
},
|
},
|
||||||
_repair_material = "mcl_core:diamond",
|
_repair_material = "mcl_core:diamond",
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
_mcl_diggroups = {
|
|
||||||
hoey = { speed = 8, level = 5, uses = 1562 }
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
|
|
@ -146,7 +146,7 @@ minetest.register_node("mcl_farming:hay_block", {
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
on_place = mcl_util.rotate_axis,
|
on_place = mcl_util.rotate_axis,
|
||||||
groups = {handy=1, hoey=1, flammable=2, fire_encouragement=60, fire_flammability=20, building_block=1, fall_damage_add_percent=-80},
|
groups = {handy=1, flammable=2, fire_encouragement=60, fire_flammability=20, building_block=1, fall_damage_add_percent=-80},
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
on_rotate = on_rotate,
|
on_rotate = on_rotate,
|
||||||
_mcl_blast_resistance = 0.5,
|
_mcl_blast_resistance = 0.5,
|
||||||
|
|
|
@ -176,7 +176,7 @@ minetest.register_node("mcl_nether:nether_wart_block", {
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
tiles = {"mcl_nether_nether_wart_block.png"},
|
tiles = {"mcl_nether_nether_wart_block.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {handy=1, hoey=1, building_block=1},
|
groups = {handy=1, building_block=1},
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(
|
sounds = mcl_sounds.node_sound_leaves_defaults(
|
||||||
{
|
{
|
||||||
footstep={name="default_dirt_footstep", gain=0.7},
|
footstep={name="default_dirt_footstep", gain=0.7},
|
||||||
|
|
|
@ -779,7 +779,7 @@ minetest.register_node("mcl_ocean:dried_kelp_block", {
|
||||||
description = S("Dried Kelp Block"),
|
description = S("Dried Kelp Block"),
|
||||||
_doc_items_longdesc = S("A decorative block that serves as a great furnace fuel."),
|
_doc_items_longdesc = S("A decorative block that serves as a great furnace fuel."),
|
||||||
tiles = { "mcl_ocean_dried_kelp_top.png", "mcl_ocean_dried_kelp_bottom.png", "mcl_ocean_dried_kelp_side.png" },
|
tiles = { "mcl_ocean_dried_kelp_top.png", "mcl_ocean_dried_kelp_bottom.png", "mcl_ocean_dried_kelp_side.png" },
|
||||||
groups = { handy = 1, hoey = 1, building_block = 1, flammable = 2, fire_encouragement = 30, fire_flammability = 60 },
|
groups = { handy = 1, building_block = 1, flammable = 2, fire_encouragement = 30, fire_flammability = 60 },
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = mcl_util.rotate_axis,
|
on_place = mcl_util.rotate_axis,
|
||||||
|
|
|
@ -48,7 +48,7 @@ minetest.register_node("mcl_sponges:sponge", {
|
||||||
buildable_to = false,
|
buildable_to = false,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
||||||
groups = {handy=1, hoey=1, building_block=1},
|
groups = {handy=1, building_block=1},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
local pn = placer:get_player_name()
|
local pn = placer:get_player_name()
|
||||||
if pointed_thing.type ~= "node" then
|
if pointed_thing.type ~= "node" then
|
||||||
|
@ -136,7 +136,7 @@ minetest.register_node("mcl_sponges:sponge_wet", {
|
||||||
buildable_to = false,
|
buildable_to = false,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
||||||
groups = {handy=1, hoey=1, building_block=1},
|
groups = {handy=1, building_block=1},
|
||||||
on_place = place_wet_sponge,
|
on_place = place_wet_sponge,
|
||||||
_mcl_blast_resistance = 0.6,
|
_mcl_blast_resistance = 0.6,
|
||||||
_mcl_hardness = 0.6,
|
_mcl_hardness = 0.6,
|
||||||
|
|
|
@ -156,7 +156,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
|
|
||||||
for _,player in pairs(get_connected_players()) do
|
for _,player in pairs(get_connected_players()) do
|
||||||
|
|
||||||
c_x, c_y = unpack(player_collision(player))
|
local c_x, c_y = unpack(player_collision(player))
|
||||||
|
|
||||||
if player:get_velocity().x + player:get_velocity().y < .5 and c_x + c_y > 0 then
|
if player:get_velocity().x + player:get_velocity().y < .5 and c_x + c_y > 0 then
|
||||||
--minetest.chat_send_player(player:get_player_name(), "pushed at " .. c_x + c_y .. " parsecs.")
|
--minetest.chat_send_player(player:get_player_name(), "pushed at " .. c_x + c_y .. " parsecs.")
|
||||||
|
@ -210,26 +210,26 @@ minetest.register_globalstep(function(dtime)
|
||||||
|
|
||||||
if parent then
|
if parent then
|
||||||
local parent_yaw = degrees(parent:get_yaw())
|
local parent_yaw = degrees(parent:get_yaw())
|
||||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
player:set_properties({collisionbox = {-0.312,0,-0.312,0.312,1.8,0.312}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
||||||
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch, -limit_vel_yaw(yaw, parent_yaw) + parent_yaw, 0))
|
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch, -limit_vel_yaw(yaw, parent_yaw) + parent_yaw, 0))
|
||||||
player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(0,0,0))
|
player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(0,0,0))
|
||||||
elseif controls.sneak then
|
elseif controls.sneak then
|
||||||
-- controls head pitch when sneaking
|
-- controls head pitch when sneaking
|
||||||
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+36,0,0))
|
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+36,0,0))
|
||||||
-- sets eye height, and nametag color accordingly
|
-- sets eye height, and nametag color accordingly
|
||||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.35, nametag_color = { r = 225, b = 225, a = 0, g = 225 }})
|
player:set_properties({collisionbox = {-0.312,0,-0.312,0.312,1.8,0.312}, eye_height = 1.35, nametag_color = { r = 225, b = 225, a = 0, g = 225 }})
|
||||||
-- sneaking body conrols
|
-- sneaking body conrols
|
||||||
player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(0,0,0))
|
player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(0,0,0))
|
||||||
elseif get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 and is_sprinting(name) == true then
|
elseif get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 and is_sprinting(name) == true then
|
||||||
-- set head pitch and yaw when swimming
|
-- set head pitch and yaw when swimming
|
||||||
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+90-degrees(dir_to_pitch(player_velocity)),player_vel_yaw - yaw,0))
|
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+90-degrees(dir_to_pitch(player_velocity)),player_vel_yaw - yaw,0))
|
||||||
-- sets eye height, and nametag color accordingly
|
-- sets eye height, and nametag color accordingly
|
||||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 0.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
player:set_properties({collisionbox = {-0.312,0,-0.312,0.312,0.8,0.312}, eye_height = 0.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
||||||
-- control body bone when swimming
|
-- control body bone when swimming
|
||||||
player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(degrees(dir_to_pitch(player_velocity)) - 90,-player_vel_yaw + yaw + 180,0))
|
player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(degrees(dir_to_pitch(player_velocity)) - 90,-player_vel_yaw + yaw + 180,0))
|
||||||
else
|
else
|
||||||
-- sets eye height, and nametag color accordingly
|
-- sets eye height, and nametag color accordingly
|
||||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
player:set_properties({collisionbox = {-0.312,0,-0.312,0.312,1.8,0.312}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
||||||
|
|
||||||
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch, player_vel_yaw - yaw, 0))
|
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch, player_vel_yaw - yaw, 0))
|
||||||
player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(0, -player_vel_yaw + yaw, 0))
|
player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(0, -player_vel_yaw + yaw, 0))
|
||||||
|
|
Loading…
Reference in a new issue