- Code: Select all
minetest.register_craft({
type = 'cooking',
recipe = "default:leaves 6",
output = "default:coal_lump",
})
minetest.register_craft({
type = 'cooking',
recipe = "default:leaves 6",
output = "default:coal_lump",
})
Krock wrote:How can I make this working? (example node names)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
minetest.register_craft({
type = 'cooking',
recipe = "default:leaves 6",
output = "default:coal_lump",
})
minetest.register_craft({
type = 'cooking',
output = "default:coal_lump",
recipe = "default:leaves 6",
})
Hybrid Dog 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.I don't think it would work.
- Code: Select all
minetest.register_craft({
type = 'cooking',
recipe = "default:leaves",
output = "default:coal_lump 1/6",
})
ch98 wrote:Is there any way to read pixels of png file in rgb using lua? I want to try to make image to map mod that uses images to make elevation and water.
local a ={1}
local b=a
b[1]=b[1]+1
print(dump(a))
print(dump(b))
a={[1] = 2}
b={[1] = 2}
pandaro wrote:Question about lua tables:
I want to create a table that is a copy of another table.
Example: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 a ={1}
local b=a
now I want to change ONLY the table "b"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
b[1]=b[1]+1
function shallow_copy_table(t)
local new_table = {};
for k, v in pairs(t) do
new_table[k] = v;
end
return new_table;
end
local a = { 1 };
local b = shallow_copy_table(a);
b[1] = b[1]+1;
prestidigitator wrote:All variables refer to tables in Lua by reference, not by value. Lua's standard API also does not have any simple way to copy/clone tables. To implement a cloning method, you have to decide whether you want to also copy a table/object's metatable (sort of like a "class" in Lua). Also, since Lua tables can contain references to other tables, you have to decide whether you want to perform a shallow or a deep copy (a whole separate and independent tree of table objects
player_bubbles[name] = player:hud_add({
hud_elem_type = "statbar",
text = "bubble.png",
number = 20,
dir = 0,
position = {x=0.5,y=1.0},
offset = {x=0, y=-58},
})
Krock wrote:How can I override an ABM of the game?
mod = {}
function mod.abm(pos, node)
-- actual function
end
minetest.register_abm({
nodenames = {"mod:node"},
interval =5,
chance = 5,
action = function(pos, node)
mod.abm(pos, node)
end
})
Enke wrote:What is a soft dependancy, and how do I make one?
PilzAdam wrote:Enke wrote:What is a soft dependancy, and how do I make one?
https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L122
The optional dependencies are loaded first, if they are present.
pandaro wrote:A question about sound.
I took the sounds for my mod "nodevil" by freesound.org.
This is legal? What should I write in readme.md, to make it known that the sounds are not mine and others that created them?
Don't just say "it says like error with this long address to my technic folder" Copy and paste it from the file "debug.txt"FNC wrote:Hi, my name is FNC!
I nead help with seting up mods for my single player world. I have technic and all that stuff that goes with it. BUT when I go to play it says like error with this long address to my technic mod folder. PLZ help!!
Hybrid Dog wrote:I tried it out some time ago. It only works if the modpack and the mod don't have the same name if they are in a modpack.Enke wrote:Is it possible to put a modpack in a modpack? Like mesecons?
So mods/smodpack/worldedit/worldedit doesn't work
Enke wrote:Is it possible to put a modpack in a modpack? Like mesecons?
minetest.register_node("coalblock:block", { --Node
description = "coalblock", --Inv name
tiles = {"coal_block.png"}, --image
stack_max = 64, --64 max stack cuz i am makeing it for pillsadam's minitest
groups = {choppy=1,flammable=100}, --what the groups are
sounds = default.node_sound_wood_defaults(), --just wood
})
minetest.register_craft({
output = 'coalblock:block', --my crafting for coalblock (still working on it just a sample)
recipe = {
{'group:wood', 'group:wood'},
{'group:wood', 'group:wood'},
}
})
wtfsamcrap 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
groups = {choppy=1,flammable=>>>1<<<},
minetest.register_craft({
output = 'coalblock:block', --my crafting for coalblock (still working on it just a sample)
recipe = {
{'group:wood', 'group:wood'},
{'group:wood', 'group:wood'},
}
})
minetest.register_craft({
type = "fuel",
recipe = "coalblock:block",
burntime = 100,
})
pandaro wrote:what effect does exactly: "max_drop_level" in the definition of a tool?
is_ground_content = true,
legacy_facedir_simple = true,
minetest.register_ore({
ore_type = "scatter",
})
Krock wrote:And for what isYour 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
is_ground_content = true,
legacy_facedir_simple = true,
in a node definition needed?
Also this makes me thinking: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
minetest.register_ore({
ore_type = "scatter",
})
Could someone explain me the use of them please?
Users browsing this forum: No registered users and 22 guests