Skip to content

Commit 49312a7

Browse files
committed
preprocess all states as they handle whether to break the existing block
1 parent 575926b commit 49312a7

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/main/kotlin/com/lambda/config/AutomationConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ open class AutomationConfig(
6262
name: String = module.name,
6363
edits: (AutomationConfig.() -> Unit)? = null
6464
) {
65-
defaultAutomationConfig = AutomationConfig("$name Automation Config").apply { edits?.invoke(this) }
65+
this.defaultAutomationConfig = AutomationConfig("$name Automation Config").apply { edits?.invoke(this) }
6666
}
6767

6868
fun MutableAutomationConfig.setDefaultAutomationConfig(

src/main/kotlin/com/lambda/interaction/construction/simulation/processing/ProcessorRegistry.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import com.lambda.context.AutomatedSafeContext
2121
import com.lambda.context.SafeContext
2222
import com.lambda.core.Loadable
2323
import com.lambda.interaction.construction.simulation.SimDsl
24-
import com.lambda.interaction.construction.simulation.processing.PreProcessingInfo.Companion.default
2524
import com.lambda.interaction.construction.verify.TargetState
2625
import com.lambda.util.reflections.getInstances
2726
import net.minecraft.block.BlockState
@@ -134,9 +133,7 @@ object ProcessorRegistry : Loadable {
134133
*/
135134
@SimDsl
136135
fun AutomatedSafeContext.getProcessingInfo(state: BlockState, targetState: TargetState, pos: BlockPos): PreProcessingData? {
137-
val targetBlockState = (targetState as? TargetState.State)?.blockState
138-
?: return PreProcessingData(default(targetState, pos), pos)
139-
136+
val targetBlockState = targetState.getState(pos)
140137
val processorCacheKey = state to targetBlockState
141138
val preProcessingInfo = processorCache.getOrElse(processorCacheKey) {
142139
preProcess(pos, state, targetBlockState, targetState.getStack(pos)).also { info ->

0 commit comments

Comments
 (0)