Record Class AgingDefinition
java.lang.Object
java.lang.Record
ke.ric.api.aging.AgingDefinition
public record AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield, Set<Integer> allowedDynamicYields, boolean continuous, AgingCompletion completion, AgingOutcomeResolver outcomeResolver, AgingItemUpdater itemUpdater, AgingLegacyProgressMapper legacyProgressMapper, Map<String, AgingEnvironmentProbe> exposureProbes, AgingItemMatcher itemMatcher, AgingCompletionPresenter completionPresenter, boolean addonManagedLore)
extends Record
Immutable addon-supplied aging recipe owned by the registering addon.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield) AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield, Set<Integer> allowedDynamicYields) AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield, Set<Integer> allowedDynamicYields, boolean continuous, AgingCompletion completion, AgingOutcomeResolver outcomeResolver, AgingItemUpdater itemUpdater, AgingLegacyProgressMapper legacyProgressMapper) Binary/source-compatible canonical constructor from the pre-exposure API.AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield, Set<Integer> allowedDynamicYields, boolean continuous, AgingCompletion completion, AgingOutcomeResolver outcomeResolver, AgingItemUpdater itemUpdater, AgingLegacyProgressMapper legacyProgressMapper, Map<String, AgingEnvironmentProbe> exposureProbes) Binary/source-compatible constructor from the exposure API.AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield, Set<Integer> allowedDynamicYields, boolean continuous, AgingCompletion completion, AgingOutcomeResolver outcomeResolver, AgingItemUpdater itemUpdater, AgingLegacyProgressMapper legacyProgressMapper, Map<String, AgingEnvironmentProbe> exposureProbes, AgingItemMatcher itemMatcher) Binary/source-compatible constructor from the custom matching API.AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield, Set<Integer> allowedDynamicYields, boolean continuous, AgingCompletion completion, AgingOutcomeResolver outcomeResolver, AgingItemUpdater itemUpdater, AgingLegacyProgressMapper legacyProgressMapper, Map<String, AgingEnvironmentProbe> exposureProbes, AgingItemMatcher itemMatcher, AgingCompletionPresenter completionPresenter, boolean addonManagedLore) Creates an instance of aAgingDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(org.bukkit.inventory.ItemStack item) Validate custom matching even when an item already carries aging progress.booleanReturns the value of theaddonManagedLorerecord component.Returns the value of theallowedDynamicYieldsrecord component.static AgingDefinition.Builderbuilder()Returns the value of thecompletionrecord component.Returns the value of thecompletionPresenterrecord component.booleanReturns the value of thecontinuousrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexposureProbesrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theinputItemIdrecord component.Returns the value of theitemMatcherrecord component.Returns the value of theitemUpdaterrecord component.Returns the value of thelegacyProgressMapperrecord component.Returns the value of theoutcomeResolverrecord component.Returns the value of theoutputItemIdrecord component.intReturns the value of theoutputYieldrecord component.stages()Returns the value of thestagesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AgingDefinition
public AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield) -
AgingDefinition
-
AgingDefinition
public AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield, Set<Integer> allowedDynamicYields, boolean continuous, AgingCompletion completion, AgingOutcomeResolver outcomeResolver, AgingItemUpdater itemUpdater, AgingLegacyProgressMapper legacyProgressMapper) Binary/source-compatible canonical constructor from the pre-exposure API. -
AgingDefinition
public AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield, Set<Integer> allowedDynamicYields, boolean continuous, AgingCompletion completion, AgingOutcomeResolver outcomeResolver, AgingItemUpdater itemUpdater, AgingLegacyProgressMapper legacyProgressMapper, Map<String, AgingEnvironmentProbe> exposureProbes) Binary/source-compatible constructor from the exposure API. -
AgingDefinition
public AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield, Set<Integer> allowedDynamicYields, boolean continuous, AgingCompletion completion, AgingOutcomeResolver outcomeResolver, AgingItemUpdater itemUpdater, AgingLegacyProgressMapper legacyProgressMapper, Map<String, AgingEnvironmentProbe> exposureProbes, AgingItemMatcher itemMatcher) Binary/source-compatible constructor from the custom matching API. -
AgingDefinition
public AgingDefinition(String id, String inputItemId, List<AgingStage> stages, String outputItemId, int outputYield, Set<Integer> allowedDynamicYields, boolean continuous, AgingCompletion completion, AgingOutcomeResolver outcomeResolver, AgingItemUpdater itemUpdater, AgingLegacyProgressMapper legacyProgressMapper, Map<String, AgingEnvironmentProbe> exposureProbes, AgingItemMatcher itemMatcher, AgingCompletionPresenter completionPresenter, boolean addonManagedLore) Creates an instance of aAgingDefinitionrecord class.- Parameters:
id- the value for theidrecord componentinputItemId- the value for theinputItemIdrecord componentstages- the value for thestagesrecord componentoutputItemId- the value for theoutputItemIdrecord componentoutputYield- the value for theoutputYieldrecord componentallowedDynamicYields- the value for theallowedDynamicYieldsrecord componentcontinuous- the value for thecontinuousrecord componentcompletion- the value for thecompletionrecord componentoutcomeResolver- the value for theoutcomeResolverrecord componentitemUpdater- the value for theitemUpdaterrecord componentlegacyProgressMapper- the value for thelegacyProgressMapperrecord componentexposureProbes- the value for theexposureProbesrecord componentitemMatcher- the value for theitemMatcherrecord componentcompletionPresenter- the value for thecompletionPresenterrecord componentaddonManagedLore- the value for theaddonManagedLorerecord component
-
-
Method Details
-
accepts
public boolean accepts(org.bukkit.inventory.ItemStack item) Validate custom matching even when an item already carries aging progress. -
builder
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
inputItemId
Returns the value of theinputItemIdrecord component.- Returns:
- the value of the
inputItemIdrecord component
-
stages
Returns the value of thestagesrecord component.- Returns:
- the value of the
stagesrecord component
-
outputItemId
Returns the value of theoutputItemIdrecord component.- Returns:
- the value of the
outputItemIdrecord component
-
outputYield
public int outputYield()Returns the value of theoutputYieldrecord component.- Returns:
- the value of the
outputYieldrecord component
-
allowedDynamicYields
-
continuous
public boolean continuous()Returns the value of thecontinuousrecord component.- Returns:
- the value of the
continuousrecord component
-
completion
Returns the value of thecompletionrecord component.- Returns:
- the value of the
completionrecord component
-
outcomeResolver
Returns the value of theoutcomeResolverrecord component.- Returns:
- the value of the
outcomeResolverrecord component
-
itemUpdater
Returns the value of theitemUpdaterrecord component.- Returns:
- the value of the
itemUpdaterrecord component
-
legacyProgressMapper
Returns the value of thelegacyProgressMapperrecord component.- Returns:
- the value of the
legacyProgressMapperrecord component
-
exposureProbes
Returns the value of theexposureProbesrecord component.- Returns:
- the value of the
exposureProbesrecord component
-
itemMatcher
Returns the value of theitemMatcherrecord component.- Returns:
- the value of the
itemMatcherrecord component
-
completionPresenter
Returns the value of thecompletionPresenterrecord component.- Returns:
- the value of the
completionPresenterrecord component
-
addonManagedLore
public boolean addonManagedLore()Returns the value of theaddonManagedLorerecord component.- Returns:
- the value of the
addonManagedLorerecord component
-