Java 类cpw.mods.fml.common.SidedProxy 实例源码

项目:ThermosRebased    文件:SidedProxyInjector.java   
@Override
public <V> V inject(final SidedProxy annotation, final Class<V> type, final Object o, final Object... args) throws Exception {
    final Side side = FMLCommonHandler.instance().getSide();
    if (side.isClient() && !"".equals(annotation.clientSide())) {
        return this.create(annotation.clientSide()).build();
    }
    if (!"".equals(annotation.serverSide())) {
        return this.create(annotation.serverSide()).build();
    }
    return this.create(type).build();
}
项目:ThermosRebased    文件:SidedProxyInjector.java   
public SidedProxyInjector() {
    super(SidedProxy.class, Object.class);
}