mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 01:48:04 -04:00
recipes: allow 0 as valid id
This commit is contained in:
parent
5e5463f6bb
commit
25eeb77a05
@ -54,7 +54,7 @@ class RecipeRegistry(
|
||||
|
||||
override fun getId(value: Recipe): Int {
|
||||
val id = valueIdMap.getInt(value)
|
||||
if (id > 0) return id
|
||||
if (id >= 0) return id
|
||||
return parent?.getId(value) ?: throw IllegalArgumentException("No id available for $value")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user