Open
Description
First of all awesome plugin! Thank you for the efforts creating this >3
There is one case of valid sideonly usage:
void someFunc() {
if (getSide() == Side.CLIENT)
someClientOnlyMethod();
}
@SideOnly(Side.CLIENT)
void someClientOnlyMethod() { ... }
where getSide() effectively returns FMLCommonHandler.INSTANCE.getEffectiveSide()
.
There are possible variations which are essentially the same:
void someFunc() {
if (isClient())
someClientOnlyMethod();
}
// Maybe wrapped in some utility class
boolean isClient() { return getSide() == Side.CLIENT; }
@SideOnly(Side.CLIENT)
void someClientOnlyMethod() { ... }
Since detecting this kind of usage can be difficult, I suggest using certain annotation (e.g. SuppressWarning("sideonly")
on methods that have this kind of usage.