Created config for new totems.
This commit is contained in:
@ -1,6 +1,9 @@
|
|||||||
package dev.micle.totemofreviving.config;
|
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.common.ForgeConfigSpec;
|
||||||
import net.minecraftforge.fml.ModLoadingContext;
|
import net.minecraftforge.fml.ModLoadingContext;
|
||||||
import net.minecraftforge.fml.config.ModConfig;
|
import net.minecraftforge.fml.config.ModConfig;
|
||||||
@ -10,10 +13,13 @@ public final class Config {
|
|||||||
ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, Server.SPEC);
|
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 ForgeConfigSpec SPEC;
|
||||||
|
|
||||||
private static final TotemConfig STRAW_TOTEM_CONFIG;
|
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 {
|
static {
|
||||||
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
|
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
|
||||||
@ -21,6 +27,7 @@ public final class Config {
|
|||||||
Straw Totem
|
Straw Totem
|
||||||
Iron Totem
|
Iron Totem
|
||||||
Diamond Totem
|
Diamond Totem
|
||||||
|
Netherite Totem
|
||||||
|
|
||||||
Coal Totem
|
Coal Totem
|
||||||
Lapis Totem
|
Lapis Totem
|
||||||
@ -30,15 +37,25 @@ public final class Config {
|
|||||||
Quartz Totem
|
Quartz Totem
|
||||||
Prismarine Totem
|
Prismarine Totem
|
||||||
Glowstone 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(),
|
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();
|
SPEC = builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TotemConfig getStrawTotemConfig() { return STRAW_TOTEM_CONFIG; }
|
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 {
|
public static class TotemConfig {
|
||||||
|
Reference in New Issue
Block a user