1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

Removing all the olds minetest.env calls

- All the minetest.env calls removed

It took me about 2 hours, but I did it, and it works!
This commit is contained in:
LeMagnesium
2014-11-08 18:36:57 +01:00
parent 28c92fbaa8
commit 27836d2835
57 changed files with 442 additions and 441 deletions

View File

@ -49,7 +49,7 @@ minetest.register_craftitem("mobs:bee", {
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.above then
minetest.env:add_entity(pointed_thing.above, "mobs:bee")
minetest.add_entity(pointed_thing.above, "mobs:bee")
itemstack:take_item()
end
return itemstack
@ -88,7 +88,7 @@ minetest.register_node("mobs:beehive", {
after_place_node = function(pos, placer, itemstack)
if placer:is_player() then
minetest.set_node(pos, {name="mobs:beehive", param2=1})
minetest.env:add_entity(pos, "mobs:bee")
minetest.add_entity(pos, "mobs:bee")
end
end,

View File

@ -54,7 +54,7 @@ minetest.register_craftitem("mobs:chicken", {
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.above then
minetest.env:add_entity(pointed_thing.above, "mobs:chicken")
minetest.add_entity(pointed_thing.above, "mobs:chicken")
itemstack:take_item()
end
return itemstack

View File

@ -91,12 +91,12 @@ 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
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.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

View File

@ -38,7 +38,7 @@ minetest.register_craftitem("mobs:rat", {
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.above then
minetest.env:add_entity(pointed_thing.above, "mobs:rat")
minetest.add_entity(pointed_thing.above, "mobs:rat")
itemstack:take_item()
end
return itemstack