Record Class RecipeDisplay.Furnace
java.lang.Object
java.lang.Record
net.minestom.server.recipe.display.RecipeDisplay.Furnace
- All Implemented Interfaces:
ComponentHolder<RecipeDisplay>, RecipeDisplay
- Enclosing interface:
RecipeDisplay
public static record RecipeDisplay.Furnace(SlotDisplay ingredient, SlotDisplay fuel, SlotDisplay result, SlotDisplay craftingStation, int duration, float experience)
extends Record
implements RecipeDisplay
-
Nested Class Summary
Nested classes/interfaces inherited from interface RecipeDisplay
RecipeDisplay.CraftingShaped, RecipeDisplay.CraftingShapeless, RecipeDisplay.Furnace, RecipeDisplay.Smithing, RecipeDisplay.Stonecutter -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFurnace(SlotDisplay ingredient, SlotDisplay fuel, SlotDisplay result, SlotDisplay craftingStation, int duration, float experience) Creates an instance of aFurnacerecord class. -
Method Summary
Modifier and TypeMethodDescriptionGets the components held by this object.copyWithOperator(UnaryOperator<Component> operator) Returns a copy of this object.Returns the value of thecraftingStationrecord component.intduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of theexperiencerecord component.fuel()Returns the value of thefuelrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theingredientrecord component.result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface ComponentHolder
visitComponents
-
Field Details
-
NETWORK_TYPE
-
-
Constructor Details
-
Furnace
public Furnace(SlotDisplay ingredient, SlotDisplay fuel, SlotDisplay result, SlotDisplay craftingStation, int duration, float experience) Creates an instance of aFurnacerecord class.- Parameters:
ingredient- the value for theingredientrecord componentfuel- the value for thefuelrecord componentresult- the value for theresultrecord componentcraftingStation- the value for thecraftingStationrecord componentduration- the value for thedurationrecord componentexperience- the value for theexperiencerecord component
-
-
Method Details
-
components
Description copied from interface:ComponentHolderGets the components held by this object.- Specified by:
componentsin interfaceComponentHolder<RecipeDisplay>- Returns:
- the components
-
copyWithOperator
Description copied from interface:ComponentHolderReturns a copy of this object. For each component this object holds, the operator is applied to the copy before returning.- Specified by:
copyWithOperatorin interfaceComponentHolder<RecipeDisplay>- Parameters:
operator- the operator- Returns:
- the copy
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
ingredient
Returns the value of theingredientrecord component.- Returns:
- the value of the
ingredientrecord component
-
fuel
Returns the value of thefuelrecord component.- Returns:
- the value of the
fuelrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
craftingStation
Returns the value of thecraftingStationrecord component.- Returns:
- the value of the
craftingStationrecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
experience
public float experience()Returns the value of theexperiencerecord component.- Returns:
- the value of the
experiencerecord component
-