Skip to content

Conversation

@BPR02
Copy link
Member

@BPR02 BPR02 commented Dec 10, 2025

No description provided.

@misode
Copy link
Member

misode commented Dec 23, 2025

Since this uses clone filtered force it creates block updates nearby, that may not be ideal (see image). An alternative would maybe be a predicate that checks all required block positions, similar to our soul glass beacon beam predicate.

javaw_ALP84knDle

@BPR02
Copy link
Member Author

BPR02 commented Dec 23, 2025

Hmm, yeah. Do we know if many block checks in a predicate significantly contributes to lag (spikes)? The clone method is currently the same method used for Towering Trees, so we might wanna do some performance testing to see if a predicate would be fine (especially for Towering Trees since those would have a lot more block checks). I think for apple trees, the predicate wouldn't significantly affect performance, so I can switch to that.

@misode
Copy link
Member

misode commented Dec 23, 2025

I did a benchmark to compare these two solutions and the results are not even close.

  • Clone: 33.330 mspt (200 checks per tick, 6x6x6 area)
  • Predicate: 1.314 mspt (200 checks per tick, 6x6x6 area)
chrome_qO31cHRhXp

@BPR02
Copy link
Member Author

BPR02 commented Dec 23, 2025

Alright, assuming this scales for like 15x15x15, we should probably change Towering Trees to use a predicate @TheThanathor

Copy link
Member

@misode misode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, code looks good.

@misode misode added tested Has passed in-game testing fix This fixes something that was wrong labels Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix This fixes something that was wrong tested Has passed in-game testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants