Record Class WoodcutterRecipeView
java.lang.Object
java.lang.Record
net.zebatek.simple_woodcutter.recipe.WoodcutterRecipeView
public record WoodcutterRecipeView(net.minecraft.world.item.crafting.Ingredient ingredient, net.minecraft.world.item.ItemStack result)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, WoodcutterRecipeView> -
Constructor Summary
ConstructorsConstructorDescriptionWoodcutterRecipeView(net.minecraft.world.item.crafting.Ingredient ingredient, net.minecraft.world.item.ItemStack result) Creates an instance of aWoodcutterRecipeViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static WoodcutterRecipeViewfrom(WoodcutterRecipe recipe) final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.crafting.IngredientReturns the value of theingredientrecord component.net.minecraft.world.item.ItemStackresult()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, WoodcutterRecipeView> STREAM_CODEC
-
-
Constructor Details
-
WoodcutterRecipeView
public WoodcutterRecipeView(net.minecraft.world.item.crafting.Ingredient ingredient, net.minecraft.world.item.ItemStack result) Creates an instance of aWoodcutterRecipeViewrecord class.- Parameters:
ingredient- the value for theingredientrecord componentresult- the value for theresultrecord component
-
-
Method Details
-
from
-
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). -
ingredient
public net.minecraft.world.item.crafting.Ingredient ingredient()Returns the value of theingredientrecord component.- Returns:
- the value of the
ingredientrecord component
-
result
public net.minecraft.world.item.ItemStack result()Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-