mt-mods / moretrees

Other
8 stars 10 forks source link

optimize coconut spawn ABM #13

Closed Niklp09 closed 2 years ago

Niklp09 commented 2 years ago

simple performance improvement

wsor4035 commented 2 years ago

this comes at the cost of tuning down the fruit

Niklp09 commented 2 years ago

this comes at the cost of tuning down the fruit

And why? Can you tell me what I've not considered?

SwissalpS commented 2 years ago

hmm, do I understand this correctly? When a palm tree grows it places some trunks of type "moretrees:palm_fruit_trunk_gen" and then the ABM detects these and turns them into normal fruit trunks with coconut(s) around them? So wouldn't increasing the interval by a factor of 6 make this process slower?

SwissalpS commented 2 years ago

on line 48 the abm starts that spawns consecutive coconuts. (and I think it is slow but I'm OK with it)

Niklp09 commented 2 years ago

The time of execution is only changed, the end result remains the same

SwissalpS commented 2 years ago

I'm OK with this PR, the initial coconuts take a little longer to appear giving the CPU a 'breather'.

Edit: I was just a little confused as the title says 'speed up'