From 03a1a00e57633ff30048d5af09fa10db9dcf423b Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Tue, 11 Mar 2025 17:58:47 +0100 Subject: feat: Add SBRecombobulated --- src/main/kotlin/repo/item/SBItemProperty.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/repo/item/SBItemProperty.kt') diff --git a/src/main/kotlin/repo/item/SBItemProperty.kt b/src/main/kotlin/repo/item/SBItemProperty.kt index 55b8f01..fd85251 100644 --- a/src/main/kotlin/repo/item/SBItemProperty.kt +++ b/src/main/kotlin/repo/item/SBItemProperty.kt @@ -8,7 +8,7 @@ import moe.nea.firmament.util.compatloader.CompatLoader /** * A property of a skyblock item. Not every skyblock item must have this property, but some should. * - * Access to this class should be limited to [State.bindWith] and [SBItemData.getData]. + * Access to this class should be limited to [State.bind] and [SBItemData.getData]. * @see State */ abstract class SBItemProperty { @@ -36,8 +36,12 @@ abstract class SBItemProperty { * to change the state of an item, including its rendering as a vanilla [ItemStack]. */ abstract class State : SBItemProperty() { + /** + * Apply the stored info back to the item stack. If possible [stack] should be modified and returned directly, + * instead of creating a new [ItemStack] instance. Information stored here should be recovered using [fromStack]. + */ abstract fun applyToStack(stack: ItemStack, store: SBItemData, value: T?): ItemStack - fun bindWith(data: T) = BoundState(this, data) + fun bind(data: T) = BoundState(this, data) } /** -- cgit