Record Class FluidData

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

public record FluidData(List<net.neoforged.neoforge.fluids.FluidStack> addedEntries, List<net.neoforged.neoforge.fluids.crafting.FluidIngredient> removedEntries, List<net.neoforged.neoforge.fluids.crafting.FluidIngredient> completelyRemovedEntries, List<FluidData.Group> groupedEntries, List<FluidData.Info> info, List<FluidData.DataComponentSubtypes> dataComponentSubtypes) extends Record
  • Field Details

    • STREAM_CODEC

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

    • FluidData

      public FluidData(List<net.neoforged.neoforge.fluids.FluidStack> addedEntries, List<net.neoforged.neoforge.fluids.crafting.FluidIngredient> removedEntries, List<net.neoforged.neoforge.fluids.crafting.FluidIngredient> completelyRemovedEntries, List<FluidData.Group> groupedEntries, List<FluidData.Info> info, List<FluidData.DataComponentSubtypes> dataComponentSubtypes)
      Creates an instance of a FluidData record class.
      Parameters:
      addedEntries - the value for the addedEntries record component
      removedEntries - the value for the removedEntries record component
      completelyRemovedEntries - the value for the completelyRemovedEntries record component
      groupedEntries - the value for the groupedEntries record component
      info - the value for the info record component
      dataComponentSubtypes - the value for the dataComponentSubtypes record component
  • Method Details

    • collect

      public static FluidData 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.
    • addedEntries

      public List<net.neoforged.neoforge.fluids.FluidStack> addedEntries()
      Returns the value of the addedEntries record component.
      Returns:
      the value of the addedEntries record component
    • removedEntries

      public List<net.neoforged.neoforge.fluids.crafting.FluidIngredient> removedEntries()
      Returns the value of the removedEntries record component.
      Returns:
      the value of the removedEntries record component
    • completelyRemovedEntries

      public List<net.neoforged.neoforge.fluids.crafting.FluidIngredient> completelyRemovedEntries()
      Returns the value of the completelyRemovedEntries record component.
      Returns:
      the value of the completelyRemovedEntries record component
    • groupedEntries

      public List<FluidData.Group> groupedEntries()
      Returns the value of the groupedEntries record component.
      Returns:
      the value of the groupedEntries record component
    • info

      public List<FluidData.Info> info()
      Returns the value of the info record component.
      Returns:
      the value of the info record component
    • dataComponentSubtypes

      public List<FluidData.DataComponentSubtypes> dataComponentSubtypes()
      Returns the value of the dataComponentSubtypes record component.
      Returns:
      the value of the dataComponentSubtypes record component