Hi there, i am currently failing at making the hemp mod compatible with the farming redo mod.
My last try was like this:
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 crop_def = {
drawtype = nodebox,
node_box = {
type = "fixed",
fixed = {
{-0.0625, -0.5, -0.0625, 0.0625, -0.25, 0.0625},
{-0.125, -0.25, -0.125, 0.125, -0.25, 0.125},
},
},
tiles = {"hemp_hemp_leaves.png", "hemp_hemp_leaves.png", "hemp_hemp_stalk.png", "hemp_hemp_stalk.png", "hemp_hemp_stalk.png", "hemp_hemp_stalk.png"},
groups = { growing = 1 },
sunlight_propagates = true,
selection_box = {
type = "fixed",
fixed = {-0.375, -0.5, -0.375, 0.375, -0.25, 0.375}
}
}
minetest.register_node("farming:hemp_1", table.copy(crop_def))
minetest.register_node("farming:hemp_2", table.copy(crop_def))
crop_def.node_box = {
fixed = {
{-0.0625, -0.5, -0.0625, 0.0625, 0, 0.0625},
{-0.125, 0, -0.125, 0.125, 0, 0.125},
},
}
crop_def.selection_box = {
fixed = {-0.375, -0.5, -0.375, 0.375, 0, 0.375}
}
[...]
minetest.register_node("farming:hemp_8", table.copy(crop_def))
crop_def.node_box = {
fixed = {
{-0.0625, -0.5, -0.0625, 0.0625, 1.5, 0.0625},
{-0.5, 0, -0.5, 0.5, 0, 0.5},
{-0.5, 0.5, -0.5, 0.5, 0.5, 0.5},
{-0.5, 1, -0.5, 0.5, 1, 0.5},
{-0.125, 1.5, -0.125, 0.125, 1.5, 0.125},
},
}
crop_def.selection_box = {
fixed = {-0.375, -0.5, -0.375, 0.375, 1.5, 0.375}
}
crop_def.groups.growing = 0
In this case, after it didn't want to grow, i copied it to the bottom of the farming init.lua.
I don't know what to do anymore since this kind of plant isn't anywhere to see and it just won't work. :(