Skip to content

Commit

Permalink
number config options are now text fields instead of sliders (Fabric)
Browse files Browse the repository at this point in the history
  • Loading branch information
cech12 committed Aug 30, 2024
1 parent 20c0d10 commit 2b6d800
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 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-6.1.1.0] - 2024-08-30
### Changed
- number config options are now text fields instead of sliders (Fabric)

## [1.21-6.1.0.0] - 2024-07-14
### Changed
- updated NeoForge to 21.0.94-beta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
"text.autoconfig.ceramicbucket.option.BREAK_TEMPERATURE.@Tooltip[1]": "Minimum temperature of fluid at which the",
"text.autoconfig.ceramicbucket.option.BREAK_TEMPERATURE.@Tooltip[2]": "Ceramic Bucket breaks when emptied.",
"text.autoconfig.ceramicbucket.option.BREAK_TEMPERATURE.@Tooltip[3]": "§7§oDeactivation by setting a number larger than the hottest fluid",
"text.autoconfig.ceramicbucket.option.BREAK_TEMPERATURE.@Tooltip[4]": "§7§oDefault: 1000",
"text.autoconfig.ceramicbucket.option.BREAK_TEMPERATURE.@Tooltip[4]": "§7§oMin: -10000; Max: 10000",
"text.autoconfig.ceramicbucket.option.BREAK_TEMPERATURE.@Tooltip[5]": "§7§oDefault: 1000",

"text.autoconfig.ceramicbucket.option.DURABILITY": "Durability",
"text.autoconfig.ceramicbucket.option.DURABILITY.@Tooltip[0]": "§6§lDurability",
"text.autoconfig.ceramicbucket.option.DURABILITY.@Tooltip[1]": "Defines the maximum durability of a Ceramic Bucket.",
"text.autoconfig.ceramicbucket.option.DURABILITY.@Tooltip[2]": "§7§o0: deactivates the durability",
"text.autoconfig.ceramicbucket.option.DURABILITY.@Tooltip[3]": "§7§oDefault: 0",
"text.autoconfig.ceramicbucket.option.DURABILITY.@Tooltip[3]": "§7§oMin: 0; Max: 10000",
"text.autoconfig.ceramicbucket.option.DURABILITY.@Tooltip[4]": "§7§oDefault: 0",

"text.autoconfig.ceramicbucket.option.FISH_OBTAINING_ENABLED": "Fish obtaining enabled",
"text.autoconfig.ceramicbucket.option.FISH_OBTAINING_ENABLED.@Tooltip[0]": "§6§lFish obtaining enabled",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
@Config(name = Constants.MOD_ID)
public class FabricConfigHelper implements ConfigData, IConfigHelper {

@ConfigEntry.Gui.Tooltip(count = 5)
@ConfigEntry.BoundedDiscrete(min = BREAK_TEMPERATURE_MIN, max = BREAK_TEMPERATURE_MAX)
@ConfigEntry.Gui.Tooltip(count = 6)
public long BREAK_TEMPERATURE = BREAK_TEMPERATURE_DEFAULT;

@ConfigEntry.Gui.Tooltip(count = 4)
@ConfigEntry.BoundedDiscrete(min = DURABILITY_MIN, max = DURABILITY_MAX)
@ConfigEntry.Gui.Tooltip(count = 5)
public long DURABILITY = DURABILITY_DEFAULT;

@ConfigEntry.Gui.Tooltip(count = 4)
Expand All @@ -39,12 +37,12 @@ private FabricConfigHelper getConfig() {

@Override
public int getBreakTemperature() {
return (int) getConfig().BREAK_TEMPERATURE;
return Math.clamp((int) getConfig().BREAK_TEMPERATURE, BREAK_TEMPERATURE_MIN, BREAK_TEMPERATURE_MAX);
}

@Override
public int getDurability() {
return (int) getConfig().DURABILITY;
return Math.clamp((int) getConfig().DURABILITY, DURABILITY_MIN, DURABILITY_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.ceramicbucket
mod_version=6.1.0.0
mod_version=6.1.1.0
mod_id=ceramicbucket
mod_name=Ceramic Bucket
mod_author=Cech12
Expand Down

0 comments on commit 2b6d800

Please sign in to comment.