    001package cpw.mods.fml.common;
    002
    003import java.io.File;
    004import java.security.cert.Certificate;
    005import java.util.Collections;
    006import java.util.List;
    007import java.util.Set;
    008
    009import com.google.common.eventbus.EventBus;
    010
    011import cpw.mods.fml.common.versioning.ArtifactVersion;
    012import cpw.mods.fml.common.versioning.DefaultArtifactVersion;
    013import cpw.mods.fml.common.versioning.VersionRange;
    014
    015public class DummyModContainer implements ModContainer
    016{
    017    private ModMetadata md;
    018    private ArtifactVersion processedVersion;
    019
    020    public DummyModContainer(ModMetadata md)
    021    {
    022        this.md = md;
    023    }
    024
    025    public DummyModContainer()
    026    {
    027    }
    028
    029    @Override
    030    public void bindMetadata(MetadataCollection mc)
    031    {
    032    }
    033
    034    @Override
    035    public List<ArtifactVersion> getDependants()
    036    {
    037        return Collections.emptyList();
    038    }
    039
    040    @Override
    041    public List<ArtifactVersion> getDependencies()
    042    {
    043        return Collections.emptyList();
    044    }
    045
    046    @Override
    047    public Set<ArtifactVersion> getRequirements()
    048    {
    049        return Collections.emptySet();
    050    }
    051
    052    @Override
    053    public ModMetadata getMetadata()
    054    {
    055        return md;
    056    }
    057
    058    @Override
    059    public Object getMod()
    060    {
    061        return null;
    062    }
    063
    064    @Override
    065    public String getModId()
    066    {
    067        return md.modId;
    068    }
    069
    070    @Override
    071    public String getName()
    072    {
    073        return md.name;
    074    }
    075
    076    @Override
    077    public String getSortingRules()
    078    {
    079        return "";
    080    }
    081
    082    @Override
    083    public File getSource()
    084    {
    085        return null;
    086    }
    087
    088    @Override
    089    public String getVersion()
    090    {
    091        return md.version;
    092    }
    093
    094    public boolean matches(Object mod)
    095    {
    096        return false;
    097    }
    098
    099    @Override
    100    public void setEnabledState(boolean enabled)
    101    {
    102    }
    103
    104    @Override
    105    public boolean registerBus(EventBus bus, LoadController controller)
    106    {
    107        return false;
    108    }
    109
    110    @Override
    111    public ArtifactVersion getProcessedVersion()
    112    {
    113        if (processedVersion == null)
    114        {
    115            processedVersion = new DefaultArtifactVersion(getModId(), getVersion());
    116        }
    117        return processedVersion;
    118    }
    119
    120    @Override
    121    public boolean isImmutable()
    122    {
    123        return false;
    124    }
    125
    126    @Override
    127    public boolean isNetworkMod()
    128    {
    129        return false;
    130    }
    131
    132    @Override
    133    public String getDisplayVersion()
    134    {
    135        return md.version;
    136    }
    137    @Override
    138    public VersionRange acceptableMinecraftVersionRange()
    139    {
    140        return Loader.instance().getMinecraftModContainer().getStaticVersionRange();
    141    }
    142
    143    @Override
    144    public Certificate getSigningCertificate()
    145    {
    146        return null;
    147    }
    148}