forked from VoxeLibre/VoxeLibre
Merge remote-tracking branch 'origin/master' into mineclone5
This commit is contained in:
commit
3e0bbda3f7
|
@ -3741,6 +3741,8 @@ function mobs:register_mob(name, def)
|
||||||
local can_despawn
|
local can_despawn
|
||||||
if def.can_despawn ~= nil then
|
if def.can_despawn ~= nil then
|
||||||
can_despawn = def.can_despawn
|
can_despawn = def.can_despawn
|
||||||
|
elseif def.spawn_class == "passive" then
|
||||||
|
can_despawn = false
|
||||||
else
|
else
|
||||||
can_despawn = true
|
can_despawn = true
|
||||||
end
|
end
|
||||||
|
|
|
@ -99,7 +99,7 @@ local snowball_on_step = function(self, dtime)
|
||||||
local vel = self.object:get_velocity()
|
local vel = self.object:get_velocity()
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local def = minetest.registered_nodes[node.name]
|
local def = minetest.registered_nodes[node.name]
|
||||||
|
|
||||||
|
|
||||||
-- Destroy when hitting a solid node
|
-- Destroy when hitting a solid node
|
||||||
if self._lastpos.x~=nil then
|
if self._lastpos.x~=nil then
|
||||||
|
@ -203,7 +203,7 @@ local pearl_on_step = function(self, dtime)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
-- Activate when hitting a solid node or a plant
|
-- Activate when hitting a solid node or a plant
|
||||||
elseif walkable or nn == "mcl_core:vine" or nn == "mcl_core:deadbush" or minetest.get_item_group(nn, "flower") ~= 0 or minetest.get_item_group(nn, "sapling") ~= 0 or minetest.get_item_group(nn, "plant") ~= 0 or minetest.get_item_group(nn, "mushroom") ~= 0 or not def then
|
elseif walkable or nn == "mcl_core:vine" or nn == "mcl_core:deadbush" or minetest.get_item_group(nn, "flower") ~= 0 or minetest.get_item_group(nn, "sapling") ~= 0 or minetest.get_item_group(nn, "plant") ~= 0 or minetest.get_item_group(nn, "mushroom") ~= 0 or not def then
|
||||||
local player = minetest.get_player_by_name(self._thrower)
|
local player = self._thrower and minetest.get_player_by_name(self._thrower)
|
||||||
if player then
|
if player then
|
||||||
-- Teleport and hurt player
|
-- Teleport and hurt player
|
||||||
|
|
||||||
|
|
|
@ -313,6 +313,7 @@ mcl_structures.generate_fossil = function(pos, rotation, pr)
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_structures.generate_end_exit_portal = function(pos, rot)
|
mcl_structures.generate_end_exit_portal = function(pos, rot)
|
||||||
|
minetest.add_entity(vector.add(pos, vector.new(3, 11, 3)), "mobs_mc:enderdragon")
|
||||||
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_end_exit_portal.mts"
|
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_end_exit_portal.mts"
|
||||||
return mcl_structures.place_schematic(pos, path, rot or "0", nil, true)
|
return mcl_structures.place_schematic(pos, path, rot or "0", nil, true)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue