Compare commits

..

No commits in common. "69acc5074b9f5ac72c2c9496a710c158e0eadeae" and "81ca224bb81e8a409d5f0051c4acebe612bc5bed" have entirely different histories.

3 changed files with 9 additions and 13 deletions

View File

@ -374,7 +374,7 @@ function mcl_mobs.register_arrow(name, def)
rotate = def.rotate,
on_punch = def.on_punch or function(self, puncher, time_from_last_punch, tool_capabilities, dir, damage)
local vel = self.object:get_velocity():length()
self.object:set_velocity(dir * vel)
self.object:set_velocity({x=dir.x * vel, y=dir.y * vel, z=dir.z * vel})
self._puncher = puncher
end,
collisionbox = def.collisionbox or {0, 0, 0, 0, 0, 0},

View File

@ -126,14 +126,13 @@ mcl_mobs.register_arrow("mobs_mc:fireball", {
end,
hit_mob = function(self, mob)
local name = mob:get_luaentity().name
mob:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 6},
}, nil)
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1, true)
local ent = mob:get_luaentity()
if (not ent or ent.health <= 0) and self._puncher and name == "mobs_mc:ghast" then
if not ent or ent.health <= 0 then
awards.unlock(self._puncher:get_player_name(), "mcl:fireball_redir_serv")
end
end,

View File

@ -406,16 +406,13 @@ local function dungeons_nodes(minp, maxp, blockseed)
local pr = PseudoRandom(blockseed)
for a=1, attempts do
local dim = dungeonsizes[pr:next(1, #dungeonsizes)]
if ymin <= ymax - dim.y - 1 then
local x = pr:next(minp.x, maxp.x-dim.x-1)
local y = pr:next(ymin , ymax -dim.y-1)
local z = pr:next(minp.z, maxp.z-dim.z-1)
local p1 = {x=x,y=y,z=z}
local p2 = {x = x+dim.x+1, y = y+dim.y+1, z = z+dim.z+1}
minetest.log("verbose","[mcl_dungeons] size=" ..minetest.pos_to_string(dim) .. ", emerge from "..minetest.pos_to_string(p1) .. " to " .. minetest.pos_to_string(p2))
emerge_area(p1, p2, ecb_spawn_dungeon, {p1=p1, p2=p2, dim=dim, pr=pr})
end
local x = pr:next(minp.x, maxp.x-dim.x-1)
local y = pr:next(ymin , ymax -dim.y-1)
local z = pr:next(minp.z, maxp.z-dim.z-1)
local p1 = {x=x,y=y,z=z}
local p2 = {x = x+dim.x+1, y = y+dim.y+1, z = z+dim.z+1}
minetest.log("verbose","[mcl_dungeons] size=" ..minetest.pos_to_string(dim) .. ", emerge from "..minetest.pos_to_string(p1) .. " to " .. minetest.pos_to_string(p2))
emerge_area(p1, p2, ecb_spawn_dungeon, {p1=p1, p2=p2, dim=dim, pr=pr})
end
end