1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

Nether nodes can't be destroyed by Dungeon Masters

- Adding a check for the nodes hit by a dungeon master's fireball. If the
  node is under y=-19600, is not nether:rack, and is part of the nether
  mod, it won't be destroyed.
This commit is contained in:
LeMagnesium 2014-11-22 01:01:26 +01:00
parent 45c8275af3
commit 1f537e4b7e

View File

@ -92,6 +92,9 @@ mobs:register_arrow("mobs:fireball", {
for dz=-1,1 do
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local n = minetest.get_node(p).name
if p.y < -19600 and n ~= "nether:rack" and n:split(":")[1] == "nether" then
return
end
if n ~= "default:obsidian" and n ~= "ethereal:obsidian_brick" then
if minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <= 30 then
minetest.set_node(p, {name="fire:basic_flame"})