Skip to content

Commit

Permalink
refactor: Replace Aether's menu toggle with Cumulus' menu switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
bconlon1 committed Aug 13, 2023
1 parent 8e19d42 commit fb448ca
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.19.4 2023-08-12T19:49:30.4142638 Languages: en_us
00374b1c7bbb6d9b511202242181b6ced2d71a45 assets/aether_genesis/lang/en_us.json
// 1.19.4 2023-08-12T22:35:01.9734488 Languages: en_us
d05ca79fd61c69c0beb8c597aa1e6f1fa99a0f6d assets/aether_genesis/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"block.aether_genesis.stripped_skyroot_wood_wall": "Stripped Skyroot Wood Wall",
"config.aether_genesis.client.audio.blue_aercloud_bounce_sfx": "Makes Blue Aerclouds have their wobbly sounds that play when bouncing on them",
"config.aether_genesis.client.audio.night_music_tracks": "Adds some nice night tracks to the Aether's music selection. Also disables the default music manager for the Aether, to prevent overlap",
"config.aether_genesis.client.gui.genesis_menu_layout": "Replaces the menu toggle buttons with the Cumulus' menu switcher",
"config.aether_genesis.common.gameplay.gold_aercloud_ability": "Changes Gold Aercloud and respective parachute behavior to launch entities downwards",
"entity.aether_genesis.battle_sentry": "Battle Sentry",
"entity.aether_genesis.carrion_sprout": "Carrion Sprout",
Expand Down
12 changes: 10 additions & 2 deletions src/main/java/com/aetherteam/aether_genesis/GenesisConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,27 @@ public Common(ForgeConfigSpec.Builder builder) { //todo server config
}

public static class Client {
public final ForgeConfigSpec.ConfigValue<Boolean> genesis_menu_layout;
public final ForgeConfigSpec.ConfigValue<Boolean> night_music_tracks;
public final ForgeConfigSpec.ConfigValue<Boolean> blue_aercloud_bounce_sfx;

public Client(ForgeConfigSpec.Builder builder) {
builder.push("Gui");
genesis_menu_layout = builder
.comment("Replaces the menu toggle buttons with the Cumulus' menu switcher")
.translation("config.aether.client.gui.genesis_menu_layout")
.define("Genesis menu button layout", true);
builder.pop();

builder.push("Audio");
night_music_tracks = builder
.comment("Adds some nice night tracks to the Aether's music selection. Also disables the default music manager for the Aether, to prevent overlap")
.translation("config.aether_genesis.client.audio.night_music_tracks")
.define("Nighttime Music Tracks", true);
.define("Nighttime music tracks", true);
blue_aercloud_bounce_sfx = builder
.comment("Makes Blue Aerclouds have their wobbly sounds that play when bouncing on them")
.translation("config.aether_genesis.client.audio.blue_aercloud_bounce_sfx")
.define("Blue Aercloud Bouncing Sounds", true);
.define("Blue Aercloud bouncing sounds", true);
builder.pop();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package com.aetherteam.aether_genesis.client;

import com.aetherteam.aether.AetherConfig;
import com.aetherteam.aether_genesis.Genesis;
import com.aetherteam.aether_genesis.GenesisConfig;
import com.aetherteam.aether_genesis.blockentity.GenesisMenuTypes;
import com.aetherteam.aether_genesis.blockentity.HolystoneFurnaceScreen;
import com.aetherteam.aether_genesis.client.renderer.GenesisRenderers;
import com.aetherteam.cumulus.CumulusConfig;
import net.minecraft.client.gui.screens.MenuScreens;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
Expand All @@ -14,13 +17,23 @@
public class GenesisClient {
@SubscribeEvent
public static void clientSetup(FMLClientSetupEvent event) {
setupMenuButtons();
GenesisRenderers.registerCuriosRenderers();
event.enqueueWork(() -> {
registerGuiFactories();
GenesisAtlases.registerSkyrootChestAtlases();
});
}

public static void setupMenuButtons() {
if (GenesisConfig.CLIENT.genesis_menu_layout.get()) {
CumulusConfig.CLIENT.enable_menu_list_button.set(true);
CumulusConfig.CLIENT.enable_menu_list_button.save();
AetherConfig.CLIENT.enable_aether_menu_button.set(false);
AetherConfig.CLIENT.enable_aether_menu_button.save();
}
}

public static void registerGuiFactories() {
MenuScreens.register(GenesisMenuTypes.HOLYSTONE_FURNACE.get(), HolystoneFurnaceScreen::new);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ protected void addTranslations() {
this.addContainerType(GenesisMenuTypes.HOLYSTONE_FURNACE, "Holystone Furnace");

this.addCommonConfig("gameplay", "gold_aercloud_ability", "Changes Gold Aercloud and respective parachute behavior to launch entities downwards");
this.addClientConfig("gui", "genesis_menu_layout", "Replaces the menu toggle buttons with the Cumulus' menu switcher");
this.addClientConfig("audio", "blue_aercloud_bounce_sfx", "Makes Blue Aerclouds have their wobbly sounds that play when bouncing on them");
this.addClientConfig("audio", "night_music_tracks", "Adds some nice night tracks to the Aether's music selection. Also disables the default music manager for the Aether, to prevent overlap");

Expand Down

0 comments on commit fb448ca

Please sign in to comment.