Skip to content

Commit b458dd0

Browse files
committed
Merge branch '1.21.11' into improvement/container-utils-rework
2 parents 06d6296 + c65136d commit b458dd0

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
<img src="https://raw.githubusercontent.com/lambda-client/assets/main/lambda%20logo%20text.svg" style="width: 69%" alt="logo">
33
</p>
44

5-
![Minecraft](https://img.shields.io/badge/minecraft-1.21.5-green?link=https%3A%2F%2Fwww.minecraft.net%2F)
5+
![Minecraft](https://img.shields.io/badge/minecraft-1.21.11-green?link=https%3A%2F%2Fwww.minecraft.net%2F)
6+
![Minecraft](https://img.shields.io/badge/minecraft-1.21.5-red?link=https%3A%2F%2Fwww.minecraft.net%2F)
67
![GitHub Downloads](https://img.shields.io/github/downloads/lambda-client/lambda/total)
78
![Discord](https://img.shields.io/discord/834570721070022687?logo=Discord&logoColor=white&link=https%3A%2F%2Fdiscord.gg%2FMBAEzyFn)
89
![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/lambda-client/lambda?color=royalblue)
9-
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/lambda-client/lambda/build.yml?branch=1.21.5&logo=gradle)
10+
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/lambda-client/lambda/nightly_build.yml?logo=gradle)
1011
![GitHub Contributors](https://img.shields.io/github/contributors/lambda-client/lambda)
1112
![GitHub Repo Stars](https://img.shields.io/github/stars/lambda-client/lambda)
1213
![GitHub License](https://img.shields.io/github/license/lambda-client/lambda?logo=gplv3&link=https%3A%2F%2Fwww.gnu.org%2Flicenses%2Fgpl-3.0.en.html)
@@ -55,10 +56,13 @@ Find our backup matrix space at [\#lambda-client:matrix.org](https://app.element
5556

5657
## Installation
5758
<a href="https://fabricmc.net/wiki/install"><img src="https://cdn.jonasjones.dev/mod-badges/support-fabric.png" width="150px" alt="Fabric Supported"></a>
58-
1. Install Minecraft 1.21.5 [(download)](https://www.minecraft.net/)
59+
1. Install the Minecraft version corresponding to the mod release(download)](https://www.minecraft.net/)
5960
2. Install Fabric [(download)](https://fabricmc.net/use/installer/)
6061
3. Get the latest Lambda version here [(download)](https://github.com/lambda-client/lambda/releases/download/0.0.2%2B1.21.5/lambda-0.0.2+1.21.5.jar)
61-
4. Put the file in your `.minecraft/mods` folder
62+
4. Get the corresponding [Baritone](https://github.com/cabaletta/baritone/releases) api fabric build
63+
5. Get [Kotlin For Fabric](https://modrinth.com/mod/fabric-language-kotlin)
64+
6. Get the latest [Fabric API](https://modrinth.com/mod/fabric-api/) release
65+
7. Put the files in your `.minecraft/mods` folder
6266

6367
## Getting Started
6468

@@ -99,4 +103,4 @@ you can visit our [official Discord server](https://discord.gg/MBAEzyFn).
99103

100104
> ### Disclaimer
101105
> Lambda is not affiliated with Mojang Studios. Minecraft is a registered trademark of Mojang Studios.
102-
Use of the Lambda software is subject to the terms outlined in the license agreement [GNU General Public License v3.0](https://github.com/lambda-client/lambda/blob/master/LICENSE.md).
106+
Use of the Lambda software is subject to the terms outlined in the license agreement [GNU General Public License v3.0](https://github.com/lambda-client/lambda/blob/master/LICENSE.md).

src/main/kotlin/com/lambda/interaction/construction/simulation/SimInfo.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ interface SimInfo : Automated {
6868
pov,
6969
Stack(),
7070
concurrentResults
71-
).takeIf { it.hasBasicRequirements() }?.sim()
71+
).takeIf { it?.hasBasicRequirements() == true }?.sim()
7272

7373
/**
7474
* Creates a new [SimInfo] using the current [SimInfo]'s [dependencyStack] and [concurrentResults],
@@ -89,7 +89,7 @@ interface SimInfo : Automated {
8989
pov,
9090
Stack<Sim<*>>().apply { addAll(dependencyStack) },
9191
concurrentResults
92-
).takeIf { it.hasBasicRequirements() }?.sim()
92+
).takeIf { it?.hasBasicRequirements() == true }?.sim()
9393

9494
@SimDsl
9595
private fun AutomatedSafeContext.getTypedInfo(
@@ -99,10 +99,11 @@ interface SimInfo : Automated {
9999
pov: Vec3d,
100100
dependencyStack: Stack<Sim<*>>,
101101
concurrentResults: MutableSet<BuildResult>
102-
): SimInfo {
102+
): SimInfo? {
103103
if (!targetState.isEmpty()) {
104104
getProcessingInfo(state, targetState, pos)?.let { preProcessing ->
105-
return object : InteractSimInfo, Automated by this {
105+
return if (preProcessing.info.omitInteraction) null
106+
else object : InteractSimInfo, Automated by this {
106107
override val pos = pos
107108
override val state = state
108109
override val targetState = targetState

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ interface PreProcessingInfo {
3535
val placing: Boolean
3636
val sneak: Boolean?
3737
val noCaching: Boolean
38+
val omitInteraction: Boolean
3839

3940
companion object {
4041
context(_: AutomatedSafeContext)
@@ -47,6 +48,7 @@ interface PreProcessingInfo {
4748
override val placing = true
4849
override val sneak = null
4950
override val noCaching = true
51+
override val omitInteraction = false
5052
}
5153
}
5254
}
@@ -60,7 +62,7 @@ class PreProcessingInfoAccumulator(
6062
override var placing: Boolean = true,
6163
override var sneak: Boolean? = null,
6264
override var noCaching: Boolean = false,
63-
var omitInteraction: Boolean = false
65+
override var omitInteraction: Boolean = false
6466
) : PreProcessingInfo {
6567
@InfoAccumulator
6668
fun offerSurfaceScan(scan: SurfaceScan) {

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ object ProcessorRegistry : Loadable {
139139
preProcess(pos, state, targetBlockState, targetState.getStack(pos)).also { info ->
140140
if (info?.noCaching != true) processorCache[processorCacheKey] = info
141141
}
142-
}
142+
} ?: return null
143143

144-
return PreProcessingData(preProcessingInfo ?: return null, pos)
144+
return PreProcessingData(preProcessingInfo, pos)
145145
}
146146

147147
context(safeContext: SafeContext)
@@ -153,7 +153,7 @@ object ProcessorRegistry : Loadable {
153153
with(processor) { preProcess(state, targetState, pos) }
154154
}
155155
}
156-
if (!stateProcessing) {
156+
if (!stateProcessing && !omitInteraction) {
157157
if (state.block != expectedState.block) {
158158
if (!state.isReplaceable) return@run null
159159
propertyPreProcessors.forEach { processor ->
@@ -169,7 +169,6 @@ object ProcessorRegistry : Loadable {
169169
if (!state.matches(targetState, ignore)) return@run null
170170
}
171171
}
172-
if (omitInteraction) return@run null
173172
complete()
174173
}
175174
}

0 commit comments

Comments
 (0)