Merge branch 'master' into mineclone5
commit
47aa5da242
|
@ -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)
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue