Skip to content

Make new air usage setting to make it optional and toggleable for tools and armors. - #72

Merged
iglee42 merged 8 commits into
iglee42:1.21.1from
Gytube:1.21.1
May 26, 2026
Merged

Make new air usage setting to make it optional and toggleable for tools and armors.#72
iglee42 merged 8 commits into
iglee42:1.21.1from
Gytube:1.21.1

Conversation

@Gytube

@Gytube Gytube commented May 2, 2026

Copy link
Copy Markdown
Contributor

Creating a new setting in the config, so the player is able to toggle (enable/disable) the usage of air instead of the classic durability for every armor and tool made with shadow steel, refined radiance and shadow radiance.

use_air = false : tools and armors will behave normally by using their own durability, no air will be used (as if the backtank was empty).
use_air = true : tools will use air from the backtank if available, if backtank is empty, it will behave as usual.

Diving in water and in lava will not be affected by this new setting (will still use backtank air normally).

The only thing that will change is when the air will be consumed from the backtank by the items.

This new setting can solve the problem when mining underwater with shadowradiance pickaxe with digging power enabled, 3x3 mining can empty the backtank very fast and becomes a problem when we need air for underwater breathing. Making this optional (using classic durability) can be more helpful.

Let me know what you think about this.

Demo video : https://youtu.be/WCpgygWecmQ

2026-05-03_00 02 31 2026-05-02_23 54 48 2026-05-02_23 54 42 2026-05-02_23 54 27

Gytube added 4 commits April 24, 2026 02:11
Add a new use_air boolean config to CQOLArmors and CQOLTools with explanatory comments. Update ShadowRadianceAxe to expose a per-item "Use Air" toggle in the tooltip/config GUI and to honor QOLDataComponents.USE_AIR: when enabled the axe will let BacktankUtil absorb damage instead of consuming tool durability, and durability bar visibility/width/color are switched to reflect backtank usage. Also add required imports and minor formatting adjustments.
Introduce a USE_AIR toggle for multiple armors and tools so items can consume air from the backtank instead of their own durability. Updates include: added hover tooltip lines for the "use air" ability, added Configuration.ofBool entries to item configuration lists, changed damage handling to defer to BacktankUtil when USE_AIR is enabled, and made the air/durability bar visibility/width/color conditional on the USE_AIR flag. Also cleaned up a couple of unused imports (removed ConfigBool and some unused event/import lines). This enables per-item control to prefer backtank air usage where configured.
Add English localization entries for the "Use Air" ability to en_us.json. This introduces createqol.ability.tool.use_air and createqol.ability.armor.use_air so the tool and armor abilities have proper labels in the UI.

@iglee42 iglee42 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea to add config for this but I think in global it should just stay as a global config and not as a config for the item

Comment thread .vscode/launch.json Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file and add the .vscode folder to github ignore

Comment thread src/main/java/fr/iglee42/createqualityoflife/config/CQOLArmors.java
Comment thread src/main/java/fr/iglee42/createqualityoflife/config/CQOLTools.java
Comment thread src/main/resources/assets/createqol/lang/en_us.json
@Gytube

Gytube commented May 17, 2026

Copy link
Copy Markdown
Contributor Author

"This is a good idea to add config for this but I think in global it should just stay as a global config and not as a config for the item"
By global config you mean it should be toggled from the createqol-server.toml config file, or from the backtank in-game config to control all tools/armors from one option (instead of each item) ?

"Also if think you should change the message in tooltip to replace the one with air amount instead of adding a new tooltip line"
Can you give me more details please ? Tools must display the amount of air remaining in the backtank ?

@iglee42

iglee42 commented May 17, 2026

Copy link
Copy Markdown
Owner

By global config you mean it should be toggled from the createqol-server.toml config file, or from the backtank in-game config to control all tools/armors from one option (instead of each item) ?

I meant with the config file createqol-server.toml, not a configuration on each item/only the backtank

Can you give me more details please ? Tools must display the amount of air remaining in the backtank ?

I meant for the backtank not for the tools/helmet/leggings/boots.
I just add the comment in the wrong place

@Gytube

Gytube commented May 17, 2026

Copy link
Copy Markdown
Contributor Author

Alright, i've done the changes, check if it's what you waited for.
Some screenshots ingame :

2026-05-17_16 28 16 2026-05-17_16 28 36 image 2026-05-17_16 31 26 2026-05-17_16 34 36

Replace hard-coded English air tooltip in three chestplate classes with translatable keys and wrap result in parentheses for display. Updated files: RefinedRadianceChestplate, ShadowRadianceChestplate, ShadowSteelChestplate now use createqol.tooltip.use_air.powering or .breathing based on config. Added corresponding entries to en_us.json for the two new translation keys.
@Gytube

Gytube commented May 23, 2026

Copy link
Copy Markdown
Contributor Author

Sorry for the delay but here are the fixes.
Mod is still working correctly.

Add createqol.ability.use_air and tooltip entries (use_air.powering, use_air.breathing) to Japanese and Russian language files to provide UI text for air-powered equipment and underwater breathing.
@Gytube

Gytube commented May 23, 2026

Copy link
Copy Markdown
Contributor Author

(I used Google translator for ru_ru and ja_jp localization so it may be not perfect)

@iglee42
iglee42 merged commit a7fe583 into iglee42:1.21.1 May 26, 2026
2 checks passed
@VladisCrafter

Copy link
Copy Markdown
Contributor

...so it may be not perfect)

Can confirm it is far from perfect, for ru_ru for sure :>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants