sapier wrote:@babe223 I think he's doing models same way we all do, by imagining where points of boxes need to be and then writing them in your favourite text editor. Afterwards checking if assumption was correct within minetest. ;-)
If there is a program I don't know about I'd be interested in too :)
Mito551 wrote:UPD:
...aaaand it's gone. everything's alright. it shows properly. for now. i will keep the post so you could think what could have caused it.
PilzAdam wrote:The light wasnt updated. Hitting it will update the light.
minetest.register_craft( {
output = '3dforniture:table_lamp_off',
recipe = {
{'default:paper','default:torch' ,'default:paper'},
{'','default:stick',''},
{'','stairsplus:slab_wood',''},
},
})
VanessaE wrote:Can you add an alternate recipe to allow crafting a lamp using the wooden slabs provided by stairsplus? You do not have to make it a dependency, just add another recipe - it will be ignored if stairsplus isn't present. The nodename for those slabs is "stairsplus:slab_wood".
Insert the following at line 83 of crafting.lua (as an alternate to what is there now, so keep both):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( {
output = '3dforniture:table_lamp_off',
recipe = {
{'default:paper','default:torch' ,'default:paper'},
{'','default:stick',''},
{'','stairsplus:slab_wood',''},
},
})
Thanks :-)
pixelnodebox = function ( size, boxes )
local fixed = { };
local i, box;
for i, box in ipairs(boxes) do
local x, y, z, w, h, l = unpack(box);
fixed[#fixed + 1] = {
(x / size) - 0.5,
(y / size) - 0.5,
(z / size) - 0.5,
((x + w) / size) - 0.5,
((y + h) / size) - 0.5,
((z + l) / size) - 0.5,
};
end
return {
type = "fixed";
fixed = fixed;
};
end;
minetest.register_node("modname:nodename", {
drawtype = "nodebox";
-- Other node defs here...
node_box = pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 17, 32, 32, 12 }, -- Monitor Screen
{ 3, 3, 29, 26, 26, 3 }, -- Monitor Tube
{ 0, 0, 0, 32, 4, 17 }, -- Keyboard
});
});
Inocudom wrote:Is there a way to disable this mod's version of the tree trunks should it be necessary to do so?
VanessaE wrote:In light of the above, I'd like to reiterate my previous suggestion that the furniture and bathroom kit be split into a separate mod (or two) from trees/papyrus.
Jade_0420 wrote:IS THIS FOR 0.4.4?
kaeza wrote:About node boxes, you may find this useful (it's part of my computers mod):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
pixelnodebox = function ( size, boxes )
local fixed = { };
local i, box;
for i, box in ipairs(boxes) do
local x, y, z, w, h, l = unpack(box);
fixed[#fixed + 1] = {
(x / size) - 0.5,
(y / size) - 0.5,
(z / size) - 0.5,
((x + w) / size) - 0.5,
((y + h) / size) - 0.5,
((z + l) / size) - 0.5,
};
end
return {
type = "fixed";
fixed = fixed;
};
end;
It is useful if you draw the basic layout of the object in a paint program, and then use the pixel coordinates for the nodeboxes. That way, you can use the layout you drew as a texture and it will map 1:1 into the nodeboxes.
Here's a piece of code that illustrates the usage: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_node("modname:nodename", {
drawtype = "nodebox";
-- Other node defs here...
node_box = pixelnodebox(32, {
-- X Y Z W H L
{ 0, 0, 17, 32, 32, 12 }, -- Monitor Screen
{ 3, 3, 29, 26, 26, 3 }, -- Monitor Tube
{ 0, 0, 0, 32, 4, 17 }, -- Keyboard
});
});
(X, Y, Z) is the position of the nodebox, W is the width (lenght in X direction), H is the height (length in Y direction), and L is length (length in Z direction).
Look at my mod for a real usage.
Users browsing this forum: No registered users and 3 guests