Record Class IRecyclingRecipe.Serializer<R extends IRecyclingRecipe>
java.lang.Object
java.lang.Record
com.petrolpark.core.recipe.recycling.IRecyclingRecipe.Serializer<R>
- All Implemented Interfaces:
net.minecraft.world.item.crafting.RecipeSerializer<R>
- Enclosing interface:
IRecyclingRecipe
public static record IRecyclingRecipe.Serializer<R extends IRecyclingRecipe>(com.mojang.serialization.MapCodec<R extends IRecyclingRecipe> codec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,R extends IRecyclingRecipe> streamCodec)
extends Record
implements net.minecraft.world.item.crafting.RecipeSerializer<R>
-
Field Summary
Fields inherited from interface net.minecraft.world.item.crafting.RecipeSerializer
ARMOR_DYE, BANNER_DUPLICATE, BLASTING_RECIPE, BOOK_CLONING, CAMPFIRE_COOKING_RECIPE, DECORATED_POT_RECIPE, FIREWORK_ROCKET, FIREWORK_STAR, FIREWORK_STAR_FADE, MAP_CLONING, MAP_EXTENDING, REPAIR_ITEM, SHAPED_RECIPE, SHAPELESS_RECIPE, SHIELD_DECORATION, SHULKER_BOX_COLORING, SMELTING_RECIPE, SMITHING_TRANSFORM, SMITHING_TRIM, SMOKING_RECIPE, STONECUTTER, SUSPICIOUS_STEW, TIPPED_ARROW -
Constructor Summary
ConstructorsConstructorDescriptionSerializer(com.mojang.serialization.MapCodec<R> codec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, R> streamCodec) Creates an instance of aSerializerrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<R> 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.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, R> Returns the value of thestreamCodecrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Serializer
public Serializer(com.mojang.serialization.MapCodec<R> codec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, R> streamCodec) Creates an instance of aSerializerrecord class.- Parameters:
codec- the value for thecodecrecord componentstreamCodec- the value for thestreamCodecrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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.- Specified by:
codecin interfacenet.minecraft.world.item.crafting.RecipeSerializer<R extends IRecyclingRecipe>- Returns:
- the value of the
codecrecord component
-
streamCodec
public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,R> streamCodec()Returns the value of thestreamCodecrecord component.- Specified by:
streamCodecin interfacenet.minecraft.world.item.crafting.RecipeSerializer<R extends IRecyclingRecipe>- Returns:
- the value of the
streamCodecrecord component
-