Record Class AgingEnvironmentContext

java.lang.Object
java.lang.Record
ke.ric.api.aging.AgingEnvironmentContext

public record AgingEnvironmentContext(org.bukkit.block.Block rack, AgingClimate climate, org.bukkit.inventory.ItemStack source, AgingExposure exposure, org.bukkit.inventory.Inventory inventory) extends Record
Current rack block and climate supplied to an addon environmental exposure probe.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AgingEnvironmentContext(org.bukkit.block.Block rack, AgingClimate climate)
    Compatibility constructor for probes depending only on the rack.
    AgingEnvironmentContext(org.bukkit.block.Block rack, AgingClimate climate, org.bukkit.inventory.ItemStack source, AgingExposure exposure)
    Compatibility constructor for existing probes and addon callers.
    AgingEnvironmentContext(org.bukkit.block.Block rack, AgingClimate climate, org.bukkit.inventory.ItemStack source, AgingExposure exposure, org.bukkit.inventory.Inventory inventory)
    Creates an instance of a AgingEnvironmentContext record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the climate record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the exposure record component.
    final int
    Returns a hash code value for this object.
    org.bukkit.inventory.Inventory
    Returns the value of the inventory record component.
    org.bukkit.block.Block
    Returns the value of the rack record component.
    org.bukkit.inventory.ItemStack
    Returns the value of the source record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AgingEnvironmentContext

      public AgingEnvironmentContext(org.bukkit.block.Block rack, AgingClimate climate, org.bukkit.inventory.ItemStack source, AgingExposure exposure)
      Compatibility constructor for existing probes and addon callers.
    • AgingEnvironmentContext

      public AgingEnvironmentContext(org.bukkit.block.Block rack, AgingClimate climate)
      Compatibility constructor for probes depending only on the rack.
    • AgingEnvironmentContext

      public AgingEnvironmentContext(org.bukkit.block.Block rack, AgingClimate climate, org.bukkit.inventory.ItemStack source, AgingExposure exposure, org.bukkit.inventory.Inventory inventory)
      Creates an instance of a AgingEnvironmentContext record class.
      Parameters:
      rack - the value for the rack record component
      climate - the value for the climate record component
      source - the value for the source record component
      exposure - the value for the exposure record component
      inventory - the value for the inventory record component
  • Method Details

    • 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.
    • rack

      public org.bukkit.block.Block rack()
      Returns the value of the rack record component.
      Returns:
      the value of the rack record component
    • climate

      public AgingClimate climate()
      Returns the value of the climate record component.
      Returns:
      the value of the climate record component
    • source

      public org.bukkit.inventory.ItemStack source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • exposure

      public AgingExposure exposure()
      Returns the value of the exposure record component.
      Returns:
      the value of the exposure record component
    • inventory

      public org.bukkit.inventory.Inventory inventory()
      Returns the value of the inventory record component.
      Returns:
      the value of the inventory record component