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
ConstructorsConstructorDescriptionAgingEnvironmentContext(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 aAgingEnvironmentContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionclimate()Returns the value of theclimaterecord component.final booleanIndicates whether some other object is "equal to" this one.exposure()Returns the value of theexposurerecord component.final inthashCode()Returns a hash code value for this object.org.bukkit.inventory.InventoryReturns the value of theinventoryrecord component.org.bukkit.block.Blockrack()Returns the value of therackrecord component.org.bukkit.inventory.ItemStacksource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
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
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 aAgingEnvironmentContextrecord class.- Parameters:
rack- the value for therackrecord componentclimate- the value for theclimaterecord componentsource- the value for thesourcerecord componentexposure- the value for theexposurerecord componentinventory- the value for theinventoryrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
rack
public org.bukkit.block.Block rack()Returns the value of therackrecord component.- Returns:
- the value of the
rackrecord component
-
climate
Returns the value of theclimaterecord component.- Returns:
- the value of the
climaterecord component
-
source
public org.bukkit.inventory.ItemStack source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
exposure
Returns the value of theexposurerecord component.- Returns:
- the value of the
exposurerecord component
-
inventory
public org.bukkit.inventory.Inventory inventory()Returns the value of theinventoryrecord component.- Returns:
- the value of the
inventoryrecord component
-