Skip to content

Conversation

@runcows
Copy link
Contributor

@runcows runcows commented Dec 2, 2025

Closes #1191

@misode misode added needs-testing Requires in-game testing quality-update Improves efficiency or structure without affecting functionality of a module labels Dec 7, 2025
@misode misode added tested Has passed in-game testing and removed needs-testing Requires in-game testing labels Dec 7, 2025
@misode misode merged commit e42406f into Gamemode4Dev:master Dec 7, 2025
4 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 7, 2025
@Bloo-dev
Copy link
Member

Bloo-dev commented Dec 8, 2025

I am somewhat worried about this change. I remember the enderpuff actually did this check, but we removed it as reading the players on_ground tag was too expensive. Does the use of predicates make this any cheaper or is this simply a NBT check with some nice paint over it?

@BPR02
Copy link
Member

BPR02 commented Dec 8, 2025

Predicates are significantly better than nbt checks because NBT checks require parsing the entire player nbt (which is massive since it includes every recipe that was unlocked). In theory a block check is still less expensive, but the predicate makes the check fully work as intended.

@runcows
Copy link
Contributor Author

runcows commented Dec 8, 2025

I did some quick benchmarking on this to check and can confirm what Beeps said.
I tested:

  • the block check we had
  • the predicate check from this PR
  • a predicate check for the NBT tag OnGround

I found that the block check is slightly better than the predicate from this PR, although sometimes close enough that I don't know if it would hold up to further testing. But the predicate in this PR is significantly better than an NBT checking predicate.

@runcows
Copy link
Contributor Author

runcows commented Dec 8, 2025

Through the profiling, I did also just notice we have this in the main function:

tag @a[tag=gm4_ef_fall,nbt={OnGround:0b}] remove gm4_ef_fall

I can open a PR to swap out the NBT check here for a predicate tomorrow when I wake up o7

@runcows runcows deleted the enderpuff-on_ground branch December 10, 2025 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

quality-update Improves efficiency or structure without affecting functionality of a module tested Has passed in-game testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

End Fishing - Ender Puff isn't refreshed when standing on a Happy Ghast

4 participants