Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 6.10 KB | None | 0 0
  1. package com.theishiopian.parrying.Config;
  2.  
  3. import net.minecraftforge.common.ForgeConfigSpec;
  4.  
  5. public class Config
  6. {
  7.     public static final ForgeConfigSpec COMMON;
  8.  
  9.     //weapon
  10.     public static final ForgeConfigSpec.BooleanValue maceEnabled;
  11.     public static final ForgeConfigSpec.BooleanValue hammerEnabled;
  12.     public static final ForgeConfigSpec.BooleanValue flailEnabled;
  13.  
  14.     //parrying
  15.     public static final ForgeConfigSpec.BooleanValue parryEnabled;
  16.     public static final ForgeConfigSpec.DoubleValue parryAngle;
  17.  
  18.     //bashing
  19.     public static final ForgeConfigSpec.BooleanValue bashEnabled;
  20.     public static final ForgeConfigSpec.DoubleValue bashAngle;
  21.     public static final ForgeConfigSpec.IntValue bashBaseCooldown;
  22.     public static final ForgeConfigSpec.IntValue bashMissCooldown;
  23.     public static final ForgeConfigSpec.IntValue bashTargets;
  24.  
  25.     //backstab
  26.     public static final ForgeConfigSpec.BooleanValue backStabEnabled;
  27.     public static final ForgeConfigSpec.DoubleValue backStabAngle;
  28.     public static final ForgeConfigSpec.DoubleValue backStabDamageMultiplier;
  29.     public static final ForgeConfigSpec.IntValue backStabMaxHealth;
  30.  
  31.     //dodge
  32.     public static final ForgeConfigSpec.BooleanValue dodgeEnabled;
  33.     public static final ForgeConfigSpec.DoubleValue dodgePower;
  34.     public static final ForgeConfigSpec.DoubleValue dodgeCooldown;
  35.  
  36.     //enchants
  37.     public static final ForgeConfigSpec.BooleanValue deflectionEnchantEnabled;
  38.     public static final ForgeConfigSpec.BooleanValue riposteEnchantEnabled;
  39.     public static final ForgeConfigSpec.BooleanValue fragileCurseEnabled;
  40.     public static final ForgeConfigSpec.BooleanValue phasingCurseEnabled;
  41.     public static final ForgeConfigSpec.BooleanValue isFragileTreasure;
  42.     public static final ForgeConfigSpec.BooleanValue isPhasingTreasure;
  43.     public static final ForgeConfigSpec.BooleanValue bashingEnchantEnabled;
  44.  
  45.     static
  46.     {
  47.         final ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
  48.  
  49.         builder.push("common");
  50.  
  51.         //WEAPONS
  52.         maceEnabled = builder.comment("Whether or not the mace is enabled.").define("mace_enabled", true);
  53.         hammerEnabled = builder.comment("Whether or not the hammer is enabled.").define("hammer_enabled", true);
  54.         flailEnabled = builder.comment("Whether or not the flail is enabled.").define("flail_enabled", true);
  55.  
  56.         //PARRY
  57.         parryEnabled = builder.comment("Whether parrying is enabled or not.").define("parry_enabled", true);
  58.  
  59.         parryAngle = builder.comment("The maximum angle that you can be aiming relative to the attacker. " +
  60.                 "-1 represents pointing exactly away from the attacker, and 1 represents pointing exactly towards the attacker")
  61.                 .defineInRange("parry_angle", 0.95, -1,1);
  62.  
  63.         //BASH
  64.  
  65.         bashEnabled = builder.comment("Whether shield bashing is enabled or not.").define("bash_enabled", true);
  66.  
  67.         bashAngle = builder.comment("The maximum angle that you can be aiming relative to the target. " +
  68.                 "-1 represents pointing exactly away from the attacker, and 1 represents pointing exactly towards the attacker")
  69.                 .defineInRange("bash_angle", 0.85, -1,1);
  70.  
  71.         bashBaseCooldown = builder.comment("The base cooldown, in ticks, for a successful shield bash. Each " +
  72.                 "target adds one second to the cooldown. There are 20 ticks in a second.")
  73.                 .defineInRange("bash_base_cooldown", 80, 0, Integer.MAX_VALUE);
  74.  
  75.         bashMissCooldown = builder.comment("The cooldown, in ticks, for missing a shield bash. There are 20 ticks in a second.")
  76.                 .defineInRange("bash_miss_cooldown", 20, 0, Integer.MAX_VALUE);
  77.  
  78.         bashTargets = builder.comment("The number of targets a shield bash can hit. Each level of Bashing adds 1 to this number")
  79.                 .defineInRange("bash_targets", 3, 1, Integer.MAX_VALUE);
  80.  
  81.         //BACKSTAB
  82.  
  83.         backStabEnabled = builder.comment("Whether backstabbing is enabled or not").define("backstab_enabled", true);
  84.  
  85.         backStabAngle = builder.comment("The maximum angle that you can be aiming relative to the target. " +
  86.                 "-1 represents pointing exactly away from the target, and 1 represents pointing exactly towards the target")
  87.                 .defineInRange("backstab_angle", 0.85, -1,1);
  88.  
  89.         backStabDamageMultiplier = builder.comment("The amount to multiply incoming damage by with a successful backstab.")
  90.                 .defineInRange("backstab_multiplier", 3, 1d, 99999d);
  91.  
  92.         backStabMaxHealth = builder.comment("Any entity with health greater than this is immune to backstab")
  93.                 .defineInRange("backstab_max_health", 20, 1, 99999);
  94.  
  95.         //DODGE
  96.         dodgeEnabled = builder.comment("Whether dodging is enabled or not.").define("dodge_enabled", true);
  97.  
  98.         dodgePower = builder.comment("How much power does the dodge have?").defineInRange("dodge_power", 0.5, 0, 99999);
  99.  
  100.         dodgeCooldown = builder.comment("The time in seconds before you can dodge again").defineInRange("dodge_cooldown", 1.5, 0, 99999d);
  101.  
  102.         //ENCHANT
  103.         deflectionEnchantEnabled = builder.comment("Whether or not the deflection enchantment is enabled").define("deflection_enabled", true);
  104.         riposteEnchantEnabled = builder.comment("Whether or not the riposte enchantment is enabled").define("riposte_enabled", true);
  105.         bashingEnchantEnabled = builder.comment("Whether or not the bashing enchantment is enabled").define("bashing_enabled", true);
  106.         fragileCurseEnabled = builder.comment("Whether or not the fragile curse is enabled").define("fragile_enabled", true);
  107.         phasingCurseEnabled = builder.comment("Whether or not the phasing curse is enabled").define("phasing_enabled", true);
  108.         isFragileTreasure = builder.comment("Whether or not the fragile curse is treasure only").define("is_fragile_treasure", true);
  109.         isPhasingTreasure = builder.comment("Whether or not the phasing curse is treasure only").define("is_phasing_treasure", true);
  110.  
  111.         COMMON = builder.build();
  112.     }
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement