Skip to content

feat: add specific exp stacking controls#21

Merged
CroaBeast merged 2 commits into
masterfrom
main
May 5, 2026
Merged

feat: add specific exp stacking controls#21
CroaBeast merged 2 commits into
masterfrom
main

Conversation

@CroaBeast
Copy link
Copy Markdown
Collaborator

Summary

  • bump version to 1.1.6
  • add stack-with-general support for specific EXP sources
  • allow specific EXP rewards to run without requiring the general source reward
  • update default earn-exp and LevelledMobs examples to document the new behavior

Commits

  • chore: bump version to 1.1.6
  • feat: add specific exp stacking controls

@CroaBeast CroaBeast requested review from Kihsomray and Klema4 May 5, 2026 16:29
@review-me-code
Copy link
Copy Markdown

review-me-code Bot commented May 5, 2026

Pull request overview

Adds stack-with-general configuration option for specific EXP sources, allowing fine-grained control over whether specific rewards stack with or replace the general reward. Includes version bump to 1.1.6 and updated documentation.

Changes:

  • Version bumped to 1.1.6 in build.gradle.kts
  • Added stackSpecificsWithGeneral field and accessor to SourceImpl in EarnExp.java
  • Updated sendExp() and sendPermissionExp() to respect stacking configuration
  • Modified getPartialMatchesExp() logic for proper stacking behavior
  • Added stackSpecificsWithGeneral() method to ExpSource interface with documentation
    Updated HookManager.java with same stacking logic
    Added stack-with-general: true to all specific entries in earn-exp.yml and levelled-mobs.yml

Reviewed changes

  • Low - Consider explicit return for disabled case in getPartialMatchesExp
    In EarnExp.java line 734, when !enabled, amount is 0.0 but returning amount is less clear than returning 0.0 explicitly. This is a minor readability improvement.

Current:

if (!enabled || (matchedSpecific && !stackSpecificsWithGeneral))
    return amount;

Could be:

if (!enabled)
    return 0.0;
if (matchedSpecific && !stackSpecificsWithGeneral)
    return amount;

This makes the disabled case more obvious at a glance.

Alternatively, keep as-is if preferring the compact form.

Reviewed 6 changed files in this pull request and generated no inline comments.


Generated by pull_request.opened.

Copy link
Copy Markdown
Collaborator

@Klema4 Klema4 left a comment

Choose a reason for hiding this comment

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

yes

@CroaBeast CroaBeast merged commit 53944a3 into master May 5, 2026
@CroaBeast CroaBeast deleted the main branch May 5, 2026 16:31
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.

2 participants