Skip to content

Commit

Permalink
Fixed #45
Browse files Browse the repository at this point in the history
Was a simple oversight with a simple fix, thanks for reporting the bug!
  • Loading branch information
CleverNucleus committed Jan 27, 2022
1 parent 2d7ad09 commit 4bd33ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.12.10

# Mod Properties
mod_version = 3.1.1
mod_version = 3.1.2
maven_group = com.github.clevernucleus
archives_base_name = playerex

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,17 @@ public void drawBackground(MatrixStack matrices, float delta, int mouseX, int mo

DataAttributesAPI.ifPresent(player, attribute, (Object)null, value -> {
if(BUTTON_KEYS.contains(key)) {
double max = ((IEntityAttribute)attribute.get()).maxValue();

if(key.equals(lvl)) {
button.active = (value < ((IEntityAttribute)attribute.get()).maxValue()) && (player.experienceLevel >= ExAPI.getConfig().requiredXp(player));
button.active = value < max && player.experienceLevel >= ExAPI.getConfig().requiredXp(player);
} else {
double modifierValue = this.playerData.get(attribute.get());

if(this.canRefund()) {
button.active = modifierValue >= 1.0D;
} else {
button.active = this.playerData.skillPoints() >= 1;
button.active = modifierValue < max && this.playerData.skillPoints() >= 1;
}

button.alt = this.canRefund();
Expand Down

0 comments on commit 4bd33ff

Please sign in to comment.