Ayfri
11/02/2023, 10:44 PM@Serializable(RecipeType.Companion.RecipeTypeSerializer::class)
fun interface RecipeType {
override fun toString(): String
companion object {
data object RecipeTypeSerializer : ToStringSerializer<RecipeType>() // serializer just using the `.toString()` method, deserialization isn't available
}
}
object RecipeTypes {
val BLASTING = RecipeType { "blasting" }
val CAMPFIRE_COOKING = RecipeType { "campfire_cooking" }
val CRAFTING_SHAPED = RecipeType { "crafting_shaped" }
...
}
The errors I get :
Interface '@Serializable(...) fun interface RecipeType : Any' does not have constructors.
On each line of RecipeType { ... }
Is this issue known, and is there any YouTrack issue about that ?dmitriy.novozhilov
11/03/2023, 5:32 AMsandwwraith
11/06/2023, 4:51 PMAyfri
11/06/2023, 9:00 PM