mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-07-07 18:30:28 +02:00
Updated mob mod
- Slightly changed API - Added textures, and sounds - Removed .env calls
This commit is contained in:
@ -110,7 +110,7 @@ mobs:register_arrow("mobs:fireball", {
|
||||
for dy=-1,1 do
|
||||
for dz=-1,1 do
|
||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||
local n = minetest.env:get_node(p).name
|
||||
local n = minetest.get_node(p).name
|
||||
local excluding = minetest.registered_nodes[n].groups["unbreakable"] ~= nil
|
||||
or n:split(":")[1] == "nether"
|
||||
for _,i in ipairs(excluded) do
|
||||
@ -121,11 +121,13 @@ mobs:register_arrow("mobs:fireball", {
|
||||
if excluding then
|
||||
return
|
||||
end
|
||||
if n ~= "default:obsidian" and n ~= "ethereal:obsidian_brick" then
|
||||
if n ~= "default:obsidian"
|
||||
and n ~= "default:obsidianbrick"
|
||||
and not n:find("protector:") then
|
||||
if minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <= 30 then
|
||||
minetest.env:set_node(p, {name="fire:basic_flame"})
|
||||
minetest.set_node(p, {name="fire:basic_flame"})
|
||||
else
|
||||
minetest.env:set_node(p, {name="air"})
|
||||
minetest.set_node(p, {name="air"})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user