Skip to content

Remove TConstruct slot support from grave auto-equip when tab is disabled - #50

Merged
Dream-Master merged 6 commits into
masterfrom
feature/grave-remove-tconstruct-slots
May 26, 2026
Merged

Remove TConstruct slot support from grave auto-equip when tab is disabled#50
Dream-Master merged 6 commits into
masterfrom
feature/grave-remove-tconstruct-slots

Conversation

@Eldrinn-Elantey

@Eldrinn-Elantey Eldrinn-Elantey commented May 10, 2026

Copy link
Copy Markdown

Depends on #48 and GTNewHorizons/TinkersConstruct#279.

TConstruct slot handling is kept but skipped when PHConstruct.enableTinkerInventoryTab is false. This prevents items from being silently placed into hidden non-functional slots when the tab is disabled, while still working correctly in modpacks that keep it enabled.

@koolkrafter5

Copy link
Copy Markdown

Rather than completely removing this, could you just check for the config to disable the tinker tab? That way it will be useful in other modpacks that want to keep the tab.

@Eldrinn-Elantey Eldrinn-Elantey changed the title Remove TConstruct slot support from grave auto-equip Remove TConstruct slot support from grave auto-equip when tab is disabled May 10, 2026
@Eldrinn-Elantey
Eldrinn-Elantey requested a review from a team May 17, 2026 20:36
@tiffit

tiffit commented May 26, 2026

Copy link
Copy Markdown
Member

There are a few places where Class.forName is regularly called to check if a class exists. These can probably be checked once and cached

@Eldrinn-Elantey
Eldrinn-Elantey requested a review from tiffit May 26, 2026 04:31
@danyadev

Copy link
Copy Markdown
Member

It's better to implement something like this using Loader.isModLoaded:
https://github.com/GTNewHorizons/Backhand/blob/master/src/main/java/xonin/backhand/utils/Mods.java

@Eldrinn-Elantey

Copy link
Copy Markdown
Author

Done, switched to Loader.isModLoaded

@danyadev

Copy link
Copy Markdown
Member

enableTinkerInventoryTab is a new config field which is not available in previous TConstruct versions, so i'd suggest catching a potential java error when accessing it, with a comment about it being available only since 1.14.72-GTNH

@Eldrinn-Elantey

Copy link
Copy Markdown
Author

Done, added try-catch for NoSuchFieldError with fallback to true for older TConstruct versions

@Dream-Master
Dream-Master merged commit e93cc08 into master May 26, 2026
1 check passed
@Dream-Master
Dream-Master deleted the feature/grave-remove-tconstruct-slots branch May 26, 2026 09:26
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.

5 participants