Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize coconut spawn ABM #13

Merged
merged 1 commit into from
Aug 19, 2022
Merged

optimize coconut spawn ABM #13

merged 1 commit into from
Aug 19, 2022

Conversation

Niklp09
Copy link
Member

@Niklp09 Niklp09 commented Aug 19, 2022

simple performance improvement

@wsor4035
Copy link
Contributor

this comes at the cost of tuning down the fruit

@Niklp09
Copy link
Member Author

Niklp09 commented Aug 19, 2022

this comes at the cost of tuning down the fruit

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

@SwissalpS
Copy link
Contributor

SwissalpS commented Aug 19, 2022

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
Copy link
Contributor

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

@Niklp09
Copy link
Member Author

Niklp09 commented Aug 19, 2022

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

@SwissalpS
Copy link
Contributor

SwissalpS commented Aug 19, 2022

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'

@Niklp09 Niklp09 changed the title speed up coconut spawn ABM optimize coconut spawn ABM Aug 19, 2022
@wsor4035 wsor4035 merged commit c4d1dde into mt-mods:master Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants