recipe registry: don't require id

This makes it more fault tolerant, because mappings for 1.12.2 recipes don't even exist yet
This commit is contained in:
Moritz Zwerger 2023-10-06 13:38:24 +02:00
parent 44bac3d3a7
commit 81d58dab73
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -37,7 +37,7 @@ class RecipeRegistry(
override fun get(any: Any?): Recipe? {
return when (any) {
null -> null
is Number -> get(any.toInt())
is Number -> getOrNull(any.toInt())
is ResourceLocation -> resourceLocationRecipeMap[any]
is String -> get(any.toResourceLocation())
is Identified -> get(any.identifier)