Move indirect computations behind seenItems
This commit is contained in:
parent
9592860349
commit
6d97731614
@ -28,18 +28,6 @@ fun addMatterData(provider: MatterDataProvider) {
|
|||||||
Items.OXIDIZED_CUT_COPPER,
|
Items.OXIDIZED_CUT_COPPER,
|
||||||
) to Items.CUT_COPPER,
|
) to Items.CUT_COPPER,
|
||||||
|
|
||||||
listOf(
|
|
||||||
Items.EXPOSED_CUT_COPPER_SLAB,
|
|
||||||
Items.WEATHERED_CUT_COPPER_SLAB,
|
|
||||||
Items.OXIDIZED_CUT_COPPER_SLAB,
|
|
||||||
) to Items.CUT_COPPER_SLAB,
|
|
||||||
|
|
||||||
listOf(
|
|
||||||
Items.EXPOSED_CUT_COPPER_STAIRS,
|
|
||||||
Items.WEATHERED_CUT_COPPER_STAIRS,
|
|
||||||
Items.OXIDIZED_CUT_COPPER_STAIRS,
|
|
||||||
) to Items.CUT_COPPER_STAIRS,
|
|
||||||
|
|
||||||
listOf(
|
listOf(
|
||||||
Items.WAXED_EXPOSED_COPPER,
|
Items.WAXED_EXPOSED_COPPER,
|
||||||
Items.WAXED_WEATHERED_COPPER,
|
Items.WAXED_WEATHERED_COPPER,
|
||||||
@ -51,18 +39,6 @@ fun addMatterData(provider: MatterDataProvider) {
|
|||||||
Items.WAXED_WEATHERED_CUT_COPPER,
|
Items.WAXED_WEATHERED_CUT_COPPER,
|
||||||
Items.WAXED_OXIDIZED_CUT_COPPER,
|
Items.WAXED_OXIDIZED_CUT_COPPER,
|
||||||
) to Items.WAXED_CUT_COPPER,
|
) to Items.WAXED_CUT_COPPER,
|
||||||
|
|
||||||
listOf(
|
|
||||||
Items.WAXED_EXPOSED_CUT_COPPER_SLAB,
|
|
||||||
Items.WAXED_WEATHERED_CUT_COPPER_SLAB,
|
|
||||||
Items.WAXED_OXIDIZED_CUT_COPPER_SLAB,
|
|
||||||
) to Items.WAXED_CUT_COPPER_SLAB,
|
|
||||||
|
|
||||||
listOf(
|
|
||||||
Items.WAXED_EXPOSED_CUT_COPPER_STAIRS,
|
|
||||||
Items.WAXED_WEATHERED_CUT_COPPER_STAIRS,
|
|
||||||
Items.WAXED_OXIDIZED_CUT_COPPER_STAIRS,
|
|
||||||
) to Items.WAXED_CUT_COPPER_STAIRS,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for ((children, parent) in copper) {
|
for ((children, parent) in copper) {
|
||||||
|
@ -679,12 +679,6 @@ object MatterManager {
|
|||||||
return Result(value2)
|
return Result(value2)
|
||||||
}
|
}
|
||||||
|
|
||||||
val value3 = Registry.indirect(item)
|
|
||||||
|
|
||||||
if (value3.value != null) {
|
|
||||||
return value3
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item in seenItems) {
|
if (item in seenItems) {
|
||||||
return Result.SKIPPED
|
return Result.SKIPPED
|
||||||
}
|
}
|
||||||
@ -692,6 +686,12 @@ object MatterManager {
|
|||||||
seenItems.addLast(item)
|
seenItems.addLast(item)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
val value3 = Registry.indirect(item)
|
||||||
|
|
||||||
|
if (value3.value != null) {
|
||||||
|
return value3
|
||||||
|
}
|
||||||
|
|
||||||
val result = doDetermineValue(item)
|
val result = doDetermineValue(item)
|
||||||
cachedIterationResults[item] = result
|
cachedIterationResults[item] = result
|
||||||
return result
|
return result
|
||||||
|
Loading…
Reference in New Issue
Block a user