Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@WrapOperation with @Constant has no IDE support #2259

Open
IThundxr opened this issue Mar 10, 2024 · 0 comments
Open

@WrapOperation with @Constant has no IDE support #2259

IThundxr opened this issue Mar 10, 2024 · 0 comments

Comments

@IThundxr
Copy link

IThundxr commented Mar 10, 2024

Minecraft Development for IntelliJ plugin version

2023.3-1.7.3-472

IntelliJ version

IntelliJ IDEA 2023.3.4 (Ultimate Edition)

Operating System

Linux

Target platform

Architectury

Description of the bug

    @WrapOperation(method = "animate", constant = @Constant(classValue = AbstractBogeyBlock.class), ordinal = 0)
    private boolean unlinkedAnimateFix(Object instance, Operation<Boolean> original, @Share("wheelRadius") LocalDoubleRef wheelRadius) {
        if (instance instanceof AbstractBogeyBlock<?> type) {
            wheelRadius.set(type.getWheelRadius());
            return true;
        } else if (instance instanceof UnlinkedBogeyBlock type) {
            wheelRadius.set(type.getWheelRadius());
            return true;
        }
        return original.call(instance);
    }

targetting https://github.com/Fabricators-of-Create/Create/blob/703fd0de2055a1b79b5665d319acb4da3aace47c/src/main/java/com/simibubi/create/content/trains/bogey/AbstractBogeyBlockEntity.java#L103-L110

Oddly enough, its only for specific classes it looks like, https://github.com/Layers-of-Railways/Railway/blob/29947c1684d067b531218c8c77f15ad847491e2c/common/src/main/java/com/railwayteam/railways/mixin/MixinDeployerHandler.java works perfectly fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant