Record Class RecipeViewerData

java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.recipe.viewer.server.RecipeViewerData

public record RecipeViewerData(List<net.minecraft.resources.ResourceLocation> removedCategories, List<net.minecraft.resources.ResourceLocation> removedGlobalRecipes, List<CategoryData> categoryData, ItemData itemData, FluidData fluidData) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,RecipeViewerData>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RecipeViewerData(List<net.minecraft.resources.ResourceLocation> removedCategories, List<net.minecraft.resources.ResourceLocation> removedGlobalRecipes, List<CategoryData> categoryData, ItemData itemData, FluidData fluidData)
    Creates an instance of a RecipeViewerData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the categoryData record component.
    static @Nullable RecipeViewerData
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the fluidData record component.
    final int
    Returns a hash code value for this object.
    boolean
     
    Returns the value of the itemData record component.
    List<net.minecraft.resources.ResourceLocation>
    Returns the value of the removedCategories record component.
    List<net.minecraft.resources.ResourceLocation>
    Returns the value of the removedGlobalRecipes 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
  • Field Details

    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,RecipeViewerData> STREAM_CODEC
  • Constructor Details

    • RecipeViewerData

      public RecipeViewerData(List<net.minecraft.resources.ResourceLocation> removedCategories, List<net.minecraft.resources.ResourceLocation> removedGlobalRecipes, List<CategoryData> categoryData, ItemData itemData, FluidData fluidData)
      Creates an instance of a RecipeViewerData record class.
      Parameters:
      removedCategories - the value for the removedCategories record component
      removedGlobalRecipes - the value for the removedGlobalRecipes record component
      categoryData - the value for the categoryData record component
      itemData - the value for the itemData record component
      fluidData - the value for the fluidData record component
  • Method Details

    • collect

      @Nullable public static @Nullable RecipeViewerData collect()
    • isEmpty

      public boolean isEmpty()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • removedCategories

      public List<net.minecraft.resources.ResourceLocation> removedCategories()
      Returns the value of the removedCategories record component.
      Returns:
      the value of the removedCategories record component
    • removedGlobalRecipes

      public List<net.minecraft.resources.ResourceLocation> removedGlobalRecipes()
      Returns the value of the removedGlobalRecipes record component.
      Returns:
      the value of the removedGlobalRecipes record component
    • categoryData

      public List<CategoryData> categoryData()
      Returns the value of the categoryData record component.
      Returns:
      the value of the categoryData record component
    • itemData

      public ItemData itemData()
      Returns the value of the itemData record component.
      Returns:
      the value of the itemData record component
    • fluidData

      public FluidData fluidData()
      Returns the value of the fluidData record component.
      Returns:
      the value of the fluidData record component