Record Class RecipeSerializer<T extends Recipe<?>>
java.lang.Object
java.lang.Record
net.minecraft.world.item.crafting.RecipeSerializer<T>
public record RecipeSerializer<T extends Recipe<?>>(com.mojang.serialization.MapCodec<T extends Recipe<?>> codec, StreamCodec<RegistryFriendlyByteBuf, T extends Recipe<?>> streamCodec)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.serialization.MapCodec<T> The field for thecodecrecord component.private final StreamCodec<RegistryFriendlyByteBuf, T> Deprecated. -
Constructor Summary
ConstructorsConstructorDescriptionRecipeSerializer(com.mojang.serialization.MapCodec<T> codec, StreamCodec<RegistryFriendlyByteBuf, T> streamCodec) Creates an instance of aRecipeSerializerrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<T> codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Deprecated.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
codec
-
streamCodec
Deprecated.The field for thestreamCodecrecord component.
-
-
Constructor Details
-
RecipeSerializer
public RecipeSerializer(com.mojang.serialization.MapCodec<T> codec, @Deprecated StreamCodec<RegistryFriendlyByteBuf, T> streamCodec) Creates an instance of aRecipeSerializerrecord class.- Parameters:
codec- the value for thecodecrecord componentstreamCodec- the value for thestreamCodecrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
codec
Returns the value of thecodecrecord component.- Returns:
- the value of the
codecrecord component
-
streamCodec
Deprecated.Returns the value of thestreamCodecrecord component.- Returns:
- the value of the
streamCodecrecord component
-