You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling against Spigot's Mojang-mapped jar, I was getting tons of warnings about auxiliary classes:
/home/runner/work/special-gradle/special-gradle/test-plugin/src/main/java/xyz/jpenilla/specialgradle/testplugin/TestPlugin.java:27: warning: auxiliary class EntityArgument in ArgumentEntity.java should not be accessed from outside its own source file
import net.minecraft.commands.arguments.EntityArgument;
^
/home/runner/work/special-gradle/special-gradle/test-plugin/src/main/java/xyz/jpenilla/specialgradle/testplugin/TestPlugin.java:30: warning: auxiliary class Component in IChatBaseComponent.java should not be accessed from outside its own source file
import net.minecraft.network.chat.Component;
^
/home/runner/work/special-gradle/special-gradle/test-plugin/src/main/java/xyz/jpenilla/specialgradle/testplugin/TestPlugin.java:33: warning: auxiliary class ServerPlayer in EntityPlayer.java should not be accessed from outside its own source file
import net.minecraft.server.level.ServerPlayer;
^
/home/runner/work/special-gradle/special-gradle/test-plugin/src/main/java/xyz/jpenilla/specialgradle/testplugin/TestPlugin.java:42: warning: auxiliary class Commands in CommandDispatcher.java should not be accessed from outside its own source file
import static net.minecraft.commands.Commands.argument;
^
/home/runner/work/special-gradle/special-gradle/test-plugin/src/main/java/xyz/jpenilla/specialgradle/testplugin/TestPlugin.java:43: warning: auxiliary class Commands in CommandDispatcher.java should not be accessed from outside its own source file
import static net.minecraft.commands.Commands.literal;
^
... truncated, but there were many more similar warnings
Upon further inspection, I noticed that this is due to SpecialSource not remapping the SourceFile attribute at all.
This can bee seen by unzipping the Mojang-mapped Spigot jar from BuildTools, and running javap -v on any class file edited by Spigot or CraftBukkit, for example, ServerPlayer (EntityPlayer in Spigot names):
I assume you have Xlint:all or something as I've never seen that warning.
As a workaround you can use --kill-source to remove the SourceFile attribute or disable that specific warning in javac (-Xlint:-auxiliaryclass).
BuildTools is the one running SpecialSource in this case, otherwise I would have used --kill-source.
For my own projects I can disable the warning, sure, but I think it would be a better solution to either remap the attribute in SpecialSource, or to have BuildTools pass the argument to strip the attribute when building Spigot, this way Spigot jars won't have invalid metadata.
When compiling against Spigot's Mojang-mapped jar, I was getting tons of warnings about auxiliary classes:
Upon further inspection, I noticed that this is due to SpecialSource not remapping the SourceFile attribute at all.
This can bee seen by unzipping the Mojang-mapped Spigot jar from BuildTools, and running
javap -v
on any class file edited by Spigot or CraftBukkit, for example,ServerPlayer
(EntityPlayer
in Spigot names):The text was updated successfully, but these errors were encountered: