use of net.minecraftforge.fml.common.DummyModContainer in project MinecraftForge by MinecraftForge.
the class DummyBlockReplacementTest method setup.
@BeforeClass
public static void setup() {
System.setProperty("fml.queryResult", "confirm");
System.setProperty("fml.doNotBackup", "true");
Loader.instance();
Bootstrap.register();
Loader.instance().setupTestHarness(new DummyModContainer(new ModMetadata() {
{
modId = "test";
}
}));
}
use of net.minecraftforge.fml.common.DummyModContainer in project MinecraftForge by MinecraftForge.
the class ItemBlockSubstitutionRemoveRestoreTest method setup.
@BeforeClass
public static void setup() {
Loader.instance();
Bootstrap.register();
myDirtInstance = new ItemMyDirt();
Loader.instance().setupTestHarness(new DummyModContainer(new ModMetadata() {
{
modId = "test";
}
}));
originalDirt = new ItemStack(Blocks.DIRT).getItem();
}
use of net.minecraftforge.fml.common.DummyModContainer in project MinecraftForge by MinecraftForge.
the class SubstitutionRemoveRestoreTest method setup.
@BeforeClass
public static void setup() {
Loader.instance();
Bootstrap.register();
Loader.instance().setupTestHarness(new DummyModContainer(new ModMetadata() {
{
modId = "test";
}
}));
}
use of net.minecraftforge.fml.common.DummyModContainer in project MinecraftForge by MinecraftForge.
the class FMLClientHandler method detectOptifine.
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();
InputStream optifineModInfoInputStream = getClass().getResourceAsStream("optifinemod.info");
try {
ModMetadata optifineMetadata = MetadataCollection.from(optifineModInfoInputStream, "optifine").getMetadataForId("optifine", dummyOptifineMeta);
optifineContainer = new DummyModContainer(optifineMetadata);
FMLLog.info("Forge Mod Loader has detected optifine %s, enabling compatibility features", optifineContainer.getVersion());
} finally {
IOUtils.closeQuietly(optifineModInfoInputStream);
}
} catch (Exception e) {
optifineContainer = null;
}
}
use of net.minecraftforge.fml.common.DummyModContainer in project MinecraftForge by MinecraftForge.
the class BlockStateMappingsTest method setup.
@BeforeClass
public static void setup() {
System.setProperty("fml.queryResult", "confirm");
System.setProperty("fml.doNotBackup", "true");
Loader.instance();
Bootstrap.register();
Loader.instance().setupTestHarness(new DummyModContainer(new ModMetadata() {
{
modId = "test";
}
}));
}
Aggregations