1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-26 09:54:49 +00:00

Allow placing items against some blocks

We define a tag which allows specifying which blocks can be used. Right
now this is is just cauldrons and hives, as they have "placing into"
semantics.

Closes #1305. Many thanks to Lindsay-Needs-Sleep for their initial work
on this!

Fixes #1008. I believe also fixes #854.
This commit is contained in:
Jonathan Coates
2023-03-04 18:17:23 +00:00
parent 566315947b
commit 118d04f018
12 changed files with 65 additions and 33 deletions

View File

@@ -185,7 +185,7 @@ class Turtle_Test {
*
* Currently not required as turtles can no longer right-click cauldrons.
*/
@GameTest(required = false)
@GameTest
fun Cleaned_with_cauldrons(helper: GameTestHelper) = helper.sequence {
thenOnComputer {
val details = getTurtleItemDetail(1, true)

View File

@@ -23,6 +23,7 @@ import net.minecraft.gametest.framework.GameTestSequence
import org.apache.logging.log4j.LogManager
import java.io.InputStream
import java.util.*
import java.util.concurrent.CancellationException
import java.util.concurrent.ConcurrentLinkedDeque
import java.util.concurrent.atomic.AtomicReference
@@ -46,7 +47,7 @@ object ManagedComputers : ILuaMachine.Factory {
task()
monitor.result.set(Result.success(Unit))
} catch (e: Throwable) {
if (e !is AssertionError) LOGGER.error("Computer $label failed", e)
if (e !is AssertionError && e !is CancellationException) LOGGER.error("Computer $label failed", e)
monitor.result.set(Result.failure(e))
throw e
} finally {