use of slimeknights.tconstruct.library.materials.definition.MaterialId in project TinkersConstruct by SlimeKnights.
the class AbstractMaterialStatsDataProvider method run.
@Override
public void run(HashCache cache) {
addMaterialStats();
// ensure we have stats for all materials
Set<MaterialId> materialsGenerated = materials.getAllMaterials();
for (MaterialId material : materialsGenerated) {
if (!allMaterialStats.containsKey(material)) {
throw new IllegalStateException(String.format("Missing material stats for '%s'", material));
}
}
// does not ensure we have materials for all stats, we may be adding stats for another mod
// generate finally
allMaterialStats.forEach((materialId, materialStats) -> saveThing(cache, materialId, convert(materialStats)));
}
Aggregations