mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
SidedProxy now has sensible default values - nested ClientProxy and ServerProxy classes.
This commit is contained in:
1 parent
40a124d571
commit
d105c444ee
9 files changed
+36
-13
No files matched your search
@@ -57,6 +57,10 @@ public class ProxyInjector
|
||||
continue;
|
||||
}
|
||||
String targetType = side.isClient() ? annotation.clientSide() : annotation.serverSide();
|
||||
if(targetType.equals(""))
|
||||
{
|
||||
targetType = targ.getClassName() + (side.isClient() ? "$ClientProxy" : "$ServerProxy");
|
||||
}
|
||||
Object proxy=Class.forName(targetType, true, mcl).newInstance();
|
||||
|
||||
if (languageAdapter.supportsStatics() && (target.getModifiers() & Modifier.STATIC) == 0 )
|
||||
|
||||
@@ -50,12 +50,14 @@ import java.lang.annotation.Target;
|
||||
public @interface SidedProxy
|
||||
{
|
||||
/**
|
||||
* The name of the client side class to load and populate
|
||||
* The full name of the client side class to load and populate.
|
||||
* Defaults to the nested class named "ClientProxy" in the current class.
|
||||
*/
|
||||
String clientSide() default "";
|
||||
|
||||
/**
|
||||
* The name of the server side class to load and populate
|
||||
* The full name of the server side class to load and populate.
|
||||
* Defaults to the nested class named "ServerProxy" in the current class.
|
||||
*/
|
||||
String serverSide() default "";
|
||||
|
||||
|
||||
Reference in new issue
Block a user