diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index d727f89b..6e02ad10 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -25,6 +25,7 @@ Changes - Painted glow stone hardness increased to stop instant breaking - Increased mining level of Dark Steel Pick so it can mine TiC Cobalt and Ardite ore (can be disabled in the config) - Halved the skull drop chance when mobs killed by a 'fake player', such as killer joe (can be changed in the config) +- Added Soul Bound enchantment ID to the config Bugs - #1268 Capacitor bank not honoring input redstone settings diff --git a/src/main/java/crazypants/enderio/config/Config.java b/src/main/java/crazypants/enderio/config/Config.java index c3eea6de..53f71b8c 100644 --- a/src/main/java/crazypants/enderio/config/Config.java +++ b/src/main/java/crazypants/enderio/config/Config.java @@ -399,9 +399,11 @@ public final class Config { public static boolean clearGlassSameTexture = false; public static boolean clearGlassConnectToFusedQuartz = false; + public static int enchantmentSoulBoundId = -1; public static int enchantmentSoulBoundWeight = 1; public static boolean enchantmentSoulBoundEnabled = true; + public static void load(FMLPreInitializationEvent event) { FMLCommonHandler.instance().bus().register(new Config()); @@ -1086,6 +1088,8 @@ public final class Config { enchantmentSoulBoundEnabled = config.getBoolean("enchantmentSoulBoundEnabled", sectionEnchantments.name, enchantmentSoulBoundEnabled, "If false the soul bound enchantment will not be available"); + enchantmentSoulBoundId = config.get(sectionEnchantments.name, "enchantmentSoulBoundId", enchantmentSoulBoundId, + "The id of the enchantment. If set to -1 the lowest unassigned id will be used.").getInt(enchantmentSoulBoundId); enchantmentSoulBoundWeight = config.get("enchantmentSoulBoundWeight", sectionEnchantments.name, enchantmentSoulBoundWeight, "The chance of getting this enchantment in the enchantment table").getInt(enchantmentSoulBoundWeight); diff --git a/src/main/java/crazypants/enderio/enchantment/Enchantments.java b/src/main/java/crazypants/enderio/enchantment/Enchantments.java index aed6acf5..d8ec2841 100644 --- a/src/main/java/crazypants/enderio/enchantment/Enchantments.java +++ b/src/main/java/crazypants/enderio/enchantment/Enchantments.java @@ -20,7 +20,10 @@ public class Enchantments { private void registerEnchantments() { if(Config.enchantmentSoulBoundEnabled) { - int id = getEmptyEnchantId(); + int id = Config.enchantmentSoulBoundId; + if(id < 0) { + getEmptyEnchantId(); + } if(id < 0) { Log.error("Could not find an empty enchantment ID to add enchanments"); return;