Search in sources :

Example 1 with EnumEnchantmentType

use of net.minecraft.enchantment.EnumEnchantmentType in project BetterStorage by copygirl.

the class EnchantmentBetterStorage method initialize.

public static void initialize() {
    Map<String, EnumEnchantmentType> types = BetterStorageEnchantment.enchantmentTypes;
    Map<String, Enchantment> enchs = BetterStorageEnchantment.enchantments;
    // Add key enchantments
    if (BetterStorageItems.key != null) {
        EnumEnchantmentType key = EnumHelper.addEnchantmentType("key");
        EnchantmentBetterStorage unlocking = conditialNew("unlocking", key, GlobalConfig.enchUnlockingId, 8, 5, 5, 10, 30, 0);
        EnchantmentBetterStorage lockpicking = conditialNew("lockpicking", key, GlobalConfig.enchLockpickingId, 6, 5, 5, 8, 30, 0);
        EnchantmentBetterStorage morphing = conditialNew("morphing", key, GlobalConfig.enchMorphingId, 1, 5, 10, 12, 30, 0);
        if (lockpicking != null)
            lockpicking.setIncompatible(morphing);
        if (morphing != null)
            morphing.setIncompatible(lockpicking);
        types.put("key", key);
        enchs.put("unlocking", unlocking);
        enchs.put("lockpicking", lockpicking);
        enchs.put("morphing", morphing);
    }
    // Add lock enchantments
    if (BetterStorageItems.lock != null) {
        EnumEnchantmentType lock = EnumHelper.addEnchantmentType("lock");
        EnchantmentBetterStorage persistance = conditialNew("persistance", lock, GlobalConfig.enchPersistanceId, 20, 5, 1, 8, 30, 0);
        EnchantmentBetterStorage security = conditialNew("security", lock, GlobalConfig.enchSecurityId, 16, 5, 1, 10, 30, 0);
        EnchantmentBetterStorage shock = conditialNew("shock", lock, GlobalConfig.enchShockId, 5, 3, 5, 15, 30, 0);
        EnchantmentBetterStorage trigger = conditialNew("trigger", lock, GlobalConfig.enchTriggerId, 10, 1, 15, 0, 30, 0);
        types.put("lock", lock);
        enchs.put("persistance", persistance);
        enchs.put("security", security);
        enchs.put("shock", shock);
        enchs.put("trigger", trigger);
    }
}
Also used : Enchantment(net.minecraft.enchantment.Enchantment) BetterStorageEnchantment(net.mcft.copy.betterstorage.api.BetterStorageEnchantment) EnumEnchantmentType(net.minecraft.enchantment.EnumEnchantmentType)

Aggregations

BetterStorageEnchantment (net.mcft.copy.betterstorage.api.BetterStorageEnchantment)1 Enchantment (net.minecraft.enchantment.Enchantment)1 EnumEnchantmentType (net.minecraft.enchantment.EnumEnchantmentType)1