Page 1 of 1

Apple Decay

PostPosted: Sat Mar 30, 2013 23:42
by Menche
Currently apples don't decay, so you are left with a cloud of flying apples when you cut down an apple tree. Making apples decay isn't a good idea, because sometimes they are used for decoration.

My solution is to make a leaves_with_apple node that decays like leaves and drops a normal, non-decaying edible apple when dug. The problem with making unpicked apples nodes is that the apple texture can be shown up to 3 times for one node, depending on your angle. Several different possibilities:
Apple texture over leaves texture:
Image

Leaves texture over apple texture:
Image

Or, just make the leaves_with_apple look like a normal plantlike apple.

PostPosted: Sun Mar 31, 2013 00:10
by PilzAdam
I would prefer dropping the node when leafdecay group rating is 2. And spawn apples on trees like they currently do.

PostPosted: Sun Mar 31, 2013 08:24
by Mito551
i use attached_node and am happy with it

PostPosted: Sun Mar 31, 2013 11:22
by 0gb.us
PilzAdam wrote:I would prefer dropping the node when leafdecay group rating is 2. And spawn apples on trees like they currently do.

Menche wrote:Making apples decay isn't a good idea, because sometimes they are used for decoration.

PostPosted: Sun Mar 31, 2013 12:55
by PilzAdam
0gb.us wrote:
PilzAdam wrote:I would prefer dropping the node when leafdecay group rating is 2. And spawn apples on trees like they currently do.

Menche wrote:Making apples decay isn't a good idea, because sometimes they are used for decoration.

If param2 ~= 0 then nodes dont decay. So simply set param2 = 1 in on_place().

PostPosted: Sun Mar 31, 2013 20:49
by Menche
PilzAdam wrote:If param2 ~= 0 then nodes dont decay. So simply set param2 = 1 in on_place().

So generated apples would decay but when placed they wouldn't? That would work and would be one less node definition.

PostPosted: Sun Mar 31, 2013 22:57
by 0gb.us
PilzAdam wrote:
0gb.us wrote:
PilzAdam wrote:I would prefer dropping the node when leafdecay group rating is 2. And spawn apples on trees like they currently do.

Menche wrote:Making apples decay isn't a good idea, because sometimes they are used for decoration.

If param2 ~= 0 then nodes dont decay. So simply set param2 = 1 in on_place().


Really?

/me runs to check source code

That's rather interesting. It means that things with a facedir should never be in the leafdecay group. It works out quite nicely for apples though.

PostPosted: Fri Apr 05, 2013 06:39
by xavier108
Menche wrote: Making apples decay isn't a good idea, because sometimes they are used for decoration..

I store them in a chest without any reasons

PostPosted: Sat May 18, 2013 13:30
by BlockMen
I have add Apple Decay in my last mod Default Plus

PostPosted: Sat May 18, 2013 16:45
by 12Me21
maybe make them fall when not touching leaves, that way when you destroy a tree the apples will fall on the ground.

PostPosted: Sat May 18, 2013 18:59
by BlockMen
12Me21 wrote:maybe make them fall when not touching leaves, that way when you destroy a tree the apples will fall on the ground.


Well, thats how it works.
Image


Hybrid Dog wrote:I made a mod which replaces wrong directed torches (worldedit or sth like this) to right directed ones.


Why posting that here? The topic is about apple decay, not torches...

PostPosted: Sat May 18, 2013 19:04
by 12Me21
BlockMen wrote:
12Me21 wrote:maybe make them fall when not touching leaves, that way when you destroy a tree the apples will fall on the ground.


Well, thats how it works.
Image


I meant as falling nodes

PostPosted: Sat May 18, 2013 19:07
by BlockMen
12Me21 wrote:
I meant as falling nodes


And why do you think a falling node would be better than an item that falls on ground?

PostPosted: Sat May 18, 2013 19:19
by 12Me21
BlockMen wrote:
12Me21 wrote:
I meant as falling nodes


And why do you think a falling node would be better than an item that falls on ground?

nodes don't slow the game down and entities do

PostPosted: Sat May 18, 2013 19:28
by BlockMen
12Me21 wrote:
BlockMen wrote:
12Me21 wrote:
I meant as falling nodes


And why do you think a falling node would be better than an item that falls on ground?

nodes don't slow the game down and entities do


Well, even if thats true, if you want this you have to change the decay (which cant be done by mods) or you have to code a new decay just for apples, which would slow the game down too.

Furthermore it makes more sense to drop items and not nodes.