Fixed talismans give bug
This commit is contained in:
@@ -31,7 +31,7 @@ class Talisman(
|
|||||||
|
|
||||||
val description = config.getFormattedStrings("description").map { Display.PREFIX + it }
|
val description = config.getFormattedStrings("description").map { Display.PREFIX + it }
|
||||||
|
|
||||||
val itemStack: ItemStack = run {
|
private val _itemStack: ItemStack = run {
|
||||||
val item = Items.lookup(config.getString("item"))
|
val item = Items.lookup(config.getString("item"))
|
||||||
Validate.isTrue(item !is EmptyTestableItem, "Item specified in " + key.key + " is invalid!")
|
Validate.isTrue(item !is EmptyTestableItem, "Item specified in " + key.key + " is invalid!")
|
||||||
TalismanUtils.registerTalismanMaterial(item.item.type)
|
TalismanUtils.registerTalismanMaterial(item.item.type)
|
||||||
@@ -44,6 +44,9 @@ class Talisman(
|
|||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val itemStack: ItemStack
|
||||||
|
get() = _itemStack.clone()
|
||||||
|
|
||||||
val craftable = config.getBool("craftable")
|
val craftable = config.getBool("craftable")
|
||||||
|
|
||||||
val recipe: CraftingRecipe? = run {
|
val recipe: CraftingRecipe? = run {
|
||||||
|
|||||||
Reference in New Issue
Block a user