Record Class GeyserShapelessRecipe
java.lang.Object
java.lang.Record
org.geysermc.geyser.inventory.recipe.GeyserShapelessRecipe
- All Implemented Interfaces:
GeyserRecipe
public record GeyserShapelessRecipe(int id, int netId, List<org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay> ingredients, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay result)
extends Record
implements GeyserRecipe
-
Constructor Summary
ConstructorsConstructorDescriptionGeyserShapelessRecipe(int id, int netId, List<org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay> ingredients, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay result) Creates an instance of aGeyserShapelessReciperecord class.GeyserShapelessRecipe(int id, int netId, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.ShapelessCraftingRecipeDisplay data) -
Method Summary
Modifier and TypeMethodDescriptionList<org.cloudburstmc.protocol.bedrock.data.inventory.crafting.recipe.RecipeData> asRecipeData(GeyserSession session) 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.List<org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay> Returns the value of theingredientsrecord 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.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GeyserShapelessRecipe
public GeyserShapelessRecipe(int id, int netId, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.ShapelessCraftingRecipeDisplay data) -
GeyserShapelessRecipe
public GeyserShapelessRecipe(int id, int netId, List<org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay> ingredients, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay result) Creates an instance of aGeyserShapelessReciperecord class.- Parameters:
id- the value for theidrecord componentnetId- the value for thenetIdrecord componentingredients- the value for theingredientsrecord 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
-
ingredients
public List<org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay> ingredients()Returns the value of theingredientsrecord component.- Returns:
- the value of the
ingredientsrecord 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
-