Record Class GeyserSmithingRecipe
java.lang.Object
java.lang.Record
org.geysermc.geyser.inventory.recipe.GeyserSmithingRecipe
- All Implemented Interfaces:
GeyserRecipe
public record GeyserSmithingRecipe(int id, int netId, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay template, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay base, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay addition, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay result)
extends Record
implements GeyserRecipe
-
Constructor Summary
ConstructorsConstructorDescriptionGeyserSmithingRecipe(int id, int netId, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay template, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay base, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay addition, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay result) Creates an instance of aGeyserSmithingReciperecord class.GeyserSmithingRecipe(int id, int netId, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.SmithingRecipeDisplay display) -
Method Summary
Modifier and TypeMethodDescriptionorg.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplayaddition()Returns the value of theadditionrecord component.List<org.cloudburstmc.protocol.bedrock.data.inventory.crafting.recipe.RecipeData>asRecipeData(GeyserSession session) org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplaybase()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.booleanisShaped()Whether the recipe is flexible or not in which items can be placed where.intnetId()Returns the value of thenetIdrecord component.org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplayresult()Returns the value of theresultrecord component.org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplaytemplate()Returns the value of thetemplaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GeyserSmithingRecipe
public GeyserSmithingRecipe(int id, int netId, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.SmithingRecipeDisplay display) -
GeyserSmithingRecipe
public GeyserSmithingRecipe(int id, int netId, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay template, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay base, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay addition, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay result) Creates an instance of aGeyserSmithingReciperecord class.- Parameters:
id- the value for theidrecord componentnetId- the value for thenetIdrecord componenttemplate- the value for thetemplaterecord componentbase- the value for thebaserecord componentaddition- the value for theadditionrecord componentresult- the value for theresultrecord component
-
-
Method Details
-
isShaped
public boolean isShaped()Description copied from interface:GeyserRecipeWhether the recipe is flexible or not in which items can be placed where.- Specified by:
isShapedin interfaceGeyserRecipe
-
asRecipeData
public List<org.cloudburstmc.protocol.bedrock.data.inventory.crafting.recipe.RecipeData> asRecipeData(GeyserSession session) - Specified by:
asRecipeDatain interfaceGeyserRecipe
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
netId
public int netId()Returns the value of thenetIdrecord component.- Returns:
- the value of the
netIdrecord component
-
template
public org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay template()Returns the value of thetemplaterecord component.- Returns:
- the value of the
templaterecord component
-
base
public org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay base()Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
addition
public org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay addition()Returns the value of theadditionrecord component.- Returns:
- the value of the
additionrecord component
-
result
public org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay result()Returns the value of theresultrecord component.- Specified by:
resultin interfaceGeyserRecipe- Returns:
- the value of the
resultrecord component
-