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

项目:TRHS_Club_Mod_2016    文件:FMLClientHandler.java   
private void detectOptifine()
{
    try
    {
        Class<?> optifineConfig = Class.forName("Config", false, Loader.instance().getModClassLoader());
        String optifineVersion = (String) optifineConfig.getField("VERSION").get(null);
        Map<String,Object> dummyOptifineMeta = ImmutableMap.<String,Object>builder().put("name", "Optifine").put("version", optifineVersion).build();
        ModMetadata optifineMetadata = MetadataCollection.from(getClass().getResourceAsStream("optifinemod.info"),"optifine").getMetadataForId("optifine", dummyOptifineMeta);
        optifineContainer = new DummyModContainer(optifineMetadata);
        FMLLog.info("Forge Mod Loader has detected optifine %s, enabling compatibility features",optifineContainer.getVersion());
    }
    catch (Exception e)
    {
        optifineContainer = null;
    }
}
项目:RuneCraftery    文件:ModLoaderModContainer.java   
@Override
public void bindMetadata(MetadataCollection mc)
{
    Map<String, Object> dummyMetadata = ImmutableMap.<String,Object>builder().put("name", modId).put("version", "1.0").build();
    this.metadata = mc.getMetadataForId(modId, dummyMetadata);
    Loader.instance().computeDependencies(sortingProperties, getRequirements(), getDependencies(), getDependants());
}
项目:RuneCraftery    文件:ModLoaderModContainer.java   
@Override
public void bindMetadata(MetadataCollection mc)
{
    Map<String, Object> dummyMetadata = ImmutableMap.<String,Object>builder().put("name", modId).put("version", "1.0").build();
    this.metadata = mc.getMetadataForId(modId, dummyMetadata);
    Loader.instance().computeDependencies(sortingProperties, getRequirements(), getDependencies(), getDependants());
}
项目:BetterNutritionMod    文件:ModLoaderModContainer.java   
@Override
public void bindMetadata(MetadataCollection mc)
{
    Map<String, Object> dummyMetadata = ImmutableMap.<String,Object>builder().put("name", modId).put("version", "1.0").build();
    this.metadata = mc.getMetadataForId(modId, dummyMetadata);
    Loader.instance().computeDependencies(sortingProperties, getRequirements(), getDependencies(), getDependants());
}
项目:4Space-5    文件:NEIModContainer.java   
public NEIModContainer() {
    super(MetadataCollection.from(MetadataCollection.class.getResourceAsStream("/neimod.info"), "NotEnoughItems").getMetadataForId("NotEnoughItems", null));
    getMetadata();
}
项目:ThermosRebased    文件:FanDefaultModContainer.java   
public void bindMetadata(final MetadataCollection metadataCollection) {
}
项目:ThermosRebased    文件:ModContainerWrapper.java   
public void bindMetadata(final MetadataCollection metadataCollection) {
    this.mContainer.bindMetadata(metadataCollection);
}