Skip to content

Commit a99d5a9

Browse files
committed
Add configurable vault screen texture
closes #19
1 parent 1073272 commit a99d5a9

File tree

6 files changed

+13
-2
lines changed

6 files changed

+13
-2
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ yarn_mappings=1
77
loader_version=0.11.6
88
fabric_version=0.36.0+1.17
99
# Mod Properties
10-
mod_version=2.1.1-SNAPSHOT
10+
mod_version=2.1.1
1111
maven_group=dev.frydae
1212
archives_base_name=empire-minecraft-utilities
1313
# Dependencies

src/main/java/dev/frydae/emcutils/features/vaultButtons/VaultScreen.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.mojang.blaze3d.systems.RenderSystem;
66
import dev.frydae.emcutils.EmpireMinecraftUtilities;
77
import dev.frydae.emcutils.accessors.ScreenAccessor;
8+
import dev.frydae.emcutils.utils.Config;
89
import net.minecraft.client.MinecraftClient;
910
import net.minecraft.client.gui.screen.ingame.HandledScreen;
1011
import net.minecraft.client.gui.screen.ingame.ScreenHandlerProvider;
@@ -25,7 +26,7 @@
2526
import org.apache.commons.lang3.math.NumberUtils;
2627

2728
public class VaultScreen extends HandledScreen<VaultScreenHandler> implements ScreenHandlerProvider<VaultScreenHandler> {
28-
private static final Identifier TEXTURE = new Identifier(EmpireMinecraftUtilities.MODID, "textures/gui/container/generic_63.png");
29+
private static final Identifier TEXTURE = new Identifier(EmpireMinecraftUtilities.MODID, Config.returnVaultScreenOption());
2930
private final int rows;
3031
private final int vaultPage;
3132
private final int[] slotOffsets = {8, 26, 44, 62, 80, 98, 116, 134, 152};

src/main/java/dev/frydae/emcutils/utils/Config.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@
99

1010
@SuppressWarnings("unused")
1111
public class Config extends MidnightConfig {
12+
@Getter @Entry public static boolean darkVaultScreen = false;
1213
@Getter @Entry public static boolean tabListShowAllServers = true;
1314
@Getter @Entry public static TabListSortType tabListSortType = TabListSortType.SERVER_ASCENDING;
1415
@Getter @Entry public static TabListCurrentServerPlacement tabListCurrentServerPlacement = TabListCurrentServerPlacement.TOP;
1516
@Entry public static boolean chatAlertsOn = true;
1617
@Getter @Entry(min=-15,max=30) public static int chatAlertPitch = 0;
1718
@Getter @Entry public static ChatAlertSound chatAlertSound = ChatAlertSound.LEVEL_UP;
1819

20+
public enum VaultScreenOptions {LIGHT_SCREEN, DARK_SCREEN}
21+
22+
public static String returnVaultScreenOption() {
23+
if (darkVaultScreen) return "textures/gui/container/generic_63_dark.png";
24+
else return "textures/gui/container/generic_63.png";
25+
}
26+
1927
@AllArgsConstructor
2028
public enum TabListSortType {
2129
NAME_ASCENDING() {
@@ -64,4 +72,5 @@ public enum ChatAlertSound {
6472
this.soundEvent = soundEvent;
6573
}
6674
}
75+
// public static String LIGHT_SCREEN = "textures/gui/container/generic_63.png";
6776
}

src/main/resources/assets/emcutils/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"emcutils.midnightconfig.title": "Empire Minecraft Utilities",
3+
"emcutils.midnightconfig.darkVaultScreen": "Dark vault screen (requires restart)",
34
"emcutils.midnightconfig.tabListShowAllServers": "Show all servers in the Player Tab List",
45
"emcutils.midnightconfig.tabListSortType": "How to sort players",
56
"emcutils.midnightconfig.enum.TabListSortType.NAME_ASCENDING": "Players A to Z",
-389 Bytes
Loading
925 Bytes
Loading

0 commit comments

Comments
 (0)