-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
043a059
commit b2299d0
Showing
24 changed files
with
440 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/wtf/cheeze/sbt/config/GlobalSearchYaclScreen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (C) 2024 MisterCheezeCake | ||
* | ||
* This file is part of SkyblockTweaks. | ||
* | ||
* SkyblockTweaks is free software: you can redistribute it | ||
* and/or modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation, either | ||
* version 3 of the License, or (at your option) any later version. | ||
* | ||
* SkyblockTweaks is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with SkyblockTweaks. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
package wtf.cheeze.sbt.config; | ||
|
||
import dev.isxander.yacl3.api.YetAnotherConfigLib; | ||
import dev.isxander.yacl3.gui.YACLScreen; | ||
import net.minecraft.client.gui.screen.Screen; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public class GlobalSearchYaclScreen extends YACLScreen { | ||
|
||
private final Supplier<Screen> parentSupplier; | ||
|
||
public GlobalSearchYaclScreen(YetAnotherConfigLib config, Supplier<Screen> parent) { | ||
super(config, null); | ||
this.parentSupplier = parent; | ||
} | ||
|
||
@Override | ||
public void close() { | ||
this.client.setScreen(parentSupplier.get()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
src/main/java/wtf/cheeze/sbt/config/categories/GlobalSearchCategory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* | ||
* Copyright (C) 2024 MisterCheezeCake | ||
* | ||
* This file is part of SkyblockTweaks. | ||
* | ||
* SkyblockTweaks is free software: you can redistribute it | ||
* and/or modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation, either | ||
* version 3 of the License, or (at your option) any later version. | ||
* | ||
* SkyblockTweaks is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with SkyblockTweaks. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
package wtf.cheeze.sbt.config.categories; | ||
|
||
import dev.isxander.yacl3.api.ButtonOption; | ||
import dev.isxander.yacl3.api.ConfigCategory; | ||
import dev.isxander.yacl3.api.OptionDescription; | ||
import net.minecraft.text.Text; | ||
import wtf.cheeze.sbt.SkyblockTweaks; | ||
import wtf.cheeze.sbt.config.ConfigImpl; | ||
import wtf.cheeze.sbt.config.SBTConfig; | ||
import wtf.cheeze.sbt.features.BrewingStandOverlay; | ||
import wtf.cheeze.sbt.features.MenuHighlights; | ||
import wtf.cheeze.sbt.features.chat.ChatProtections; | ||
import wtf.cheeze.sbt.features.chat.PartyFeatures; | ||
import wtf.cheeze.sbt.features.huds.*; | ||
import wtf.cheeze.sbt.mixin.YACLScreenAccessor; | ||
import wtf.cheeze.sbt.utils.Version; | ||
import wtf.cheeze.sbt.utils.actionbar.ActionBarTransformer; | ||
|
||
public class GlobalSearchCategory { | ||
|
||
public static ConfigCategory getCategory(ConfigImpl defaults, ConfigImpl config) { | ||
return ConfigCategory.createBuilder() | ||
.name(Text.translatable("sbt.config.globalSearch")) | ||
.tooltip(Text.translatable("sbt.config.globalSearch.desc")) | ||
.option(Version.getStreamOption(defaults, config)) | ||
.group(General.InventoryTweaks.getGroup(defaults, config)) | ||
.group(MenuHighlights.Config.getGroup(defaults, config)) | ||
.group(BrewingStandOverlay.Config.getGroup(defaults, config)) | ||
.group(General.HudTweaks.getGroup(defaults, config)) | ||
.group(ActionBarTransformer.Config.getGroup(defaults, config)) | ||
.group(PartyFeatures.Config.getGroup(defaults, config)) | ||
.group(PartyFeatures.Config.getBlackList(defaults, config)) | ||
.group(ChatProtections.Config.getGroup(defaults, config)) | ||
.group(SkillHUDManager.SkillHUD.Config.getGroup(defaults, config)) | ||
.group(SkillHUDManager.SkillBar.Config.getGroup(defaults, config)) | ||
.group(HealthHUD.Config.getGroup(defaults, config)) | ||
.group(HealthBar.Config.getGroup(defaults, config)) | ||
.group(ManaHUD.Config.getGroup(defaults, config)) | ||
.group(ManaBar.Config.getGroup(defaults, config)) | ||
.group(OverflowManaHUD.Config.getGroup(defaults, config)) | ||
.group(EhpHUD.Config.getGroup(defaults, config)) | ||
.group(SpeedHUD.Config.getGroup(defaults, config)) | ||
.group(DefenseHUD.Config.getGroup(defaults, config)) | ||
.group(DamageReductionHUD.Config.getGroup(defaults, config)) | ||
.group(DrillFuelHUD.Config.getGroup(defaults, config)) | ||
.group(DrillFuelBar.Config.getGroup(defaults, config)) | ||
.group(CoordinatesHUD.Config.getGroup(defaults, config)) | ||
.group(RealTimeHUD.Config.getGroup(defaults, config)) | ||
.group(FpsHUD.Config.getGroup(defaults, config)) | ||
.group(TickerHUD.Config.getGroup(defaults, config)) | ||
.build(); | ||
} | ||
|
||
public static ButtonOption getOpenGlobalSearchButton(ConfigImpl defaults, ConfigImpl config) { | ||
return ButtonOption.createBuilder() | ||
.name(Text.translatable("sbt.config.globalSearch.open")) | ||
.description(OptionDescription.of(Text.translatable("sbt.config.globalSearch.open.desc"))) | ||
.text(Text.translatable("sbt.config.globalSearch.open.text")) | ||
.action((y, o) -> { | ||
|
||
if (y.pendingChanges()) { | ||
y.finishOrSave(); | ||
} | ||
SkyblockTweaks.mc.setScreen(SBTConfig.getSpecialGlobalSearchScreen(((YACLScreenAccessor) y).sbt$getParent())); | ||
|
||
|
||
}) | ||
.build(); | ||
} | ||
|
||
|
||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/wtf/cheeze/sbt/config/persistent/PersistentData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/wtf/cheeze/sbt/config/persistent/ProfileData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/wtf/cheeze/sbt/features/BrewingStandOverlay.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/wtf/cheeze/sbt/features/chat/ChatProtections.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/wtf/cheeze/sbt/features/huds/SkillHUDManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/wtf/cheeze/sbt/mixin/YACLScreenAccessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (C) 2024 MisterCheezeCake | ||
* | ||
* This file is part of SkyblockTweaks. | ||
* | ||
* SkyblockTweaks is free software: you can redistribute it | ||
* and/or modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation, either | ||
* version 3 of the License, or (at your option) any later version. | ||
* | ||
* SkyblockTweaks is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with SkyblockTweaks. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
package wtf.cheeze.sbt.mixin; | ||
|
||
import dev.isxander.yacl3.gui.YACLScreen; | ||
import net.minecraft.client.gui.screen.Screen; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(YACLScreen.class) | ||
public interface YACLScreenAccessor { | ||
@Accessor("parent") | ||
Screen sbt$getParent(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.