Skip to content

Conversation

Player3324
Copy link
Contributor

@Player3324 Player3324 commented Jun 22, 2025

I don't think it's necessary to keep the restriction to Minecraft classes only. Fabric tends to be less restrictive and there are already ways to hack around it anyway.

Fixes part of #1049 and #1043

Note this would come on top of #1055 - making GameProvider.getBuiltinTransforms include BuiltinTransform.CLASS_TWEAKS in all cases. Other game provider can choose different behaviors.


public final class FabricTransformer {
public static byte[] transform(boolean isDevelopment, EnvType envType, String name, byte[] bytes) {
boolean isMinecraftClass = name.startsWith("net.minecraft.") || name.startsWith("com.mojang.blaze3d.") || name.indexOf('.') < 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this line can be removed too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually have another PR at #1056 that changes how this works, if the idea in this PR is accepted I'll rebase it onto that

@Player3324 Player3324 reopened this Jul 2, 2025
@Player3324 Player3324 marked this pull request as draft July 2, 2025 18:14
@Player3324
Copy link
Contributor Author

Draft pending update for code changes in 1056

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

Successfully merging this pull request may close these issues.

4 participants