    001/*
    002 * Forge Mod Loader
    003 * Copyright (c) 2012-2013 cpw.
    004 * All rights reserved. This program and the accompanying materials
    005 * are made available under the terms of the GNU Lesser Public License v2.1
    006 * which accompanies this distribution, and is available at
    007 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    008 *
    009 * Contributors:
    010 *     cpw - implementation
    011 */
    012
    013package cpw.mods.fml.common.modloader;
    014
    015import cpw.mods.fml.common.ModContainer;
    016import cpw.mods.fml.common.discovery.ASMDataTable;
    017import cpw.mods.fml.common.network.NetworkMod;
    018import cpw.mods.fml.common.network.NetworkModHandler;
    019
    020public class ModLoaderNetworkHandler extends NetworkModHandler
    021{
    022
    023    private BaseModProxy baseMod;
    024    public ModLoaderNetworkHandler(ModLoaderModContainer mlmc)
    025    {
    026        super(mlmc, null);
    027    }
    028
    029    public void setBaseMod(BaseModProxy baseMod)
    030    {
    031        this.baseMod = baseMod;
    032    }
    033
    034    @Override
    035    public boolean requiresClientSide()
    036    {
    037        return false;
    038    }
    039
    040    @Override
    041    public boolean requiresServerSide()
    042    {
    043        return false;
    044    }
    045
    046    @Override
    047    public boolean acceptVersion(String version)
    048    {
    049        return baseMod.getVersion().equals(version);
    050    }
    051    @Override
    052    public boolean isNetworkMod()
    053    {
    054        return true;
    055    }
    056}