Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static byte[] transform(boolean isDevelopment, EnvType envType, String na
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

boolean transformAccess = isMinecraftClass && FabricLauncherBase.getLauncher().getMappingConfiguration().requiresPackageAccessHack();
boolean environmentStrip = !isMinecraftClass || isDevelopment;
boolean applyAccessWidener = isMinecraftClass && FabricLoaderImpl.INSTANCE.getAccessWidener().getTargets().contains(name);
boolean applyAccessWidener = FabricLoaderImpl.INSTANCE.getAccessWidener().getTargets().contains(name);

if (!transformAccess && !environmentStrip && !applyAccessWidener) {
return bytes;
Expand Down