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, String tag) extends Record implements GeyserRecipe
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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, String tag)
    Creates an instance of a GeyserShapelessRecipe record class.
    GeyserShapelessRecipe(int id, int netId, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.FurnaceRecipeDisplay data, int category)
     
    GeyserShapelessRecipe(int id, int netId, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.ShapelessCraftingRecipeDisplay data)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.cloudburstmc.protocol.bedrock.data.inventory.crafting.recipe.RecipeData>
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    id()
    Returns the value of the id record component.
    List<org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay>
    Returns the value of the ingredients record component.
    boolean
    Whether the recipe is flexible or not in which items can be placed where.
    int
    Returns the value of the netId record component.
    org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay
    Returns the value of the result record component.
    tag()
    Returns the value of the tag record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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, org.geysermc.mcprotocollib.protocol.data.game.recipe.display.FurnaceRecipeDisplay data, int category)
    • 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, String tag)
      Creates an instance of a GeyserShapelessRecipe record class.
      Parameters:
      id - the value for the id record component
      netId - the value for the netId record component
      ingredients - the value for the ingredients record component
      result - the value for the result record component
      tag - the value for the tag record component
  • Method Details

    • isShaped

      public boolean isShaped()
      Description copied from interface: GeyserRecipe
      Whether the recipe is flexible or not in which items can be placed where.
      Specified by:
      isShaped in interface GeyserRecipe
    • asRecipeData

      public List<org.cloudburstmc.protocol.bedrock.data.inventory.crafting.recipe.RecipeData> asRecipeData(GeyserSession session)
      Specified by:
      asRecipeData in interface GeyserRecipe
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public int id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • netId

      public int netId()
      Returns the value of the netId record component.
      Returns:
      the value of the netId record component
    • ingredients

      public List<org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay> ingredients()
      Returns the value of the ingredients record component.
      Returns:
      the value of the ingredients record component
    • result

      public org.geysermc.mcprotocollib.protocol.data.game.recipe.display.slot.SlotDisplay result()
      Returns the value of the result record component.
      Specified by:
      result in interface GeyserRecipe
      Returns:
      the value of the result record component
    • tag

      public String tag()
      Returns the value of the tag record component.
      Returns:
      the value of the tag record component