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

Transitive Access Wideners seem to break under certain circumstances. #1095

Open
Witixin1512 opened this issue Apr 13, 2024 · 0 comments
Open

Comments

@Witixin1512
Copy link

Witixin1512 commented Apr 13, 2024

At some point when adding more than one TAW that applies to the same class, Loom seems to be unable to remap code using that properly. This results in consumer mods of the one using the transitive access wideners seeing weird methods being invoked.

The following access widener file is enough to trigger this:

accessWidener v2 named

transitive-accessible field net/minecraft/client/render/WorldRenderer bufferBuilders Lnet/minecraft/client/render/BufferBuilderStorage;
transitive-accessible method net/minecraft/client/render/WorldRenderer canDrawEntityOutlines ()Z

I've made two minimal reproduction projects, one that publishes to mavenLocal, and one that consumes the dependency from mavenLocal. They are https://github.com/WitixinForks/fabric-taw-publisher and https://github.com/WitixinForks/fabric-taw-consumer.

The original class looks like this:

public class ClientOnlyClass {

    public static void isThisRemapped() {
        MinecraftClient mc = MinecraftClient.getInstance();
        VertexConsumerProvider bufferSource =  mc.worldRenderer.bufferBuilders.getEntityVertexConsumers();
    }
}

However it appears to consumers like this:

public class ClientOnlyClass {
    public static void isThisRemapped() {
        MinecraftClient mc = MinecraftClient.getInstance();
        VertexConsumerProvider bufferSource =  mc.worldRenderer.bufferBuilders.method_23000();
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant