mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-27 03:47:38 +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:
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
DataVersion: 2730,
|
||||
DataVersion: 3218,
|
||||
size: [3, 3, 3],
|
||||
data: [
|
||||
{pos: [0, 0, 0], state: "minecraft:polished_andesite"},
|
||||
@@ -15,7 +15,7 @@
|
||||
{pos: [0, 1, 1], state: "minecraft:air"},
|
||||
{pos: [0, 1, 2], state: "minecraft:air"},
|
||||
{pos: [1, 1, 0], state: "computercraft:turtle_normal{facing:south,waterlogged:false}", nbt: {ComputerId: 1, Fuel: 0, Items: [{Count: 1b, Slot: 0b, id: "computercraft:turtle_normal", tag: {Color: 13388876, ComputerId: 0, display: {Name: '{"text":"Clean turtle"}'}}}], Label: "turtle_test.cleaned_with_cauldrons", On: 1b, Owner: {LowerId: -6876936588741668278L, Name: "Dev", UpperId: 4039158846114182220L}, Slot: 0, id: "computercraft:turtle_normal"}},
|
||||
{pos: [1, 1, 1], state: "minecraft:cauldron{level:3}"},
|
||||
{pos: [1, 1, 1], state: "minecraft:water_cauldron{level:3}"},
|
||||
{pos: [1, 1, 2], state: "minecraft:air"},
|
||||
{pos: [2, 1, 0], state: "minecraft:air"},
|
||||
{pos: [2, 1, 1], state: "minecraft:air"},
|
||||
@@ -33,8 +33,8 @@
|
||||
entities: [],
|
||||
palette: [
|
||||
"minecraft:polished_andesite",
|
||||
"computercraft:turtle_normal{facing:south,waterlogged:false}",
|
||||
"minecraft:air",
|
||||
"minecraft:cauldron{level:3}"
|
||||
"minecraft:water_cauldron{level:3}",
|
||||
"computercraft:turtle_normal{facing:south,waterlogged:false}"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user