From 43439972b85fbd512ea26264c2a60405f0eba898 Mon Sep 17 00:00:00 2001 From: Micle Date: Tue, 18 Jan 2022 20:00:29 +0000 Subject: [PATCH] Created config for new totems. --- .../micle/totemofreviving/config/Config.java | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/main/java/dev/micle/totemofreviving/config/Config.java b/src/main/java/dev/micle/totemofreviving/config/Config.java index 5203685..48998e0 100644 --- a/src/main/java/dev/micle/totemofreviving/config/Config.java +++ b/src/main/java/dev/micle/totemofreviving/config/Config.java @@ -1,6 +1,9 @@ package dev.micle.totemofreviving.config; -import dev.micle.totemofreviving.item.StrawTotemItem; +import dev.micle.totemofreviving.item.totem.DiamondTotemItem; +import dev.micle.totemofreviving.item.totem.IronTotemItem; +import dev.micle.totemofreviving.item.totem.NetheriteTotemItem; +import dev.micle.totemofreviving.item.totem.StrawTotemItem; import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.config.ModConfig; @@ -10,10 +13,13 @@ public final class Config { ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, Server.SPEC); } - public static final class Server { + public static class Server { private static final ForgeConfigSpec SPEC; private static final TotemConfig STRAW_TOTEM_CONFIG; + private static final TotemConfig IRON_TOTEM_CONFIG; + private static final TotemConfig DIAMOND_TOTEM_CONFIG; + private static final TotemConfig NETHERITE_TOTEM_CONFIG; static { ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder(); @@ -21,6 +27,7 @@ public final class Config { Straw Totem Iron Totem Diamond Totem + Netherite Totem Coal Totem Lapis Totem @@ -30,15 +37,25 @@ public final class Config { Quartz Totem Prismarine Totem Glowstone Totem - Netherite Totem */ + builder.comment("WHEN MAKING CHANGES IT IS RECOMMENDED TO NOT BE IN A WORLD.\n" + + "CHANGES WILL MOST LIKELY REQUIRE A RESTART FOR EVERYTHING TO WORK PROPERLY."); STRAW_TOTEM_CONFIG = new TotemConfig(builder, StrawTotemItem.getName(), - true, -1, 3, 1, false, false, 3); - + true, -1, 3, 1, false, false, 1); + IRON_TOTEM_CONFIG = new TotemConfig(builder, IronTotemItem.getName(), true, -1, 5, + 0.75, false, false, 4); + DIAMOND_TOTEM_CONFIG = new TotemConfig(builder, DiamondTotemItem.getName(), true, -1, 10, + 0.5, false, false, 10); + NETHERITE_TOTEM_CONFIG = new TotemConfig(builder, NetheriteTotemItem.getName(), true, 1, 1, + 1, true, true, 0); + SPEC = builder.build(); } public static TotemConfig getStrawTotemConfig() { return STRAW_TOTEM_CONFIG; } + public static TotemConfig getIronTotemConfig() { return IRON_TOTEM_CONFIG; } + public static TotemConfig getDiamondTotemConfig() { return DIAMOND_TOTEM_CONFIG; } + public static TotemConfig getNetheriteTotemConfig() { return NETHERITE_TOTEM_CONFIG; } } public static class TotemConfig {