Spell Engine

Spell Engine

8M Downloads

AttributeResolver#register is private

Partonetrain opened this issue ยท 3 comments

commented

I assume it is meant to be public like in Jewelry
I could use an AccessTransformer but it would make more sense for this to be fixed in Spell Engine

https://github.com/ZsoltMolnarrr/SpellEngine/blob/1.20.1/src/main/java/net/spell_engine/api/item/AttributeResolver.java#L34-L40

commented

Turns out I can just use @shadow

Will Jewelry be getting a similar change?

commented

Mods providing the attributes are currently all being reworked to ditch AttributeResolver.

commented

No access Transformer is required.
When using it as intended (following the inline comments), this visibility is not a problem, because within mixin the register method is accessible.

However, AttributeResolver is getting retired, as a better method was discovered.

@Mixin(value = EntityAttributes.class)
public class EntityAttributesMixin {
    @Inject(method = "<clinit>", at = @At("TAIL"))
    private static void static_tail(CallbackInfo ci) {
        // Register my attribute into vanilla registry
    }
}