[Suggestion]: Add the ability to use modifiers without them persisting.
MerchantPug opened this issue ยท 5 comments
What is your suggestion?
Unfortunately, I think this would require a rewrite to the modifier system you already have, but, I would love for the ability to have non persistent modifiers, in that they wouldn't require a registry value, and that they wouldn't require saving to the player.
This is for use cases where the modifiers are handled elsewhere (for my example, an Origins power).
Speaking more generally, I think it'd be nice to have this fulfilled via an attribute modifier system for scales - as in, command-with-a-uuid, type, and value kind of thing - same as vanilla. This would give the most leeway to datapackers interacting with scale temporarily in all ways.
I feel like we should have both, mainly because developers might want to have different styles of modifiers (in my case Apoli has a separate modifier system that has more options than vanilla's modifiers). Giving datapackers the ability to use attribute modifiers for Pehkui scales as modifiers would be neat though.
I'll link certain classes used for Apugli's Modify Scale power type just in case you'd like to see what I'd like out of such a system.
https://github.com/MerchantPug/apugli/blob/1.20.2/common/src/main/java/net/merchantpug/apugli/integration/pehkui/ApoliScaleModifier.java
https://github.com/MerchantPug/apugli/blob/1.20.2/common/src/main/java/net/merchantpug/apugli/integration/pehkui/LerpedApoliScaleModifier.java
Speaking more generally, I think it'd be nice to have this fulfilled via an attribute modifier system for scales - as in, command-with-a-uuid, type, and value kind of thing - same as vanilla. This would give the most leeway to datapackers interacting with scale temporarily in all ways.
I feel like we should have both, mainly because developers might want to have different styles of modifiers (in my case Apoli has a separate modifier system that has more options than vanilla's modifiers). Giving datapackers the ability to use attribute modifiers for Pehkui scales as modifiers would be neat though.
To elaborate, how I could see this structured.
Is that AttributeScaleModifier is a subclass of a basic ScaleModifier. Using a command, you can add an AttributeScaleModifier.
Then ScaleModifiers are rewritten/partially rewritten to allow for determining whether they save to an entity or not. (Maybe through toTag and fromTag methods inside the ScaleModifier class?). Attribute Modifiers would, but externally handled things probably wouldn't want to be saved.
Speaking more generally, I think it'd be nice to have this fulfilled via an attribute modifier system for scales - as in, command-with-a-uuid, type, and value kind of thing - same as vanilla. This would give the most leeway to datapackers interacting with scale temporarily in all ways.