mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Suppressed most fixable warning.
This commit is contained in:
parent
91994a6e78
commit
3ff6505adf
22 changed files with 97 additions and 24 deletions
|
|
@ -82,7 +82,7 @@ class EnchantConflictManager {
|
|||
// Read and add enchantment to conflict
|
||||
val enchantList = section.getStringList(ENCH_LIST_PATH)
|
||||
for (enchantName in enchantList) {
|
||||
val enchant = getEnchantByName(enchantName);
|
||||
val enchant = getEnchantByName(enchantName)
|
||||
if (enchant == null) {
|
||||
if (!futureUse) {
|
||||
CustomAnvil.instance.logger.warning("Enchantment $enchantName do not exist but was asked for conflict $conflictName")
|
||||
|
|
@ -110,7 +110,7 @@ class EnchantConflictManager {
|
|||
}
|
||||
|
||||
val enchantKey = NamespacedKey.minecraft(enchantName)
|
||||
return Enchantment.getByKey(enchantKey);
|
||||
return Enchantment.getByKey(enchantKey)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,20 +32,20 @@ class AnvilCustomRecipe(
|
|||
const val RESULT_ITEM_CONFIG = "result_item"
|
||||
|
||||
|
||||
val DEFAULT_EXACT_COUNT_CONFIG = true
|
||||
const val DEFAULT_EXACT_COUNT_CONFIG = true
|
||||
//val DEFAULT_EXACT_LEFT_CONFIG = true
|
||||
//val DEFAULT_EXACT_RIGHT_CONFIG = true
|
||||
|
||||
val DEFAULT_XP_COST_CONFIG = 1
|
||||
const val DEFAULT_XP_COST_CONFIG = 1
|
||||
|
||||
val DEFAULT_LEFT_ITEM_CONFIG: ItemStack? = null
|
||||
val DEFAULT_RIGHT_ITEM_CONFIG: ItemStack? = null
|
||||
val DEFAULT_RESULT_ITEM_CONFIG: ItemStack? = null;
|
||||
val DEFAULT_RESULT_ITEM_CONFIG: ItemStack? = null
|
||||
|
||||
val XP_COST_CONFIG_RANGE = 0..255
|
||||
|
||||
fun getFromConfig(name: String, configSection: ConfigurationSection?): AnvilCustomRecipe? {
|
||||
if(configSection == null) return null;
|
||||
if(configSection == null) return null
|
||||
return AnvilCustomRecipe(
|
||||
name,
|
||||
configSection.getBoolean(EXACT_COUNT_CONFIG, DEFAULT_EXACT_COUNT_CONFIG),
|
||||
|
|
@ -89,7 +89,7 @@ class AnvilCustomRecipe(
|
|||
|
||||
|
||||
if (GuiSharedConstant.TEMPORARY_DO_SAVE_TO_DISK_EVERY_CHANGE) {
|
||||
ConfigHolder.CUSTOM_RECIPE_HOLDER.saveToDisk(GuiSharedConstant.TEMPORARY_DO_BACKUP_EVERY_SAVE);
|
||||
ConfigHolder.CUSTOM_RECIPE_HOLDER.saveToDisk(GuiSharedConstant.TEMPORARY_DO_BACKUP_EVERY_SAVE)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue