Posted March 16, 20214 yr Moving forward, GlobalEntityTypeAttributes.put() is being deprecated in favor of the EntityAttributeCreationEvent. However, my mobs use config values for attributes like max health and the new event fires before the configs are loaded, which causes all the attributes to use their default values. I found EntityAttributeModificationEvent but even that fires before configs. Is there any way to do this with the new event?
March 16, 20214 yr Author 48 minutes ago, diesieben07 said: TL;DR: You can't. Configuration of attribute values should probably be done with attribute modifiers instead of modifying the base value. In your Entity constructor you can use ModifiableAttributeInstance#addTransientModifier to add any modifiers that are configured via the config (it won't persist to disk, because its transient). Ah, wasn't aware of this method. Thank you!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.