mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Replace usages of get_node_group by get_item_group
This commit is contained in:
parent
9caf6f2904
commit
2d4b8a8232
4 changed files with 4 additions and 4 deletions
|
@ -210,7 +210,7 @@ function boat.on_step(self, dtime, moveresult)
|
||||||
if moveresult and moveresult.collides then
|
if moveresult and moveresult.collides then
|
||||||
for _, collision in ipairs(moveresult.collisions) do
|
for _, collision in ipairs(moveresult.collisions) do
|
||||||
local pos = collision.node_pos
|
local pos = collision.node_pos
|
||||||
if collision.type == "node" and minetest.get_node_group(minetest.get_node(pos).name, "dig_by_boat") > 0 then
|
if collision.type == "node" and minetest.get_item_group(minetest.get_node(pos).name, "dig_by_boat") > 0 then
|
||||||
minetest.dig_node(pos)
|
minetest.dig_node(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -617,7 +617,7 @@ minetest.register_entity("mcl_experience:bottle",{
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local n = node.name
|
local n = node.name
|
||||||
if n ~= "air" and n ~= "mcl_portals:portal" and n ~= "mcl_portals:portal_end" and minetest.get_node_group(n, "liquid") == 0 then
|
if n ~= "air" and n ~= "mcl_portals:portal" and n ~= "mcl_portals:portal_end" and minetest.get_item_group(n, "liquid") == 0 then
|
||||||
minetest.sound_play("mcl_potions_breaking_glass", {pos = pos, max_hear_distance = 16, gain = 1})
|
minetest.sound_play("mcl_potions_breaking_glass", {pos = pos, max_hear_distance = 16, gain = 1})
|
||||||
mcl_experience.throw_experience(pos, math.random(3, 11))
|
mcl_experience.throw_experience(pos, math.random(3, 11))
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
|
@ -142,7 +142,7 @@ minetest.register_entity(id.."_flying",{
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local n = node.name
|
local n = node.name
|
||||||
local g = minetest.get_node_group(n, "liquid")
|
local g = minetest.get_item_group(n, "liquid")
|
||||||
local d = 4
|
local d = 4
|
||||||
if n ~= "air" and n ~= "mcl_portals:portal" and n ~= "mcl_portals:portal_end" and g == 0 or mcl_potions.is_obj_hit(self, pos) then
|
if n ~= "air" and n ~= "mcl_portals:portal" and n ~= "mcl_portals:portal_end" and g == 0 or mcl_potions.is_obj_hit(self, pos) then
|
||||||
minetest.sound_play("mcl_potions_breaking_glass", {pos = pos, max_hear_distance = 16, gain = 1})
|
minetest.sound_play("mcl_potions_breaking_glass", {pos = pos, max_hear_distance = 16, gain = 1})
|
||||||
|
|
|
@ -64,7 +64,7 @@ function mcl_potions.register_splash(name, descr, color, def)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local n = node.name
|
local n = node.name
|
||||||
local g = minetest.get_node_group(n, "liquid")
|
local g = minetest.get_item_group(n, "liquid")
|
||||||
local d = 0.1
|
local d = 0.1
|
||||||
local redux_map = {7/8,0.5,0.25}
|
local redux_map = {7/8,0.5,0.25}
|
||||||
if n ~= "air" and n ~= "mcl_portals:portal" and n ~= "mcl_portals:portal_end" and g == 0 or mcl_potions.is_obj_hit(self, pos) then
|
if n ~= "air" and n ~= "mcl_portals:portal" and n ~= "mcl_portals:portal_end" and g == 0 or mcl_potions.is_obj_hit(self, pos) then
|
||||||
|
|
Loading…
Reference in a new issue