Convert to config

This commit is contained in:
LazyFleshWasTaken committed 2026-02-08 12:28:58 -08:00
1 parent 00c7848e7b
commit 6e25ac5343
2 files changed
+120 -16

No files matched your search

@@ -63,6 +63,23 @@ public class Config {
public static boolean emc = true;
// public static boolean eewand = true;
public static int infernalCoreCap = 150;
public static int witchwoodCoreCap = 100;
public static int livingwoodCoreCap = 100;
public static int dreamwoodCoreCap = 100;
public static int taintedCoreCap = 150;
public static int profaneCoreCap = 50;
public static int bloodCoreCap = 100;
public static int dreamwoodStaffCap = 250;
public static int bloodStaffCap = 50;
public static int witchwoodStaffCap = 50;
public static double vinteumDiscount = .9;
public static double alchemicalDiscount = .9;
public static double manasteelDiscount = .9;
public static double elementiumDiscount = .8;
public static double terrasteelDiscount = 1.8;
public static int bloodvis = 5;
public static int manavis = 8;
@@ -191,6 +208,93 @@ public class Config {
.getInt(bloodvis);
manavis = conf.get("power converters", "Mana to Vis", manavis, "How much Mana 0.01 Vis is worth")
.getInt(manavis);
infernalCoreCap = conf.get(
"wand cores",
"infernalCoreCap",
infernalCoreCap,
"How much capacity the Inferal Wand Core will have (Default: 150)").getInt(infernalCoreCap);
taintedCoreCap = conf.get(
"wand cores",
"taintedCoreCap",
taintedCoreCap,
"How much capacity the Tainted Wand Core will have (Default: 150)").getInt(taintedCoreCap);
profaneCoreCap = conf.get(
"wand cores",
"profaneCoreCap",
profaneCoreCap,
"How much capacity the Profane Wand Core will have (Default: 50)").getInt(profaneCoreCap);
witchwoodCoreCap = conf
.get(
"wand cores",
"witchwoodCoreCap",
witchwoodCoreCap,
"How much capacity the Witchwood Wand Core will have (Default: 100)")
.getInt(witchwoodCoreCap);
livingwoodCoreCap = conf
.get(
"wand cores",
"livingwoodCoreCap",
livingwoodCoreCap,
"How much capacity the Livingwood Wand Core will have (Default: 150)")
.getInt(livingwoodCoreCap);
dreamwoodCoreCap = conf.get(
"wand cores",
"dreamwoodCoreCap",
dreamwoodCoreCap,
"How much capacity the Dreamwood Wand Core will (Default: 100)").getInt(dreamwoodCoreCap);
bloodCoreCap = conf.get(
"wand cores",
"bloodCoreCap",
bloodCoreCap,
"How much capacity the Blood Wand Core will have (Default: 100)").getInt(bloodCoreCap);
dreamwoodStaffCap = conf.get(
"wand cores",
"dreamwoodStaffCap",
dreamwoodStaffCap,
"How much capacity the Dreamwood Staff will have (Default: 250)").getInt(dreamwoodStaffCap);
bloodStaffCap = conf.get(
"wand cores",
"bloodStaffCap",
bloodStaffCap,
"How much capacity the Blood Staff will have (Default: 50)").getInt(bloodStaffCap);
witchwoodStaffCap = conf.get(
"wand cores",
"witchwoodStaffCap",
witchwoodStaffCap,
"How much capacity the Witchwood Staff will have (Default: 50)").getInt(witchwoodStaffCap);
vinteumDiscount = conf.get(
"wand caps",
"vinteumDiscount",
vinteumDiscount,
"How much discount the Vinteum Caps will have (Default: .9)").getDouble(vinteumDiscount);
alchemicalDiscount = conf.get(
"wand caps",
"alchemicalDiscount",
alchemicalDiscount,
"How much discount the Alchemical Caps will have (Default: .9)" + '\n'
+ "Has a 10% additional discount on Aqua")
.getDouble(alchemicalDiscount);
manasteelDiscount = conf.get(
"wand caps",
"manasteelDiscount",
manasteelDiscount,
"How much discount the Manasteel Caps will have Default: .9)").getDouble(manasteelDiscount);
elementiumDiscount = conf
.get(
"wand caps",
"elementiumDiscount",
elementiumDiscount,
"How much discount the Elementium Caps will have (Default: .8)")
.getDouble(elementiumDiscount);
terrasteelDiscount = conf
.get(
"wand caps",
"terrasteelDiscount",
terrasteelDiscount,
"How much discount the Terrasteel Caps will have (Default: 1.8)")
.getDouble(terrasteelDiscount);
} catch (Exception e) {
LogHandler.log(Level.ERROR, e, "Had a problem loading its configuration.");
} finally {
@@ -150,14 +150,14 @@ public class ForbiddenItems {
GameRegistry.registerItem(wandCap, "WandCaps");
WAND_ROD_TAINTED = new WandRod(
"tainted",
150,
Config.taintedCoreCap,
new ItemStack(wandCore, 1, 0),
12,
new TaintedWandUpdate(),
new ResourceLocation("forbidden", "textures/models/wand_rod_tainted.png"));
WAND_ROD_INFERNAL = new WandRod(
"infernal",
150,
Config.infernalCoreCap,
new ItemStack(wandCore, 1, 1),
12,
new InfernalWandUpdate(),
@@ -172,28 +172,28 @@ public class ForbiddenItems {
WAND_ROD_NEUTRONIUM.setGlowing(true);
WAND_ROD_BLOOD = new WandRod(
"blood",
100,
Config.bloodCoreCap,
new ItemStack(wandCore, 1, 3),
12,
new BloodWandUpdate(),
new ResourceLocation("forbidden", "textures/models/wand_rod_blood.png"));
WAND_ROD_WITCHWOOD = new WandRod(
"witchwood",
100,
Config.witchwoodCoreCap,
new ItemStack(wandCore, 1, 4),
12,
new ManaWandUpdate(),
new ResourceLocation("forbidden", "textures/models/wand_rod_witchwood.png"));
WAND_ROD_LIVINGWOOD = new WandRod(
"livingwood",
100,
Config.livingwoodCoreCap,
new ItemStack(wandCore, 1, 7),
12,
new YandereWandUpdate(),
new ResourceLocation("forbidden", "textures/models/wand_rod_livingwood.png"));
WAND_ROD_DREAMWOOD = new WandRod(
"dreamwood",
100,
Config.dreamwoodCoreCap,
new ItemStack(wandCore, 1, 11),
12,
new YandereWandUpdate(),
@@ -206,7 +206,7 @@ public class ForbiddenItems {
new ResourceLocation("forbidden", "textures/models/wand_rod_equivalent.png"));
WAND_ROD_PROFANE = new WandRod(
"profane",
50,
Config.profaneCoreCap,
new ItemStack(wandCore, 1, 5),
12,
new ProfaneWandUpdate(),
@@ -219,7 +219,7 @@ public class ForbiddenItems {
new ResourceLocation("forbidden", "textures/models/wand_rod_profaned.png"));
STAFF_ROD_BLOOD = new StaffRod(
"blood",
50,
Config.bloodStaffCap,
new ItemStack(wandCore, 1, 9),
24,
new BloodStaffUpdate(),
@@ -234,14 +234,14 @@ public class ForbiddenItems {
STAFF_ROD_NEUTRONIUM.setGlowing(true);
STAFF_ROD_WITCHWOOD = new StaffRod(
"witchwood",
50,
Config.witchwoodStaffCap,
new ItemStack(wandCore, 1, 10),
24,
new ManaStaffUpdate(),
new ResourceLocation("forbidden", "textures/models/wand_rod_witchwood.png"));
STAFF_ROD_DREAMWOOD = new StaffRod(
"dreamwood",
250,
Config.dreamwoodStaffCap,
new ItemStack(wandCore, 1, 13),
25,
new YandereWandUpdate(),
@@ -255,33 +255,33 @@ public class ForbiddenItems {
new ResourceLocation("forbidden", "textures/models/wand_cap_orichalcum.png"));
WAND_CAP_ALCHEMICAL = new DarkWandCap(
"alchemical",
0.9F,
(float) (Config.alchemicalDiscount) / 100F,
Arrays.asList(new Aspect[] { Aspect.WATER }),
0.8F,
(float) (Config.vinteumDiscount) - .10F,
new ItemStack(wandCap, 1, 0),
7,
new ResourceLocation("forbidden", "textures/models/wand_cap_alchemical.png"));
WAND_CAP_VINTEUM = new DarkWandCap(
"vinteum",
0.9F,
(float) (Config.vinteumDiscount),
new ItemStack(wandCap, 1, 1),
6,
new ResourceLocation("forbidden", "textures/models/wand_cap_vinteum.png"));
WAND_CAP_MANASTEEL = new DarkWandCap(
"manasteel",
0.9F,
(float) (Config.manasteelDiscount),
new ItemStack(wandCap, 1, 3),
6,
new ResourceLocation("forbidden", "textures/models/wand_cap_manasteel.png"));
WAND_CAP_ELEMENTIUM = new DarkWandCap(
"elementium",
0.8F,
(float) (Config.elementiumDiscount),
new ItemStack(wandCap, 1, 5),
9,
new ResourceLocation("forbidden", "textures/models/wand_cap_elementium.png"));
WAND_CAP_TERRASTEEL = new DarkWandCap(
"terrasteel",
1.8F,
(float) (Config.terrasteelDiscount),
new ItemStack(wandCap, 1, 2),
1,
new ResourceLocation("forbidden", "textures/models/wand_cap_terrasteel.png"));