Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

LivingEntityMixin cancels the call, making other mixins not trigger #6

@DaFuqs

Description

@DaFuqs

Your mixin

@Inject(method = "createLivingAttributes", at = @At("RETURN"), cancellable = true)
private static void appendLivingAttributes(CallbackInfoReturnable<DefaultAttributeContainer.Builder> cir) {
DefaultAttributeContainer.Builder builder = cir.getReturnValue();
builder.add(RollingAttributes.MAX_PULL_TIME_MULTIPLIER);
cir.setReturnValue(builder);

cancels the method after it was called.

All injects that happen after it (like ones from other mods) thus get ignored, causing crashes.

No need to cancel here, since it's a list, like so:

@Inject(method = "createLivingAttributes", require = 1, allow = 1, at = @At("RETURN"))
private static void appendLivingAttributes(final CallbackInfoReturnable<AttributeSupplier.Builder> cir) {
	cir.getReturnValue().add(RollingAttributes.MAX_PULL_TIME_MULTIPLIER);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions