From a98b180a87723686587ac22a21b40e506c1937f4 Mon Sep 17 00:00:00 2001 From: zontreck Date: Tue, 30 Apr 2024 04:33:58 -0700 Subject: [PATCH] Fix Bug: Time in a Bottle would stop accumulating time too soon. --- gradle.properties | 2 +- .../zontreck/essentials/items/implementation/TimeBottle.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 670b139..4576309 100644 --- a/gradle.properties +++ b/gradle.properties @@ -48,7 +48,7 @@ mod_name=Aria's Essentials # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=GPLv3 # The mod version. See https://semver.org/ -mod_version=1201.2.043024.0417 +mod_version=1201.2.043024.0433 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/dev/zontreck/essentials/items/implementation/TimeBottle.java b/src/main/java/dev/zontreck/essentials/items/implementation/TimeBottle.java index fe93184..ac92f53 100644 --- a/src/main/java/dev/zontreck/essentials/items/implementation/TimeBottle.java +++ b/src/main/java/dev/zontreck/essentials/items/implementation/TimeBottle.java @@ -88,12 +88,12 @@ public class TimeBottle extends AbstractBottle if (level.getGameTime() % AEServerConfig.getInstance().bottles.ticks == 0) { int storedTime = this.getStoredEnergy(itemStack); - if (storedTime < AEServerConfig.getInstance().bottles.maxTime) { + if (storedTime < (AEServerConfig.getInstance().bottles.maxTime * 20)) { this.setStoredEnergy(itemStack, storedTime + AEServerConfig.getInstance().bottles.ticks); } int totalAccumulatedTime = this.getTotalAccumulatedTime(itemStack); - if (totalAccumulatedTime < AEServerConfig.getInstance().bottles.maxTime) { + if (totalAccumulatedTime < (AEServerConfig.getInstance().bottles.maxTime * 20)) { this.setTotalAccumulatedTime(itemStack, totalAccumulatedTime + AEServerConfig.getInstance().bottles.ticks); } }