Growing wheat underground

Post Reply
LordHawk
New member
Posts: 9
Joined: Tue Sep 30, 2014 17:33

Growing wheat underground

by LordHawk » Post

I have a question on growing wheat underground. I use the super glow blocks with a light value of 15, and I have water 1 or 2 blocks away from each wheat plant. Before, wheat grew like crazy with these blocks in .4.10. Now they don't really grow at all.

This is what I have noticed. If the block is directly above the wheat (i.e. y+1) the the wheat grows, but if the y value is anything higher, it gets stuck at size 1. I have 1 super glow block per seed. Did something change between version .4.10, .4.11, .4.12 to change this? What else might effect the wheat growth? Is there a setting that changed or one I could have disabled by mistake?

Also, is there a difference between running in server mode and single player modes? If so, is there a setting I can change.

Thank you for any help.

User avatar
TenPlus1
Member
Posts: 3728
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Growing wheat underground

by TenPlus1 » Post

Growing on singleplayer and standalone is same unless server is running a different farming mod but remember that wheat needs light 14 and over to grow so light need to be placed right beside otherwise it wont be bright enough...

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: Growing wheat underground

by 12Me21 » Post

One time I had a farm with a roof made from the transparent ice from moontest. All the plants grew, except one that was directly under a torch.
This led me to believe that plants will not grow if there is anything besides air one block above. Is this true?
Also, it would be nice to be able to tell what the light level was, like either in the F5 menu or as a separate tool.

LordHawk
New member
Posts: 9
Joined: Tue Sep 30, 2014 17:33

Re: Growing wheat underground

by LordHawk » Post

TenPlus1 wrote:Growing on singleplayer and standalone is same unless server is running a different farming mod but remember that wheat needs light 14 and over to grow so light need to be placed right beside otherwise it wont be bright enough...

Then it has changed because http://wiki.minetest.net/Farming says it requires 13 or above. I also have another area that has cotton and wheat that has not grown. These get sunlight through glass, or obsidian glass, blocks, and they haven't grown since I updated first to .4.11 and then .4.12. Why was it changed? Can it be changed back?

{edit}
I just checked the code for the farming mod for 0.4.10, 0.4.11, 0.4.12. The wiki is right, and they all require minimum light of 13. Something else has changed, and to me it looks like a bug. In one of my examples (the one with sunlight & glass blocks), the only change was version. I copied the worlds over to each one. The wheat and cotton stopped growing at stage 1.

LordHawk
New member
Posts: 9
Joined: Tue Sep 30, 2014 17:33

Re: Growing wheat underground

by LordHawk » Post

Let me approach this from a different angle. I know something changed in either 0.4.11 or 0.4.12 because what was growing before the version change no longer grows. How is the light level for a node calculated? Everything in the code seems to say that light level 13 is the minimum level.

This is from the farming mod file api.lua:

Code: Select all

if not ll or ll < def.minlight or ll > def.maxlight then
	return
end
and the values of minlight and maxlight are defined in init.lua as:

Code: Select all

farming.register_plant("farming:wheat", {
	...
	minlight = 13,
	maxlight = default.LIGHT_MAX,
	...
})
This says that the minimum light level should be 13, and the light level of the super glow glass is 15. It grew/worked before upgrading versions, and now it doesn't grow/work after updating to 0.4.11 and 0.4.12. I also want to add that it doesn't grow it the glow glass is 1 space over but still one node up.

Here is a screenshot of my test area:

Image

I can't figure how to attach the screenshot directly, so here it is as a download:
screenshot_159075711.png
screenshot_159075711.png (408.32 KiB) Viewed 767 times

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: Growing wheat underground

by 12Me21 » Post

if the glass is 2 spaces above:
The inside of the glass is light level 15
The node below it has a light level of 14
The wheat is light level 13.

So apparently the wheat actually needs a light level of 14, so the glass needs to be right next to it.

LordHawk
New member
Posts: 9
Joined: Tue Sep 30, 2014 17:33

Re: Growing wheat underground

by LordHawk » Post

12Me21 wrote:if the glass is 2 spaces above:
The inside of the glass is light level 15
The node below it has a light level of 14
The wheat is light level 13.

So apparently the wheat actually needs a light level of 14, so the glass needs to be right next to it.
That doesn't make sense compare to what the actual code, or the wiki, says. Also, it used to work.

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: Growing wheat underground

by 12Me21 » Post

LordHawk wrote:
12Me21 wrote:if the glass is 2 spaces above:
The inside of the glass is light level 15
The node below it has a light level of 14
The wheat is light level 13.

So apparently the wheat actually needs a light level of 14, so the glass needs to be right next to it.
That doesn't make sense compare to what the actual code, or the wiki, says. Also, it used to work.
hmm... are you sure super glow glass outputs a light level of 15?

LordHawk
New member
Posts: 9
Joined: Tue Sep 30, 2014 17:33

Re: Growing wheat underground

by LordHawk » Post

hmm... are you sure super glow glass outputs a light level of 15?
Yup. Here is the code from the nodes.lua file from the mode:

Code: Select all

	["super_glow_glass"] = {
		description = S("Super Glow Glass"),
		drawtype = "glasslike_framed",
		paramtype = "light",
		sunlight_propagates = true,
		light_source = 15,
		groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
		sounds = sound_glass,
	},
The "light_source = 15" says that the light source is 15. I still say there is a bug somewhere in this.

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: Growing wheat underground

by 12Me21 » Post

where is it detecting the light? maybe the coordinates are offset one block down from the plant.

LordHawk
New member
Posts: 9
Joined: Tue Sep 30, 2014 17:33

Re: Growing wheat underground

by LordHawk » Post

The cotton/wheat only grows past stage 1 when the super glow glass block is directly about it. If it is above and +1 to cotton/wheat, it stops growing at stage 1. It go from seed to stage 1 and that is it. It didn't originally require the super glow glass block to be the node immediately above the seeds. It appears that the mods have not changed, so it must be something else. It is also weird that the same thing happens with obsidian glass blocks where sunlight can shine. you can not walk if there is not at least 2 block clearance.

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: Growing wheat underground

by 12Me21 » Post

This is really weird, I'll have do some lighting tests later

User avatar
yyt16384
Member
Posts: 46
Joined: Mon Nov 03, 2014 12:16
GitHub: yyt16384
IRC: yyt16384
In-game: yyt16384
Location: China

Re: Growing wheat underground

by yyt16384 » Post

The engine says brightness 15 is reserved for sunlight, so it really should not work.

Code: Select all

inline u8 diminish_light(u8 light)
{
    if(light == 0)
        return 0;
    if(light >= LIGHT_MAX)
        return LIGHT_MAX - 1;

    return light - 1;
}
LIGHT_MAX is 14, so if light=15 you will get 13...

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: Growing wheat underground

by Calinou » Post

You can do this:

Image

Be sure to hide water 1 to 3 blocks below (below the middle glass row is a good place for this).

User avatar
Hybrid Dog
Member
Posts: 2836
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Growing wheat underground

by Hybrid Dog » Post

lf a node uses "light" as paramtype, you maybe are able to find out if a light is sunlight by comparing node.param1 (which can be something between 0 and 256 l think) and the minetest.get_node_light(pos) light.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests