Skip to content

Conversation

@DereC4
Copy link

@DereC4 DereC4 commented May 17, 2025

Description

The data displayed by the placeholder %slimefun_researches_percentage_researches_unlocked% displays data from all slimefun items (including the disabled ones) while the /sf stats displays data from all slimefun items (except the disabled ones).

Proposed changes

I'm not sure about style guide or how you wanted parity to happen, so I went with the more logical approach. Adjusted the placeholder calculation to remove disabled researches from the calculation, which matches what the /stats command does.

Made the countNonEmptyResearches public to access it from placeholder with our provided profile instance.

Related Issues (if applicable)

#4277

Checklist

  • I have fully tested the proposed changes and promise that they will not break everything into chaos.
  • I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
  • I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*).
  • I followed the existing code standards and didn't mess up the formatting.
  • I did my best to add documentation to any public classes or methods I added.
  • I have added Nonnull and Nullable annotations to my methods to indicate their behaviour for null values
  • I added sufficient Unit Tests to cover my code.

@DereC4 DereC4 requested a review from a team as a code owner May 17, 2025 18:58
@github-actions
Copy link
Contributor

Pro Tip!
You can help us label your Pull Requests by using the following branch naming convention next time you create a pull request. ❤️

Branch naming convention Label
feature/** 🎈 Feature
fix/** ✨ Fix
chore/** 🧹 Chores
api/** 🔧 API
performance/** 💡 Performance Optimization
compatibility/** 🤝 Compatibility

If your changes do not fall into any of these categories, don't worry. You can just ignore this message in that case! 👀

@DereC4 DereC4 changed the title feat: make research placeholder use same math logic as stats fix: make research placeholder use same math logic as stats May 17, 2025
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.

1 participant