Fix Bug: Time in a Bottle would stop accumulating time too soon.

This commit is contained in:
zontreck 2024-04-30 04:33:58 -07:00
parent 1bdcb0c2fc
commit a98b180a87
2 changed files with 3 additions and 3 deletions

View file

@ -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. # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=GPLv3 mod_license=GPLv3
# The mod version. See https://semver.org/ # 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. # 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. # This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html # See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View file

@ -88,12 +88,12 @@ public class TimeBottle extends AbstractBottle
if (level.getGameTime() % AEServerConfig.getInstance().bottles.ticks == 0) { if (level.getGameTime() % AEServerConfig.getInstance().bottles.ticks == 0) {
int storedTime = this.getStoredEnergy(itemStack); 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); this.setStoredEnergy(itemStack, storedTime + AEServerConfig.getInstance().bottles.ticks);
} }
int totalAccumulatedTime = this.getTotalAccumulatedTime(itemStack); 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); this.setTotalAccumulatedTime(itemStack, totalAccumulatedTime + AEServerConfig.getInstance().bottles.ticks);
} }
} }