From 6e9e46e51643c63053c1410c9c336e35be0ba6bf Mon Sep 17 00:00:00 2001 From: Micle Date: Sun, 16 Jan 2022 20:49:20 +0000 Subject: [PATCH] Added new config option for being able to revive targets across dimensions. --- .../java/dev/micle/totemofreviving/config/Config.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/dev/micle/totemofreviving/config/Config.java b/src/main/java/dev/micle/totemofreviving/config/Config.java index 9348169..255d8db 100644 --- a/src/main/java/dev/micle/totemofreviving/config/Config.java +++ b/src/main/java/dev/micle/totemofreviving/config/Config.java @@ -33,7 +33,7 @@ public final class Config { Netherite Totem */ STRAW_TOTEM_CONFIG = new TotemConfig(builder, StrawTotemItem.getName(), - true, -1, 3, 1, false, 3); + true, -1, 3, 1, false, false, 3); SPEC = builder.build(); } @@ -47,11 +47,12 @@ public final class Config { private final ForgeConfigSpec.IntValue CHARGE_COST_LIMIT; private final ForgeConfigSpec.DoubleValue CHARGE_COST_MULTIPLIER; private final ForgeConfigSpec.BooleanValue CAN_REVIVE_MORE_EXPENSIVE_TARGETS; + private final ForgeConfigSpec.BooleanValue CAN_REVIVE_ACROSS_DIMENSIONS; private final ForgeConfigSpec.IntValue DURABILITY; TotemConfig(ForgeConfigSpec.Builder builder, String name, boolean isEnabled, int chargeCost, int chargeCostLimit, double chargeCostMultiplier, boolean canReviveMoreExpensiveTargets, - int durability) { + boolean canReviveAcrossDimensions, int durability) { builder.push(name); IS_ENABLED = builder .comment("Is the " + name + " enabled?") @@ -72,6 +73,9 @@ public final class Config { .comment("Is the totem able to revive targets that cost more than the totems max charge?\n" + "This only applies if the totem is fully charged. (dynamic wont work if limit is 0)") .define("canReviveMoreExpensiveTargets", canReviveMoreExpensiveTargets); + CAN_REVIVE_ACROSS_DIMENSIONS = builder + .comment("Is the totem able to revive targets across dimensions?") + .define("canReviveAcrossDimensions", canReviveAcrossDimensions); DURABILITY = builder .comment("The durability of the totem. 0 means unbreakable.") .defineInRange("durability", durability, 0, Integer.MAX_VALUE); @@ -83,6 +87,7 @@ public final class Config { public int getChargeCostLimit() { return CHARGE_COST_LIMIT.get(); } public double getChargeCostMultiplier() { return CHARGE_COST_MULTIPLIER.get(); } public boolean getCanReviveMoreExpensiveTargets() { return CAN_REVIVE_MORE_EXPENSIVE_TARGETS.get(); } + public boolean getCanReviveAcrossDimensions() { return CAN_REVIVE_ACROSS_DIMENSIONS.get(); } public int getDurability() { return DURABILITY.get(); } } }