Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.jahus.neverpenaltyanvil;
- import net.minecraftforge.common.ForgeConfigSpec;
- import net.minecraftforge.eventbus.api.SubscribeEvent;
- import net.minecraftforge.fml.event.config.ModConfigEvent;
- public class ModConfigHandler {
- public static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
- public static final ForgeConfigSpec.BooleanValue enabled = BUILDER
- .comment("Enable or disable the anvil modification")
- .define("enabled", true);
- public static final ForgeConfigSpec.BooleanValue useVanillaPenalty = BUILDER
- .comment("Use vanilla formula (true) or linear formula ax + b (false)")
- .define("useVanillaPenalty", true);
- public static final ForgeConfigSpec.IntValue linearA = BUILDER
- .comment("Coefficient a for linear formula (used if useVanillaPenalty = false)")
- .defineInRange("linearA", 2, 0, 100);
- public static final ForgeConfigSpec.IntValue linearB = BUILDER
- .comment("Constant b for linear formula (used if useVanillaPenalty = false)")
- .defineInRange("linearB", 1, 0, 100);
- public static final ForgeConfigSpec.IntValue maxCost = BUILDER
- .comment("Maximum XP cost shown in anvil (set -1 for no cap)")
- .defineInRange("maxCost", -1, -1, 1000);
- public static final ForgeConfigSpec.IntValue maxPenalty = BUILDER
- .comment("Maximum penalty stored in NBT (set -1 for no cap)")
- .defineInRange("maxPenalty", -1, -1, 1000);
- public static final ForgeConfigSpec.IntValue renameCost = BUILDER
- .comment("XP cost when renaming only (with no second item)")
- .defineInRange("renameCost", 1, 0, 39);
- public static final ForgeConfigSpec SPEC = BUILDER.build();
- @SubscribeEvent
- public static void onLoad(ModConfigEvent event) {
- // Reserved
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement