diff --git a/mods/ITEMS/mcl_armor/damage.lua b/mods/ITEMS/mcl_armor/damage.lua index c5023deb55..3732de8e60 100644 --- a/mods/ITEMS/mcl_armor/damage.lua +++ b/mods/ITEMS/mcl_armor/damage.lua @@ -81,7 +81,7 @@ mcl_damage.register_modifier(function(obj, damage, reason) local thorns_damage = thorns_damage_regular + thorns_damage_irregular if thorns_damage > 0 and reason.type ~= "thorns" and reason.source ~= obj then - mcl_util.deal_damage(reason.source, {type = "thorns", direct = obj}) + mcl_util.deal_damage(reason.source, thorns_damage) local thorns_item = thorns_pieces[math.random(#thorns_pieces)] mcl_util.use_item_durability(thorns_item.itemstack, 2) diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index b1ce06b96e..ecd7496036 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -88,7 +88,7 @@ local function lay_down(player, pos, bed_pos, state, skip) end for _, other_pos in pairs(mcl_beds.bed_pos) do - if vector.distance(bed_pos, other_pos) < 0.1 then + if vector.distance(bed_pos2, other_pos) < 0.1 then return false, S("This bed is already occupied!") end end @@ -170,7 +170,7 @@ local function lay_down(player, pos, bed_pos, state, skip) mcl_beds.player[name] = 1 mcl_beds.pos[name] = pos - mcl_beds.bed_pos[name] = bed_pos + mcl_beds.bed_pos[name] = bed_pos2 player_in_bed = player_in_bed + 1 -- physics, eye_offset, etc player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0}) diff --git a/mods/ITEMS/mcl_enchanting/engine.lua b/mods/ITEMS/mcl_enchanting/engine.lua index e5b61d328c..89fdc393dc 100644 --- a/mods/ITEMS/mcl_enchanting/engine.lua +++ b/mods/ITEMS/mcl_enchanting/engine.lua @@ -6,6 +6,9 @@ function mcl_enchanting.is_book(itemname) end function mcl_enchanting.get_enchantments(itemstack) + if not itemstack then + return({}) + end return minetest.deserialize(itemstack:get_meta():get_string("mcl_enchanting:enchantments")) or {} end