Added new config option for being able to revive targets across dimensions.

This commit is contained in:
2022-01-16 20:49:20 +00:00
parent aeef78f910
commit 6e9e46e516

View File

@ -33,7 +33,7 @@ public final class Config {
Netherite Totem Netherite Totem
*/ */
STRAW_TOTEM_CONFIG = new TotemConfig(builder, StrawTotemItem.getName(), STRAW_TOTEM_CONFIG = new TotemConfig(builder, StrawTotemItem.getName(),
true, -1, 3, 1, false, 3); true, -1, 3, 1, false, false, 3);
SPEC = builder.build(); SPEC = builder.build();
} }
@ -47,11 +47,12 @@ public final class Config {
private final ForgeConfigSpec.IntValue CHARGE_COST_LIMIT; private final ForgeConfigSpec.IntValue CHARGE_COST_LIMIT;
private final ForgeConfigSpec.DoubleValue CHARGE_COST_MULTIPLIER; private final ForgeConfigSpec.DoubleValue CHARGE_COST_MULTIPLIER;
private final ForgeConfigSpec.BooleanValue CAN_REVIVE_MORE_EXPENSIVE_TARGETS; private final ForgeConfigSpec.BooleanValue CAN_REVIVE_MORE_EXPENSIVE_TARGETS;
private final ForgeConfigSpec.BooleanValue CAN_REVIVE_ACROSS_DIMENSIONS;
private final ForgeConfigSpec.IntValue DURABILITY; private final ForgeConfigSpec.IntValue DURABILITY;
TotemConfig(ForgeConfigSpec.Builder builder, String name, boolean isEnabled, int chargeCost, TotemConfig(ForgeConfigSpec.Builder builder, String name, boolean isEnabled, int chargeCost,
int chargeCostLimit, double chargeCostMultiplier, boolean canReviveMoreExpensiveTargets, int chargeCostLimit, double chargeCostMultiplier, boolean canReviveMoreExpensiveTargets,
int durability) { boolean canReviveAcrossDimensions, int durability) {
builder.push(name); builder.push(name);
IS_ENABLED = builder IS_ENABLED = builder
.comment("Is the " + name + " enabled?") .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" + .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)") "This only applies if the totem is fully charged. (dynamic wont work if limit is 0)")
.define("canReviveMoreExpensiveTargets", canReviveMoreExpensiveTargets); .define("canReviveMoreExpensiveTargets", canReviveMoreExpensiveTargets);
CAN_REVIVE_ACROSS_DIMENSIONS = builder
.comment("Is the totem able to revive targets across dimensions?")
.define("canReviveAcrossDimensions", canReviveAcrossDimensions);
DURABILITY = builder DURABILITY = builder
.comment("The durability of the totem. 0 means unbreakable.") .comment("The durability of the totem. 0 means unbreakable.")
.defineInRange("durability", durability, 0, Integer.MAX_VALUE); .defineInRange("durability", durability, 0, Integer.MAX_VALUE);
@ -83,6 +87,7 @@ public final class Config {
public int getChargeCostLimit() { return CHARGE_COST_LIMIT.get(); } public int getChargeCostLimit() { return CHARGE_COST_LIMIT.get(); }
public double getChargeCostMultiplier() { return CHARGE_COST_MULTIPLIER.get(); } public double getChargeCostMultiplier() { return CHARGE_COST_MULTIPLIER.get(); }
public boolean getCanReviveMoreExpensiveTargets() { return CAN_REVIVE_MORE_EXPENSIVE_TARGETS.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(); } public int getDurability() { return DURABILITY.get(); }
} }
} }