Skip to content

Commit

Permalink
durability config option is now a text field instead of a slider (Fab…
Browse files Browse the repository at this point in the history
…ric)
  • Loading branch information
cech12 committed Aug 30, 2024
1 parent 70ec510 commit 27fa119
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 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-3.2.1.0] - 2024-08-30
### Changed
- durability config option is now a text field instead of a slider (Fabric)

## [1.21-3.2.0.2] - 2024-08-10
### Fixed
- fixed shears damaging in Forge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"text.autoconfig.ceramicshears.option.DURABILITY": "Ceramic Shears Durability",
"text.autoconfig.ceramicshears.option.DURABILITY.@Tooltip[0]": "§6§lCeramic Shears Durability",
"text.autoconfig.ceramicshears.option.DURABILITY.@Tooltip[1]": "Defines the maximum durability of Ceramic Shears.",
"text.autoconfig.ceramicshears.option.DURABILITY.@Tooltip[2]": "§7§oDefault: 179",
"text.autoconfig.ceramicshears.option.DURABILITY.@Tooltip[3]": "§7§o0: deactivates the durability"
"text.autoconfig.ceramicshears.option.DURABILITY.@Tooltip[2]": "§7§o0: deactivates the durability",
"text.autoconfig.ceramicshears.option.DURABILITY.@Tooltip[3]": "§7§oMin: 0; Max: 10000",
"text.autoconfig.ceramicshears.option.DURABILITY.@Tooltip[4]": "§7§oDefault: 179"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
@Config(name = Constants.MOD_ID)
public class FabricConfigHelper implements ConfigData, IConfigHelper {

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

@Override
Expand All @@ -25,7 +24,8 @@ public void init() {

@Override
public int getDurability() {
return AutoConfig.getConfigHolder(FabricConfigHelper.class).getConfig().DURABILITY;
int configuredDurability = AutoConfig.getConfigHolder(FabricConfigHelper.class).getConfig().DURABILITY;
return Math.clamp(configuredDurability, DURABILITY_MIN, DURABILITY_MAX);
}

}
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.ceramicshears
mod_version=3.2.0.2
mod_version=3.2.1.0
mod_id=ceramicshears
mod_name=Ceramic Shears
mod_author=Cech12
Expand Down

0 comments on commit 27fa119

Please sign in to comment.