IACustomIngredientSerializer¶
interface IACustomIngredientSerializer<T : IACustomIngredient>
Serializer for an IACustomIngredient of type T.
All instances must be registered using register for deserialization to work.
Inheritors¶
Types¶
Companion¶
object Companion
Properties¶
identifier¶
abstract val identifier: ResourceLocation
The id this serializer is registered under; used to identify it in recipe JSON.
packetCodec¶
abstract val packetCodec: StreamCodec<RegistryFriendlyByteBuf, T>
The codec used to sync the ingredient to the client over the network.
Functions¶
getCodec¶
The codec used to read the ingredient from recipe JSON files.
Parameters
- allowEmpty: Whether an ingredient matching no items should be accepted, mirroring Ingredient.CODEC vs
Ingredient.CODEC_NONEMPTY.