mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 08:14:00 +02:00
fix recipe error
This commit is contained in:
parent
7612eac765
commit
d4e94872d8
1 changed files with 4 additions and 2 deletions
|
|
@ -81,7 +81,9 @@ class AnvilCustomRecipe(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun validate(): Boolean {
|
fun validate(): Boolean {
|
||||||
return !leftItem.isAir && !rightItem.isAir && !resultItem.isAir
|
return !leftItem.isAir &&
|
||||||
|
(rightItem == null || !resultItem.isAir) &&
|
||||||
|
!resultItem.isAir
|
||||||
}
|
}
|
||||||
|
|
||||||
fun saveToFile(writeFile: Boolean, doBackup: Boolean) {
|
fun saveToFile(writeFile: Boolean, doBackup: Boolean) {
|
||||||
|
|
@ -159,7 +161,7 @@ class AnvilCustomRecipe(
|
||||||
CustomAnvil.verboseLog("Testing $name $leftItem")
|
CustomAnvil.verboseLog("Testing $name $leftItem")
|
||||||
// We assume this function can be call only if leftItem != null
|
// We assume this function can be call only if leftItem != null
|
||||||
|
|
||||||
// Test is valid
|
// Test if valid
|
||||||
if (!validate()) return false
|
if (!validate()) return false
|
||||||
|
|
||||||
val leftSimilar = leftItem!!.isSimilar(item1)
|
val leftSimilar = leftItem!!.isSimilar(item1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue