Class RecipeItemRef
java.lang.Object
ke.ric.cooking.data.RecipeItemRef
Immutable identity of one recipe item. Quantity and selection weight belong
to the recipe position that owns the reference, not to the identity itself.
RecipeItemRef.Kind.LEGACY_AUTO records provenance for old untyped strings. It
deliberately does not guess whether an ID is Heirloom or vanilla: runtime
resolution must retain the historical custom-first, vanilla-fallback order.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRecipeItemRef(String item, String customItem, ProviderItemRef providerItem) Backward-compatible constructor for the three explicit typed identities. -
Method Summary
Modifier and TypeMethodDescriptionstatic RecipeItemRefstatic RecipeItemRefcustomItem(String customItemId) booleanstatic RecipeItemReffromLegacyAuto(String id) Legacy return/byproduct strings retain custom-first, vanilla-fallback provenance.static RecipeItemRefLegacy output strings retain custom-first, vanilla-fallback provenance.getItem()inthashCode()booleanbooleanisItem()booleanbooleanbooleanitem()static RecipeItemRefkind()static RecipeItemReflegacyAuto(String id) legacyId()Backward-compatible string form used by existing runtime consumers.static RecipeItemRefstatic RecipeItemRefproviderItem(String serialized) static RecipeItemRefproviderItem(ProviderItemRef providerItem) toString()static RecipeItemRef
-
Constructor Details
-
RecipeItemRef
Backward-compatible constructor for the three explicit typed identities.
-
-
Method Details
-
item
-
vanilla
-
customItem
-
custom
-
providerItem
-
providerItem
-
provider
-
legacyAuto
-
fromLegacyOutput
Legacy output strings retain custom-first, vanilla-fallback provenance. -
fromLegacyAuto
Legacy return/byproduct strings retain custom-first, vanilla-fallback provenance. -
kind
-
item
-
customItem
-
providerItem
-
isItem
public boolean isItem() -
isVanillaItem
public boolean isVanillaItem() -
isCustomItem
public boolean isCustomItem() -
isProviderItem
public boolean isProviderItem() -
isLegacyAuto
public boolean isLegacyAuto() -
legacyId
Backward-compatible string form used by existing runtime consumers. -
getItem
-
getCustomItem
-
getProviderItem
-
getProviderItemRef
-
equals
-
hashCode
-
toString
-