Log "to determine" matter values
This commit is contained in:
parent
4ab5871493
commit
e56f27ee6b
@ -264,14 +264,14 @@ object RecipeResolverManager : SimpleJsonResourceReloadListener(GsonBuilder().se
|
||||
val recipes = output2Recipes[item]
|
||||
|
||||
if (recipes == null) {
|
||||
commentary[item] = TextComponent("Item ${item.registryName} has no recipes")
|
||||
commentary[item] = TextComponent("Item '${item.registryName}' has no recipes")
|
||||
return Result.MISSING
|
||||
}
|
||||
|
||||
recipesLoop@ for (recipe in recipes) {
|
||||
if (recipe.inputs.isEmpty()) {
|
||||
// TODO: should we ignore empty recipes?
|
||||
commentary[item] = TextComponent("Recipe ${recipe.formattedName} is empty")
|
||||
commentary[item] = TextComponent("${recipe.formattedName} is empty")
|
||||
|
||||
continue
|
||||
}
|
||||
@ -425,6 +425,33 @@ object RecipeResolverManager : SimpleJsonResourceReloadListener(GsonBuilder().se
|
||||
toDetermine.addAll(input2Recipes.keys)
|
||||
toDetermine.addAll(output2Recipes.keys)
|
||||
|
||||
if (LOGGER.isDebugEnabled) {
|
||||
LOGGER.debug("Gonna try to search for matter values for next items:")
|
||||
|
||||
val names = ArrayList<String>()
|
||||
var length = 0
|
||||
|
||||
for (value in toDetermine) {
|
||||
val name = value.registryName!!.toString()
|
||||
|
||||
if (length != 0 && length + name.length < 100) {
|
||||
names.add(name)
|
||||
length += name.length
|
||||
} else if (length == 0) {
|
||||
names.add(name)
|
||||
length = name.length
|
||||
} else {
|
||||
LOGGER.debug(names.joinToString(", "))
|
||||
names.clear()
|
||||
length = 0
|
||||
}
|
||||
}
|
||||
|
||||
if (names.isNotEmpty()) {
|
||||
LOGGER.debug(names.joinToString(", "))
|
||||
}
|
||||
}
|
||||
|
||||
while (changes) {
|
||||
ops += cachedIterationResults.size
|
||||
cachedIterationResults = Reference2ObjectOpenHashMap()
|
||||
|
Loading…
Reference in New Issue
Block a user