Added Soul Bound enchantment ID to the config

This commit is contained in:
CrazyPants committed 2014-12-12 13:26:32 +08:00
1 parent 6f459cda53
commit 9c72b9ec5a
3 files changed
+9 -1

No files matched your search

+1
View File
@@ -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
@@ -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);
@@ -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;