Package com.petrolpark.core.recipe.book
Record Class RecipeReferenceDataComponent
java.lang.Object
java.lang.Record
com.petrolpark.core.recipe.book.RecipeReferenceDataComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RecipeReferenceDataComponent> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, RecipeReferenceDataComponent> -
Constructor Summary
ConstructorsConstructorDescriptionRecipeReferenceDataComponent(net.minecraft.resources.ResourceLocation recipeId, Optional<net.minecraft.resources.ResourceLocation> jeiRecipeTypeId) Creates an instance of aRecipeReferenceDataComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Optional<net.minecraft.world.item.crafting.RecipeHolder<?>> getRecipeHolder(net.minecraft.world.item.crafting.RecipeManager recipeManager) net.minecraft.network.chat.ComponentgetRecipeName(net.minecraft.world.item.crafting.RecipeManager recipeManager) final inthashCode()Returns a hash code value for this object.Optional<net.minecraft.resources.ResourceLocation> Returns the value of thejeiRecipeTypeIdrecord component.net.minecraft.resources.ResourceLocationrecipeId()Returns the value of therecipeIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,RecipeReferenceDataComponent> STREAM_CODEC
-
-
Constructor Details
-
RecipeReferenceDataComponent
public RecipeReferenceDataComponent(net.minecraft.resources.ResourceLocation recipeId, Optional<net.minecraft.resources.ResourceLocation> jeiRecipeTypeId) Creates an instance of aRecipeReferenceDataComponentrecord class.- Parameters:
recipeId- the value for therecipeIdrecord componentjeiRecipeTypeId- the value for thejeiRecipeTypeIdrecord component
-
-
Method Details
-
getRecipeHolder
public Optional<net.minecraft.world.item.crafting.RecipeHolder<?>> getRecipeHolder(net.minecraft.world.item.crafting.RecipeManager recipeManager) -
getRecipeName
public net.minecraft.network.chat.Component getRecipeName(net.minecraft.world.item.crafting.RecipeManager recipeManager) -
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). -
recipeId
public net.minecraft.resources.ResourceLocation recipeId()Returns the value of therecipeIdrecord component.- Returns:
- the value of the
recipeIdrecord component
-
jeiRecipeTypeId
Returns the value of thejeiRecipeTypeIdrecord component.- Returns:
- the value of the
jeiRecipeTypeIdrecord component
-