Fix bugs in flint and ssteel and ender eye
This commit is contained in:
parent
29873b96c1
commit
817c52f92f
5 changed files with 35 additions and 53 deletions
|
@ -1,8 +1,8 @@
|
|||
-- Flint and Steel
|
||||
minetest.register_tool("mcl_fire:flint_and_steel", {
|
||||
description = "Flint and Steel",
|
||||
_doc_items_longdesc = "Flint and steel is a tool to start fires and ignite blocks.",
|
||||
_doc_items_usagehelp = "Rightclick the surface of a block to attempt to light a fire in front of it. On netherrack and magma blocks it will start an eternal fire. Using it on TNT will ignite it.",
|
||||
_doc_items_longdesc = "Flint and steel is a tool to start fires, ignite blocks and open portals.",
|
||||
_doc_items_usagehelp = "Rightclick the surface of a block to attempt to light a fire in front of it. On netherrack it will start an eternal fire. Using it on TNT will ignite it. To open a Nether portal, place an upright frame of obsidian with a length of 4 and a height of 5 blocks, leaving only air in the center. After placing this frame, use the flint and steel on inside of the frame.",
|
||||
inventory_image = "mcl_fire_flint_and_steel.png",
|
||||
liquids_pointable = false,
|
||||
stack_max = 1,
|
||||
|
@ -25,7 +25,7 @@ minetest.register_tool("mcl_fire:flint_and_steel", {
|
|||
if pointed_thing.type == "node" then
|
||||
local nodedef = minetest.registered_nodes[minetest.get_node(pointed_thing.under).name]
|
||||
if nodedef and nodedef._on_ignite then
|
||||
nodedef._on_ignite(pointed_thing.under, user)
|
||||
nodedef._on_ignite(user, pointed_thing)
|
||||
else
|
||||
mcl_fire.set_fire(pointed_thing)
|
||||
end
|
||||
|
|
|
@ -376,7 +376,8 @@ local eternal_override = {
|
|||
minetest.remove_node(pos)
|
||||
end
|
||||
end,
|
||||
_on_ignite = function(pos, player)
|
||||
_on_ignite = function(player, pointed_thing)
|
||||
local pos = pointed_thing.under
|
||||
local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
if minetest.get_node(flame_pos).name == "air" then
|
||||
minetest.set_node(flame_pos, {name = "mcl_fire:eternal_fire"})
|
||||
|
|
|
@ -71,8 +71,8 @@ minetest.register_node("mcl_tnt:tnt", {
|
|||
mesecons = {effector = {
|
||||
action_on = tnt.ignite
|
||||
}},
|
||||
_on_ignite = function(pos, player)
|
||||
tnt.ignite(pos)
|
||||
_on_ignite = function(player, pointed_thing)
|
||||
tnt.ignite(pointed_thing.under)
|
||||
end,
|
||||
sounds = sounds,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue