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; } }
@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()); }
public NEIModContainer() { super(MetadataCollection.from(MetadataCollection.class.getResourceAsStream("/neimod.info"), "NotEnoughItems").getMetadataForId("NotEnoughItems", null)); getMetadata(); }
public void bindMetadata(final MetadataCollection metadataCollection) { }
public void bindMetadata(final MetadataCollection metadataCollection) { this.mContainer.bindMetadata(metadataCollection); }