update mod.conf, fix nil bug

This commit is contained in:
tenplus1 2021-02-01 08:33:47 +00:00
parent f517964ce0
commit 1cfac454c0
2 changed files with 24 additions and 22 deletions

View File

@ -43,24 +43,23 @@ minetest.register_entity(fname, {
end
end
end
local apos = self.object:get_pos()
local part = minetest.add_particlespawner(
6, --amount
0.3, --time
{x=apos.x-variance, y=apos.y-variance, z=apos.z-variance}, --minpos
{x=apos.x+variance, y=apos.y+variance, z=apos.z+variance}, --maxpos
{x=-0, y=-0, z=-0}, --minvel
{x=0, y=0, z=0}, --maxvel
{x=variance,y=-0.5-variance,z=variance}, --minacc
{x=0.5+variance,y=0.5+variance,z=0.5+variance}, --maxacc
0.1, --minexptime
0.3, --maxexptime
size, --minsize
size+2, --maxsize
false, --collisiondetection
texture --texture
)
local apos = self.object:get_pos() ; if not apos then return end
minetest.add_particlespawner({
amount = 6,
time = 0.3,
minpos = {x=apos.x-variance, y=apos.y-variance, z=apos.z-variance},
maxpos = {x=apos.x+variance, y=apos.y+variance, z=apos.z+variance},
minvel = {x=-0, y=-0, z=-0},
maxvel = {x=0, y=0, z=0},
minacc = {x=variance,y=-0.5-variance,z=variance},
maxacc = {x=0.5+variance,y=0.5+variance,z=0.5+variance},
minexptime = 0.1,
maxexptime = 0.3,
minsize = size,
maxsize = size+2,
collisiondetection = false,
texture = texture
})
end,
})
end

View File

@ -1 +1,4 @@
name = dmobs
depends = default, mobs, wool
optional_depends = farming, ethereal, caverealms
description = Adds new monsters and animals into your world.