Skip to content

Commit

Permalink
cook time factor config option is now a text field instead of a slider
Browse files Browse the repository at this point in the history
  • Loading branch information
cech12 committed Aug 30, 2024
1 parent 166109a commit 5589412
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/).

## [1.21-4.1.1.0] - 2024-08-30
### Changed
- cook time factor config option is now a text field instead of a slider (thanks to NattoRiisa for the hint) #34

## [1.21-4.1.0.1] - 2024-08-10
### Fixed
- fixed startup crash for Forge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"text.autoconfig.brickfurnace.option.COOK_TIME_FACTOR.@Tooltip[1]": "Cook time factor of all added brick furnaces in relation",
"text.autoconfig.brickfurnace.option.COOK_TIME_FACTOR.@Tooltip[2]": "to corresponding vanilla furnaces. (percent)",
"text.autoconfig.brickfurnace.option.COOK_TIME_FACTOR.@Tooltip[3]": "§7§o50 - half the time, 100 same time, 200 twice the time",
"text.autoconfig.brickfurnace.option.COOK_TIME_FACTOR.@Tooltip[4]": "§7§oDefault: 100",
"text.autoconfig.brickfurnace.option.COOK_TIME_FACTOR.@Tooltip[4]": "§7§oMin: 0; Max: 10000",
"text.autoconfig.brickfurnace.option.COOK_TIME_FACTOR.@Tooltip[5]": "§7§oDefault: 100",

"text.autoconfig.brickfurnace.option.RECIPE_BLOCKED_LIST": "Recipe blocked list",
"text.autoconfig.brickfurnace.option.RECIPE_BLOCKED_LIST.@Tooltip[0]": "§6§lRecipe blocked list",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public class FabricConfigHelper implements ConfigData, IConfigHelper {
@ConfigEntry.Gui.Tooltip(count = 4)
public boolean VANILLA_RECIPES_ENABLED = VANILLA_RECIPES_ENABLED_DEFAULT;

@ConfigEntry.Gui.Tooltip(count = 5)
@ConfigEntry.BoundedDiscrete(min = (long) (COOK_TIME_FACTOR_MIN * 100), max = (long) (COOK_TIME_FACTOR_MAX * 100))
@ConfigEntry.Gui.Tooltip(count = 6)
public long COOK_TIME_FACTOR = (long) (COOK_TIME_FACTOR_DEFAULT * 100);

@ConfigEntry.Gui.Tooltip(count = 5)
Expand All @@ -40,7 +39,7 @@ public boolean areVanillaRecipesEnabled() {

@Override
public double getCookTimeFactor() {
return getConfig().COOK_TIME_FACTOR / 100D;
return Math.clamp(getConfig().COOK_TIME_FACTOR / 100D, COOK_TIME_FACTOR_MIN, COOK_TIME_FACTOR_MAX);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Project
group=de.cech12.brickfurnace
mod_version=4.1.0.1
mod_version=4.1.1.0
mod_id=brickfurnace
mod_name=Brick Furnace
mod_author=Cech12
Expand Down

0 comments on commit 5589412

Please sign in to comment.