Serializer¶
Properties¶
identifier¶
open override val identifier: ResourceLocation
The id this serializer is registered under; used to identify it in recipe JSON.
packetCodec¶
open override val packetCodec: StreamCodec<RegistryFriendlyByteBuf, AComponentsIngredient>
The codec used to sync the ingredient to the client over the network.
Functions¶
getCodec¶
open override fun getCodec(allowEmpty: Boolean): MapCodec<AComponentsIngredient>
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.