use of com.mcmoddev.lib.integration.IntegrationPreInitEvent in project BaseMetals by MinecraftModDevelopmentMods.
the class BMeThaumcraft method preInit.
@SubscribeEvent
public static void preInit(IntegrationPreInitEvent ev) {
List<String> materials = Arrays.asList(MaterialNames.COPPER, MaterialNames.SILVER, MaterialNames.DIAMOND, MaterialNames.EMERALD, MaterialNames.STEEL, MaterialNames.BRASS, MaterialNames.BRONZE, MaterialNames.TIN, MaterialNames.MITHRIL, MaterialNames.AQUARIUM);
Materials.getAllMaterials().stream().filter(mat -> !mat.isVanilla()).filter(mat -> !mat.isEmpty()).forEach(mat -> {
String mn = mat.getName();
TCMaterial tcm = Thaumcraft.createWithAspects(mat);
tcMaterials.put(mn, tcm);
});
Materials.getAllMaterials().stream().filter(mat -> mat.isVanilla()).filter(mat -> !mat.isEmpty()).filter(mat -> mat.getType() == MMDMaterialType.MaterialType.MINERAL || mat.getType() == MMDMaterialType.MaterialType.ROCK).forEach(mat -> {
String mn = mat.getName();
TCMaterial tcm = Thaumcraft.createVanillaIngotWithAspects(mat);
tcMaterials.put(mn, tcm);
});
materials.stream().filter(Materials::hasMaterial).forEach(BMeThaumcraft::makeSpecialMaterial);
tcMaterials.entrySet().stream().map(ent -> ent.getValue()).forEach(tc -> tc.update());
}
Aggregations