minetest.register_node("concrete:concrete", {
description = "Concrete",
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete4")
end,
})
minetest.register_node("concrete:concrete1", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete2")
end,
})
minetest.register_node("concrete:concrete2", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete3")
end,
})
minetest.register_node("concrete:concrete3", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete")
end,
})
minetest.register_node("concrete:concrete4", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete5")
end,
})
minetest.register_node("concrete:concrete5", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete6")
end,
})
minetest.register_node("concrete:concrete6", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
})
minetest.register_node("concrete:reinforced_concrete", {
description = "Reinforced Concerte",
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete1")
end,
})
ch98 wrote:No one seemd to have looked at my post so I will repeat.
My concrete 2.2 mod seems to shut server down when you dig the concrete.
Code causing the problem most likely is...
~~~~
minetest.env:set_node(pos, "concrete:concrete4")
~~~~
can you find the problem?
Shadow wrote:ch98 wrote:No one seemd to have looked at my post so I will repeat.
My concrete 2.2 mod seems to shut server down when you dig the concrete.
Code causing the problem most likely is...
~~~~
minetest.env:set_node(pos, "concrete:concrete4")
~~~~
can you find the problem?
Yes, set_node and add_node take a table containing the fields 'name', 'param1', and 'param2'.
Also minetest.env:* was moved to minetest.*.
minetest.set_node(pos, {name="concrete:concrete4"})
Note: Technic also has a concrete mod, so watch out for conflicts.
Evergreen wrote:Is it possible to put a modpack inside of other modpacks?
wtebmaster wrote:For the life of me I CANNOT MOD.
I am on a 64-bit Windows 7 Toshiba laptop. I use the stable, official 0.4.6 release. I've tried both the installer (in beta) and just extracting it to a folder I named Minetest in WINDOWS (C:).
I know how to install them: it's easy, just extract into the mods folder. But nothing works. The mods simply won't run, even if the game does. Every single time I run a game it's like the mod was never there. I've uninstalled and reinstalled. I even tried PilzAdam's unofficial build. Nothing works.
I'll rename the mods folder like some people say I should with the name consisting only of lowercase letters. That doesn't work either. So what the heck is going on? I even tried to make a simple mod myself, the decowood mod that is used for the creating mods tutorial. That doesn't work either.
I've tried at least two mods, the mob framework and the PilzAdam's Minecraft-like item drop mod. It all refuses to run. Can anyone help? I'll try to give additional information as needed.
Dan Duncombe wrote:Is there any way of running a certain lua file when a certain node is placed? So: If I placed mymod:mynode it would do the file mymod_second_part.lua
Dan Duncombe wrote:Also, is there any way of making it so only one of mymod:mynode can be placed in the world?
Dan Duncombe wrote:Lastly, can I make it so that if a stone node has air above it, every five seconds it has a 1/5 chance of spawning a fire node (ABM perhaps)
pandaro wrote:In which folder is stored the starry sky of minetest?
webdesigner97 wrote:If you need your manually placed node to facedir, make sure to add param2 to the node:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
after_place_node = function(pos,placer,itemstack)
--Don't forget to modify the <pos> table
minetest.set_node(pos,{name="bla", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
And for changing pictures: Why not use a texture animation?
dannydanger wrote:how do you make terracotta roof tile
on_rightclick = function(pos, node, clicker)
local inv = clicker:get_inventory()
if inv:room_for_item("main", {name="flowers:pot", count=1, wear=0, metadata=""}) then
node.name = "flowers:dandelion_white"
minetest.env:set_node(pos, node)
minetest.sound_play("default_dug_node", {pos,gain = 1.0})
inv:add_item("main", "flowers:pot")
end
end,Casimir wrote:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
on_rightclick = function(pos, node, clicker)
local inv = clicker:get_inventory()
if inv:room_for_item("main", {name="flowers:pot", count=1, wear=0, metadata=""}) then
node.name = "flowers:dandelion_white"
minetest.env:set_node(pos, node)
minetest.sound_play("default_dug_node", {pos,gain = 1.0})
inv:add_item("main", "flowers:pot")
end
end,
Everything works, except adding the item. It is added when there is already a stack of flowers:pot in the inventory, but not when there is non.
fairiestoy wrote:Hello guys,
is it possible to access the tiles that were used on minetest.register_node( <parameters> ) ? I found param1 & param2 as well as the name, but no way to find the registered image files used for that specific tile. Is that somehow possible?
(If i missed something really obvious, sorry for that :-/ )
Greetings
local first_tile = minetest.registered_nodes["default:wood"].tiles[1]
kaeza wrote:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
local first_tile = minetest.registered_nodes["default:wood"].tiles[1]
Casimir wrote:I don't understand what you mean but this might help: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L1956
Do you want to change the texture of a node (like stone and desertstone) or the way it is displayed (like papyrus/stone/torch/sign/rail...)?
Exilyth wrote:How do you use the facedir param (param2) of nodes? E.g. how do you make the facedir of a node depend on where the player looked when it is placed?
paramtype2 = "facedir",Dan Duncombe wrote:Exilyth wrote:How do you use the facedir param (param2) of nodes? E.g. how do you make the facedir of a node depend on where the player looked when it is placed?
To make a node have facedir:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
paramtype2 = "facedir",
sounds = default.node_sound_wood_defaults(),
paramtype = "light",
paramtype2 == "facedir",
on_construct = function(pos)
....
Users browsing this forum: Bing [Bot] and 5 guests