diff --git a/src/main/java/dan200/computercraft/shared/turtle/core/TurtleCompareCommand.java b/src/main/java/dan200/computercraft/shared/turtle/core/TurtleCompareCommand.java index ab5f895ef..4ab393971 100644 --- a/src/main/java/dan200/computercraft/shared/turtle/core/TurtleCompareCommand.java +++ b/src/main/java/dan200/computercraft/shared/turtle/core/TurtleCompareCommand.java @@ -52,19 +52,6 @@ public class TurtleCompareCommand implements ITurtleCommand Block lookAtBlock = lookAtState.getBlock(); if( !lookAtBlock.isAir( lookAtState, world, newPosition ) ) { - // Try getSilkTouchDrop first - if( !lookAtBlock.hasTileEntity( lookAtState ) ) - { - try - { - Method method = ObfuscationReflectionHelper.findMethod( Block.class, "func_180643_i", BlockState.class ); - lookAtStack = (ItemStack) method.invoke( lookAtBlock, lookAtState ); - } - catch( ReflectiveOperationException | RuntimeException ignored ) - { - } - } - // See if the block drops anything with the same ID as itself // (try 5 times to try and beat random number generators) for( int i = 0; i < 5 && lookAtStack.isEmpty(); i++ ) diff --git a/src/test/java/dan200/computercraft/ingame/ComputerTest.kt b/src/test/java/dan200/computercraft/ingame/ComputerTest.kt index 48cd70204..4cbe70dc9 100644 --- a/src/test/java/dan200/computercraft/ingame/ComputerTest.kt +++ b/src/test/java/dan200/computercraft/ingame/ComputerTest.kt @@ -10,7 +10,7 @@ class ComputerTest { /** * Ensures redstone signals do not travel through computers. * - * @see [Issue #548](https://github.com/SquidDev-CC/CC-Tweaked/issues/548) + * @see [#548](https://github.com/SquidDev-CC/CC-Tweaked/issues/548) */ @GameTest suspend fun `No through signal`(context: TestContext) { diff --git a/src/test/java/dan200/computercraft/ingame/DiskDriveTest.kt b/src/test/java/dan200/computercraft/ingame/DiskDriveTest.kt new file mode 100644 index 000000000..e05dfd4b8 --- /dev/null +++ b/src/test/java/dan200/computercraft/ingame/DiskDriveTest.kt @@ -0,0 +1,27 @@ +package dan200.computercraft.ingame + +import dan200.computercraft.ingame.api.* +import net.minecraft.entity.item.ItemEntity +import net.minecraft.item.Items +import net.minecraft.util.math.BlockPos +import org.junit.jupiter.api.Assertions.assertEquals + +class DiskDriveTest { + /** + * Ensure audio disks exist and we can play them. + * + * @see [#688](https://github.com/SquidDev-CC/CC-Tweaked/issues/688) + */ + @GameTest + suspend fun `Audio disk`(context: TestContext) = context.checkComputerOk(3) + + @GameTest + suspend fun `Ejects disk`(context: TestContext) { + val stackAt = BlockPos(2, 0, 2) + context.checkComputerOk(4) + context.waitUntil { context.getEntity(stackAt) != null } + + val stack = context.getEntityOfType(stackAt)!! + assertEquals(Items.MUSIC_DISC_13, stack.item.item, "Correct item stack") + } +} diff --git a/src/test/java/dan200/computercraft/ingame/TurtleTest.kt b/src/test/java/dan200/computercraft/ingame/TurtleTest.kt index 37102388b..9f00e29ff 100644 --- a/src/test/java/dan200/computercraft/ingame/TurtleTest.kt +++ b/src/test/java/dan200/computercraft/ingame/TurtleTest.kt @@ -7,4 +7,44 @@ import dan200.computercraft.ingame.api.checkComputerOk class TurtleTest { @GameTest(required = false) suspend fun `Unequip refreshes peripheral`(context: TestContext) = context.checkComputerOk(1) + + /** + * Checks turtles can sheer sheep (and drop items) + * + * @see [#537](https://github.com/SquidDev-CC/CC-Tweaked/issues/537) + */ + @GameTest(required = false) + suspend fun `Shears sheep`(context: TestContext) = context.checkComputerOk(5) + + /** + * Checks turtles can place lava. + * + * @see [#518](https://github.com/SquidDev-CC/CC-Tweaked/issues/518) + */ + @GameTest(required = false) + suspend fun `Place lava`(context: TestContext) = context.checkComputerOk(5) + + /** + * Checks turtles can place when waterlogged. + * + * @see [#385](https://github.com/SquidDev-CC/CC-Tweaked/issues/385) + */ + @GameTest(required = false) + suspend fun `Place waterlogged`(context: TestContext) = context.checkComputerOk(7) + + /** + * Checks turtles can place when waterlogged. + * + * @see [#297](https://github.com/SquidDev-CC/CC-Tweaked/issues/297) + */ + @GameTest(required = false) + suspend fun `Gather lava`(context: TestContext) = context.checkComputerOk(8) + + /** + * Checks turtles can place when waterlogged. + * + * @see [#258](https://github.com/SquidDev-CC/CC-Tweaked/issues/258) + */ + @GameTest(required = false) + suspend fun `Hoe dirt`(context: TestContext) = context.checkComputerOk(9) } diff --git a/src/test/java/dan200/computercraft/ingame/api/TestExtensions.kt b/src/test/java/dan200/computercraft/ingame/api/TestExtensions.kt index 963addb55..aca550400 100644 --- a/src/test/java/dan200/computercraft/ingame/api/TestExtensions.kt +++ b/src/test/java/dan200/computercraft/ingame/api/TestExtensions.kt @@ -3,6 +3,9 @@ package dan200.computercraft.ingame.api import kotlinx.coroutines.CancellationException import kotlinx.coroutines.delay import net.minecraft.block.BlockState +import net.minecraft.entity.Entity +import net.minecraft.tileentity.TileEntity +import net.minecraft.util.math.AxisAlignedBB import net.minecraft.util.math.BlockPos /** @@ -37,7 +40,7 @@ suspend fun TestContext.sleep(ticks: Int = 1) { waitUntil { tracker.level.gameTime >= target } } -private fun TestContext.offset(pos: BlockPos): BlockPos = tracker.testPos.offset(pos.x, pos.y + 2, pos.z) +fun TestContext.offset(pos: BlockPos): BlockPos = tracker.testPos.offset(pos.x, pos.y + 2, pos.z) /** * Get a block within the test structure. @@ -59,3 +62,24 @@ fun TestContext.modifyBlock(pos: BlockPos, modify: (BlockState) -> BlockState) { val offset = offset(pos) level.setBlockAndUpdate(offset, modify(level.getBlockState(offset))) } + +/** + * Get a tile within the test structure. + */ +fun TestContext.getTile(pos: BlockPos): TileEntity? = tracker.level.getBlockEntity(offset(pos)) + +/** + * Get an entity within the test structure. + */ +fun TestContext.getEntity(pos: BlockPos): Entity? { + val entities = tracker.level.getEntitiesOfClass(Entity::class.java, AxisAlignedBB(offset(pos))) + return if (entities.isEmpty()) null else entities.get(0) +} + +/** + * Get an entity within the test structure. + */ +inline fun TestContext.getEntityOfType(pos: BlockPos): T? { + val entities = tracker.level.getEntitiesOfClass(T::class.java, AxisAlignedBB(offset(pos))) + return if (entities.isEmpty()) null else entities.get(0) +} diff --git a/src/test/resources/data/computercraft/lua/rom/autorun/cctest.lua b/src/test/resources/data/computercraft/lua/rom/autorun/cctest.lua index 1b4f6d778..197748f4d 100644 --- a/src/test/resources/data/computercraft/lua/rom/autorun/cctest.lua +++ b/src/test/resources/data/computercraft/lua/rom/autorun/cctest.lua @@ -1,6 +1,6 @@ --- Extend the test API with some convenience functions. -- --- It's much easier to declare these in Lua rather than Java. +-- It's much easier to declare these in Lua rather than Java.. function test.assert(ok, ...) if ok then return ... end diff --git a/src/test/server-files/computers/computer/1/startup.lua b/src/test/server-files/computers/computer/1/startup.lua index ac2e8f8f5..bb484e104 100644 --- a/src/test/server-files/computers/computer/1/startup.lua +++ b/src/test/server-files/computers/computer/1/startup.lua @@ -1,3 +1,5 @@ +-- TurtleTest.`Unequip refreshes peripheral` + test.eq("modem", peripheral.getType("right"), "Starts with a modem") turtle.equipRight() test.eq("drive", peripheral.getType("right"), "Unequipping gives a drive") diff --git a/src/test/server-files/computers/computer/3/startup.lua b/src/test/server-files/computers/computer/3/startup.lua new file mode 100644 index 000000000..3f25520f6 --- /dev/null +++ b/src/test/server-files/computers/computer/3/startup.lua @@ -0,0 +1,5 @@ +-- DiskDriveTest.`Audio disk` + +test.eq(true, disk.hasAudio("right"), "Has audio") +test.eq("C418 - 13", disk.getAudioTitle("right"), "Audio title") +test.ok() diff --git a/src/test/server-files/computers/computer/4/startup.lua b/src/test/server-files/computers/computer/4/startup.lua new file mode 100644 index 000000000..34214d536 --- /dev/null +++ b/src/test/server-files/computers/computer/4/startup.lua @@ -0,0 +1,4 @@ +-- DiskDriveTest.`Ejects disk` + +disk.eject("right") +test.ok() diff --git a/src/test/server-files/computers/computer/5/startup.lua b/src/test/server-files/computers/computer/5/startup.lua new file mode 100644 index 000000000..8efbb30ab --- /dev/null +++ b/src/test/server-files/computers/computer/5/startup.lua @@ -0,0 +1,9 @@ +-- TurtleTest.`Shears sheep` + +turtle.placeDown() + +local item = turtle.getItemDetail(2) +if item == nil then test.fail("Got no item") end +test.eq("minecraft:white_wool", item.name) + +test.ok() diff --git a/src/test/server-files/computers/computer/6/startup.lua b/src/test/server-files/computers/computer/6/startup.lua new file mode 100644 index 000000000..584bffdce --- /dev/null +++ b/src/test/server-files/computers/computer/6/startup.lua @@ -0,0 +1,9 @@ +-- TurtleTest.`Lava place` + +test.assert(turtle.placeDown()) + +local ok, down = turtle.inspectDown() +test.assert(ok, "Has below") +test.eq("minecraft:lava", down.name, "Is lava") + +test.ok() diff --git a/src/test/server-files/computers/computer/7/startup.lua b/src/test/server-files/computers/computer/7/startup.lua new file mode 100644 index 000000000..8f135bf73 --- /dev/null +++ b/src/test/server-files/computers/computer/7/startup.lua @@ -0,0 +1,10 @@ +-- TurtleTest.`Place Waterlogged` + +test.assert(turtle.place()) + +local has_block, block = turtle.inspect() +test.eq(true, has_block, "Has block") +test.eq("minecraft:oak_fence", block.name) +test.eq(true, block.state.waterlogged) + +test.ok() diff --git a/src/test/server-files/computers/computer/8/startup.lua b/src/test/server-files/computers/computer/8/startup.lua new file mode 100644 index 000000000..a3c105c80 --- /dev/null +++ b/src/test/server-files/computers/computer/8/startup.lua @@ -0,0 +1,11 @@ +-- TurtleTest.`Gather lava` + +turtle.placeDown() + +local item = turtle.getItemDetail() +test.eq("minecraft:lava_bucket", item.name) + +local has_down, down = turtle.inspectDown() +test.eq(false, has_down, "Air below") + +test.ok() diff --git a/src/test/server-files/computers/computer/9/startup.lua b/src/test/server-files/computers/computer/9/startup.lua new file mode 100644 index 000000000..0e80cd606 --- /dev/null +++ b/src/test/server-files/computers/computer/9/startup.lua @@ -0,0 +1,9 @@ +-- Turtle.`Hoe dirt` + +test.assert(turtle.dig()) + +local has_block, block = turtle.inspect() +test.assert(has_block, "Has block") +test.eq("minecraft:farmland", block.name) + +test.ok() diff --git a/src/test/server-files/computers/ids.json b/src/test/server-files/computers/ids.json index 234976137..87dab4f96 100644 --- a/src/test/server-files/computers/ids.json +++ b/src/test/server-files/computers/ids.json @@ -1,3 +1,3 @@ { - "computer": 2 -} + "computer": 9 +} \ No newline at end of file diff --git a/src/test/server-files/structures/disk_drive_test.audio_disk.snbt b/src/test/server-files/structures/disk_drive_test.audio_disk.snbt new file mode 100644 index 000000000..f4ccc9e0c --- /dev/null +++ b/src/test/server-files/structures/disk_drive_test.audio_disk.snbt @@ -0,0 +1,149 @@ +{ + size: [3, 3, 3], + entities: [], + blocks: [ + { + pos: [0, 0, 0], + state: 0 + }, + { + pos: [1, 0, 0], + state: 0 + }, + { + pos: [2, 0, 0], + state: 0 + }, + { + pos: [0, 0, 1], + state: 0 + }, + { + pos: [1, 0, 1], + state: 0 + }, + { + pos: [2, 0, 1], + state: 0 + }, + { + pos: [0, 0, 2], + state: 0 + }, + { + pos: [1, 0, 2], + state: 0 + }, + { + pos: [2, 0, 2], + state: 0 + }, + { + nbt: { + Item: { + id: "minecraft:music_disc_13", + Count: 1b + }, + id: "computercraft:disk_drive" + }, + pos: [0, 1, 1], + state: 1 + }, + { + nbt: { + id: "computercraft:computer_advanced", + ComputerId: 3, + On: 1b + }, + pos: [1, 1, 1], + state: 2 + }, + { + pos: [0, 1, 0], + state: 3 + }, + { + pos: [1, 1, 0], + state: 3 + }, + { + pos: [2, 1, 0], + state: 3 + }, + { + pos: [0, 2, 0], + state: 3 + }, + { + pos: [1, 2, 0], + state: 3 + }, + { + pos: [2, 2, 0], + state: 3 + }, + { + pos: [2, 1, 1], + state: 3 + }, + { + pos: [0, 2, 1], + state: 3 + }, + { + pos: [1, 2, 1], + state: 3 + }, + { + pos: [2, 2, 1], + state: 3 + }, + { + pos: [0, 1, 2], + state: 3 + }, + { + pos: [1, 1, 2], + state: 3 + }, + { + pos: [2, 1, 2], + state: 3 + }, + { + pos: [0, 2, 2], + state: 3 + }, + { + pos: [1, 2, 2], + state: 3 + }, + { + pos: [2, 2, 2], + state: 3 + } + ], + palette: [ + { + Name: "minecraft:polished_andesite" + }, + { + Properties: { + facing: "north", + state: "full" + }, + Name: "computercraft:disk_drive" + }, + { + Properties: { + facing: "north", + state: "blinking" + }, + Name: "computercraft:computer_advanced" + }, + { + Name: "minecraft:air" + } + ], + DataVersion: 2230 +} diff --git a/src/test/server-files/structures/disk_drive_test.ejects_disk.snbt b/src/test/server-files/structures/disk_drive_test.ejects_disk.snbt new file mode 100644 index 000000000..27906efe0 --- /dev/null +++ b/src/test/server-files/structures/disk_drive_test.ejects_disk.snbt @@ -0,0 +1,544 @@ +{ + size: [5, 5, 5], + entities: [], + blocks: [ + { + pos: [0, 0, 0], + state: 0 + }, + { + pos: [1, 0, 0], + state: 0 + }, + { + pos: [2, 0, 0], + state: 0 + }, + { + pos: [3, 0, 0], + state: 0 + }, + { + pos: [4, 0, 0], + state: 0 + }, + { + pos: [0, 0, 1], + state: 0 + }, + { + pos: [1, 0, 1], + state: 0 + }, + { + pos: [2, 0, 1], + state: 0 + }, + { + pos: [3, 0, 1], + state: 0 + }, + { + pos: [4, 0, 1], + state: 0 + }, + { + pos: [1, 1, 1], + state: 1 + }, + { + pos: [1, 2, 1], + state: 1 + }, + { + pos: [2, 2, 1], + state: 1 + }, + { + pos: [3, 2, 1], + state: 1 + }, + { + pos: [0, 0, 2], + state: 0 + }, + { + pos: [1, 0, 2], + state: 0 + }, + { + pos: [2, 0, 2], + state: 0 + }, + { + pos: [3, 0, 2], + state: 0 + }, + { + pos: [4, 0, 2], + state: 0 + }, + { + pos: [1, 1, 2], + state: 1 + }, + { + pos: [3, 1, 2], + state: 1 + }, + { + pos: [1, 2, 2], + state: 1 + }, + { + pos: [3, 2, 2], + state: 1 + }, + { + pos: [0, 0, 3], + state: 0 + }, + { + pos: [1, 0, 3], + state: 0 + }, + { + pos: [2, 0, 3], + state: 0 + }, + { + pos: [3, 0, 3], + state: 0 + }, + { + pos: [4, 0, 3], + state: 0 + }, + { + pos: [1, 1, 3], + state: 1 + }, + { + pos: [2, 1, 3], + state: 1 + }, + { + pos: [3, 1, 3], + state: 1 + }, + { + pos: [1, 2, 3], + state: 1 + }, + { + pos: [2, 2, 3], + state: 1 + }, + { + pos: [3, 2, 3], + state: 1 + }, + { + pos: [0, 0, 4], + state: 0 + }, + { + pos: [1, 0, 4], + state: 0 + }, + { + pos: [2, 0, 4], + state: 0 + }, + { + pos: [3, 0, 4], + state: 0 + }, + { + pos: [4, 0, 4], + state: 0 + }, + { + nbt: { + Item: { + id: "minecraft:music_disc_13", + Count: 1b + }, + id: "computercraft:disk_drive" + }, + pos: [2, 1, 1], + state: 2 + }, + { + nbt: { + id: "computercraft:computer_advanced", + ComputerId: 4, + On: 1b + }, + pos: [3, 1, 1], + state: 3 + }, + { + pos: [0, 1, 0], + state: 4 + }, + { + pos: [1, 1, 0], + state: 4 + }, + { + pos: [2, 1, 0], + state: 4 + }, + { + pos: [3, 1, 0], + state: 4 + }, + { + pos: [4, 1, 0], + state: 4 + }, + { + pos: [0, 2, 0], + state: 4 + }, + { + pos: [1, 2, 0], + state: 4 + }, + { + pos: [2, 2, 0], + state: 4 + }, + { + pos: [3, 2, 0], + state: 4 + }, + { + pos: [4, 2, 0], + state: 4 + }, + { + pos: [0, 3, 0], + state: 4 + }, + { + pos: [1, 3, 0], + state: 4 + }, + { + pos: [2, 3, 0], + state: 4 + }, + { + pos: [3, 3, 0], + state: 4 + }, + { + pos: [4, 3, 0], + state: 4 + }, + { + pos: [0, 4, 0], + state: 4 + }, + { + pos: [1, 4, 0], + state: 4 + }, + { + pos: [2, 4, 0], + state: 4 + }, + { + pos: [3, 4, 0], + state: 4 + }, + { + pos: [4, 4, 0], + state: 4 + }, + { + pos: [0, 1, 1], + state: 4 + }, + { + pos: [4, 1, 1], + state: 4 + }, + { + pos: [0, 2, 1], + state: 4 + }, + { + pos: [4, 2, 1], + state: 4 + }, + { + pos: [0, 3, 1], + state: 4 + }, + { + pos: [1, 3, 1], + state: 4 + }, + { + pos: [2, 3, 1], + state: 4 + }, + { + pos: [3, 3, 1], + state: 4 + }, + { + pos: [4, 3, 1], + state: 4 + }, + { + pos: [0, 4, 1], + state: 4 + }, + { + pos: [1, 4, 1], + state: 4 + }, + { + pos: [2, 4, 1], + state: 4 + }, + { + pos: [3, 4, 1], + state: 4 + }, + { + pos: [4, 4, 1], + state: 4 + }, + { + pos: [0, 1, 2], + state: 4 + }, + { + pos: [2, 1, 2], + state: 4 + }, + { + pos: [4, 1, 2], + state: 4 + }, + { + pos: [0, 2, 2], + state: 4 + }, + { + pos: [2, 2, 2], + state: 4 + }, + { + pos: [4, 2, 2], + state: 4 + }, + { + pos: [0, 3, 2], + state: 4 + }, + { + pos: [1, 3, 2], + state: 4 + }, + { + pos: [2, 3, 2], + state: 4 + }, + { + pos: [3, 3, 2], + state: 4 + }, + { + pos: [4, 3, 2], + state: 4 + }, + { + pos: [0, 4, 2], + state: 4 + }, + { + pos: [1, 4, 2], + state: 4 + }, + { + pos: [2, 4, 2], + state: 4 + }, + { + pos: [3, 4, 2], + state: 4 + }, + { + pos: [4, 4, 2], + state: 4 + }, + { + pos: [0, 1, 3], + state: 4 + }, + { + pos: [4, 1, 3], + state: 4 + }, + { + pos: [0, 2, 3], + state: 4 + }, + { + pos: [4, 2, 3], + state: 4 + }, + { + pos: [0, 3, 3], + state: 4 + }, + { + pos: [1, 3, 3], + state: 4 + }, + { + pos: [2, 3, 3], + state: 4 + }, + { + pos: [3, 3, 3], + state: 4 + }, + { + pos: [4, 3, 3], + state: 4 + }, + { + pos: [0, 4, 3], + state: 4 + }, + { + pos: [1, 4, 3], + state: 4 + }, + { + pos: [2, 4, 3], + state: 4 + }, + { + pos: [3, 4, 3], + state: 4 + }, + { + pos: [4, 4, 3], + state: 4 + }, + { + pos: [0, 1, 4], + state: 4 + }, + { + pos: [1, 1, 4], + state: 4 + }, + { + pos: [2, 1, 4], + state: 4 + }, + { + pos: [3, 1, 4], + state: 4 + }, + { + pos: [4, 1, 4], + state: 4 + }, + { + pos: [0, 2, 4], + state: 4 + }, + { + pos: [1, 2, 4], + state: 4 + }, + { + pos: [2, 2, 4], + state: 4 + }, + { + pos: [3, 2, 4], + state: 4 + }, + { + pos: [4, 2, 4], + state: 4 + }, + { + pos: [0, 3, 4], + state: 4 + }, + { + pos: [1, 3, 4], + state: 4 + }, + { + pos: [2, 3, 4], + state: 4 + }, + { + pos: [3, 3, 4], + state: 4 + }, + { + pos: [4, 3, 4], + state: 4 + }, + { + pos: [0, 4, 4], + state: 4 + }, + { + pos: [1, 4, 4], + state: 4 + }, + { + pos: [2, 4, 4], + state: 4 + }, + { + pos: [3, 4, 4], + state: 4 + }, + { + pos: [4, 4, 4], + state: 4 + } + ], + palette: [ + { + Name: "minecraft:polished_andesite" + }, + { + Name: "minecraft:white_stained_glass" + }, + { + Properties: { + facing: "south", + state: "full" + }, + Name: "computercraft:disk_drive" + }, + { + Properties: { + facing: "north", + state: "blinking" + }, + Name: "computercraft:computer_advanced" + }, + { + Name: "minecraft:air" + } + ], + DataVersion: 2230 +} diff --git a/src/test/server-files/structures/turtle_test.gather_lava.snbt b/src/test/server-files/structures/turtle_test.gather_lava.snbt new file mode 100644 index 000000000..1b51705ec --- /dev/null +++ b/src/test/server-files/structures/turtle_test.gather_lava.snbt @@ -0,0 +1,550 @@ +{ + size: [5, 5, 5], + entities: [], + blocks: [ + { + pos: [0, 0, 0], + state: 0 + }, + { + pos: [1, 0, 0], + state: 0 + }, + { + pos: [2, 0, 0], + state: 0 + }, + { + pos: [3, 0, 0], + state: 0 + }, + { + pos: [4, 0, 0], + state: 0 + }, + { + pos: [0, 0, 1], + state: 0 + }, + { + pos: [1, 0, 1], + state: 0 + }, + { + pos: [2, 0, 1], + state: 0 + }, + { + pos: [3, 0, 1], + state: 0 + }, + { + pos: [4, 0, 1], + state: 0 + }, + { + pos: [1, 1, 1], + state: 1 + }, + { + pos: [2, 1, 1], + state: 1 + }, + { + pos: [3, 1, 1], + state: 1 + }, + { + pos: [0, 0, 2], + state: 0 + }, + { + pos: [1, 0, 2], + state: 0 + }, + { + pos: [2, 0, 2], + state: 0 + }, + { + pos: [3, 0, 2], + state: 0 + }, + { + pos: [4, 0, 2], + state: 0 + }, + { + pos: [1, 1, 2], + state: 1 + }, + { + pos: [3, 1, 2], + state: 1 + }, + { + pos: [0, 0, 3], + state: 0 + }, + { + pos: [1, 0, 3], + state: 0 + }, + { + pos: [2, 0, 3], + state: 0 + }, + { + pos: [3, 0, 3], + state: 0 + }, + { + pos: [4, 0, 3], + state: 0 + }, + { + pos: [1, 1, 3], + state: 1 + }, + { + pos: [2, 1, 3], + state: 1 + }, + { + pos: [3, 1, 3], + state: 1 + }, + { + pos: [0, 0, 4], + state: 0 + }, + { + pos: [1, 0, 4], + state: 0 + }, + { + pos: [2, 0, 4], + state: 0 + }, + { + pos: [3, 0, 4], + state: 0 + }, + { + pos: [4, 0, 4], + state: 0 + }, + { + nbt: { + Owner: { + UpperId: 4039158846114182220L, + LowerId: -6876936588741668278L, + Name: "Dev" + }, + Fuel: 0, + Slot: 0, + Items: [ + { + Slot: 0b, + id: "minecraft:bucket", + Count: 1b + } + ], + id: "computercraft:turtle_normal", + ComputerId: 8, + On: 1b + }, + pos: [2, 2, 2], + state: 2 + }, + { + pos: [0, 1, 0], + state: 3 + }, + { + pos: [1, 1, 0], + state: 3 + }, + { + pos: [2, 1, 0], + state: 3 + }, + { + pos: [3, 1, 0], + state: 3 + }, + { + pos: [4, 1, 0], + state: 3 + }, + { + pos: [0, 2, 0], + state: 3 + }, + { + pos: [1, 2, 0], + state: 3 + }, + { + pos: [2, 2, 0], + state: 3 + }, + { + pos: [3, 2, 0], + state: 3 + }, + { + pos: [4, 2, 0], + state: 3 + }, + { + pos: [0, 3, 0], + state: 3 + }, + { + pos: [1, 3, 0], + state: 3 + }, + { + pos: [2, 3, 0], + state: 3 + }, + { + pos: [3, 3, 0], + state: 3 + }, + { + pos: [4, 3, 0], + state: 3 + }, + { + pos: [0, 4, 0], + state: 3 + }, + { + pos: [1, 4, 0], + state: 3 + }, + { + pos: [2, 4, 0], + state: 3 + }, + { + pos: [3, 4, 0], + state: 3 + }, + { + pos: [4, 4, 0], + state: 3 + }, + { + pos: [0, 1, 1], + state: 3 + }, + { + pos: [4, 1, 1], + state: 3 + }, + { + pos: [0, 2, 1], + state: 3 + }, + { + pos: [1, 2, 1], + state: 3 + }, + { + pos: [2, 2, 1], + state: 3 + }, + { + pos: [3, 2, 1], + state: 3 + }, + { + pos: [4, 2, 1], + state: 3 + }, + { + pos: [0, 3, 1], + state: 3 + }, + { + pos: [1, 3, 1], + state: 3 + }, + { + pos: [2, 3, 1], + state: 3 + }, + { + pos: [3, 3, 1], + state: 3 + }, + { + pos: [4, 3, 1], + state: 3 + }, + { + pos: [0, 4, 1], + state: 3 + }, + { + pos: [1, 4, 1], + state: 3 + }, + { + pos: [2, 4, 1], + state: 3 + }, + { + pos: [3, 4, 1], + state: 3 + }, + { + pos: [4, 4, 1], + state: 3 + }, + { + pos: [0, 1, 2], + state: 3 + }, + { + pos: [2, 1, 2], + state: 4 + }, + { + pos: [4, 1, 2], + state: 3 + }, + { + pos: [0, 2, 2], + state: 3 + }, + { + pos: [1, 2, 2], + state: 3 + }, + { + pos: [3, 2, 2], + state: 3 + }, + { + pos: [4, 2, 2], + state: 3 + }, + { + pos: [0, 3, 2], + state: 3 + }, + { + pos: [1, 3, 2], + state: 3 + }, + { + pos: [2, 3, 2], + state: 3 + }, + { + pos: [3, 3, 2], + state: 3 + }, + { + pos: [4, 3, 2], + state: 3 + }, + { + pos: [0, 4, 2], + state: 3 + }, + { + pos: [1, 4, 2], + state: 3 + }, + { + pos: [2, 4, 2], + state: 3 + }, + { + pos: [3, 4, 2], + state: 3 + }, + { + pos: [4, 4, 2], + state: 3 + }, + { + pos: [0, 1, 3], + state: 3 + }, + { + pos: [4, 1, 3], + state: 3 + }, + { + pos: [0, 2, 3], + state: 3 + }, + { + pos: [1, 2, 3], + state: 3 + }, + { + pos: [2, 2, 3], + state: 3 + }, + { + pos: [3, 2, 3], + state: 3 + }, + { + pos: [4, 2, 3], + state: 3 + }, + { + pos: [0, 3, 3], + state: 3 + }, + { + pos: [1, 3, 3], + state: 3 + }, + { + pos: [2, 3, 3], + state: 3 + }, + { + pos: [3, 3, 3], + state: 3 + }, + { + pos: [4, 3, 3], + state: 3 + }, + { + pos: [0, 4, 3], + state: 3 + }, + { + pos: [1, 4, 3], + state: 3 + }, + { + pos: [2, 4, 3], + state: 3 + }, + { + pos: [3, 4, 3], + state: 3 + }, + { + pos: [4, 4, 3], + state: 3 + }, + { + pos: [0, 1, 4], + state: 3 + }, + { + pos: [1, 1, 4], + state: 3 + }, + { + pos: [2, 1, 4], + state: 3 + }, + { + pos: [3, 1, 4], + state: 3 + }, + { + pos: [4, 1, 4], + state: 3 + }, + { + pos: [0, 2, 4], + state: 3 + }, + { + pos: [1, 2, 4], + state: 3 + }, + { + pos: [2, 2, 4], + state: 3 + }, + { + pos: [3, 2, 4], + state: 3 + }, + { + pos: [4, 2, 4], + state: 3 + }, + { + pos: [0, 3, 4], + state: 3 + }, + { + pos: [1, 3, 4], + state: 3 + }, + { + pos: [2, 3, 4], + state: 3 + }, + { + pos: [3, 3, 4], + state: 3 + }, + { + pos: [4, 3, 4], + state: 3 + }, + { + pos: [0, 4, 4], + state: 3 + }, + { + pos: [1, 4, 4], + state: 3 + }, + { + pos: [2, 4, 4], + state: 3 + }, + { + pos: [3, 4, 4], + state: 3 + }, + { + pos: [4, 4, 4], + state: 3 + } + ], + palette: [ + { + Name: "minecraft:polished_andesite" + }, + { + Name: "minecraft:white_stained_glass" + }, + { + Properties: { + waterlogged: "false", + facing: "south" + }, + Name: "computercraft:turtle_normal" + }, + { + Name: "minecraft:air" + }, + { + Properties: { + level: "0" + }, + Name: "minecraft:lava" + } + ], + DataVersion: 2230 +} diff --git a/src/test/server-files/structures/turtle_test.hoe_dirt.snbt b/src/test/server-files/structures/turtle_test.hoe_dirt.snbt new file mode 100644 index 000000000..559e1a6fe --- /dev/null +++ b/src/test/server-files/structures/turtle_test.hoe_dirt.snbt @@ -0,0 +1,147 @@ +{ + size: [3, 3, 3], + entities: [], + blocks: [ + { + pos: [0, 0, 0], + state: 0 + }, + { + pos: [1, 0, 0], + state: 0 + }, + { + pos: [2, 0, 0], + state: 0 + }, + { + pos: [0, 0, 1], + state: 0 + }, + { + pos: [1, 0, 1], + state: 0 + }, + { + pos: [2, 0, 1], + state: 0 + }, + { + pos: [1, 1, 1], + state: 1 + }, + { + pos: [0, 0, 2], + state: 0 + }, + { + pos: [1, 0, 2], + state: 0 + }, + { + pos: [2, 0, 2], + state: 0 + }, + { + nbt: { + Owner: { + UpperId: 4039158846114182220L, + LowerId: -6876936588741668278L, + Name: "Dev" + }, + Fuel: 0, + LeftUpgrade: "minecraft:diamond_hoe", + Slot: 0, + Items: [], + id: "computercraft:turtle_normal", + ComputerId: 9, + On: 1b + }, + pos: [1, 1, 0], + state: 2 + }, + { + pos: [0, 1, 0], + state: 3 + }, + { + pos: [2, 1, 0], + state: 3 + }, + { + pos: [0, 2, 0], + state: 3 + }, + { + pos: [1, 2, 0], + state: 3 + }, + { + pos: [2, 2, 0], + state: 3 + }, + { + pos: [0, 1, 1], + state: 3 + }, + { + pos: [2, 1, 1], + state: 3 + }, + { + pos: [0, 2, 1], + state: 3 + }, + { + pos: [1, 2, 1], + state: 3 + }, + { + pos: [2, 2, 1], + state: 3 + }, + { + pos: [0, 1, 2], + state: 3 + }, + { + pos: [1, 1, 2], + state: 3 + }, + { + pos: [2, 1, 2], + state: 3 + }, + { + pos: [0, 2, 2], + state: 3 + }, + { + pos: [1, 2, 2], + state: 3 + }, + { + pos: [2, 2, 2], + state: 3 + } + ], + palette: [ + { + Name: "minecraft:polished_andesite" + }, + { + Name: "minecraft:dirt" + }, + { + Properties: { + waterlogged: "false", + facing: "south" + }, + Name: "computercraft:turtle_normal" + }, + { + Name: "minecraft:air" + } + ], + DataVersion: 2230 +} diff --git a/src/test/server-files/structures/turtle_test.place_lava.snbt b/src/test/server-files/structures/turtle_test.place_lava.snbt new file mode 100644 index 000000000..22334744b --- /dev/null +++ b/src/test/server-files/structures/turtle_test.place_lava.snbt @@ -0,0 +1,544 @@ +{ + size: [5, 5, 5], + entities: [], + blocks: [ + { + pos: [0, 0, 0], + state: 0 + }, + { + pos: [1, 0, 0], + state: 0 + }, + { + pos: [2, 0, 0], + state: 0 + }, + { + pos: [3, 0, 0], + state: 0 + }, + { + pos: [4, 0, 0], + state: 0 + }, + { + pos: [0, 0, 1], + state: 0 + }, + { + pos: [1, 0, 1], + state: 0 + }, + { + pos: [2, 0, 1], + state: 0 + }, + { + pos: [3, 0, 1], + state: 0 + }, + { + pos: [4, 0, 1], + state: 0 + }, + { + pos: [1, 1, 1], + state: 1 + }, + { + pos: [2, 1, 1], + state: 1 + }, + { + pos: [3, 1, 1], + state: 1 + }, + { + pos: [0, 0, 2], + state: 0 + }, + { + pos: [1, 0, 2], + state: 0 + }, + { + pos: [2, 0, 2], + state: 0 + }, + { + pos: [3, 0, 2], + state: 0 + }, + { + pos: [4, 0, 2], + state: 0 + }, + { + pos: [1, 1, 2], + state: 1 + }, + { + pos: [3, 1, 2], + state: 1 + }, + { + pos: [0, 0, 3], + state: 0 + }, + { + pos: [1, 0, 3], + state: 0 + }, + { + pos: [2, 0, 3], + state: 0 + }, + { + pos: [3, 0, 3], + state: 0 + }, + { + pos: [4, 0, 3], + state: 0 + }, + { + pos: [1, 1, 3], + state: 1 + }, + { + pos: [2, 1, 3], + state: 1 + }, + { + pos: [3, 1, 3], + state: 1 + }, + { + pos: [0, 0, 4], + state: 0 + }, + { + pos: [1, 0, 4], + state: 0 + }, + { + pos: [2, 0, 4], + state: 0 + }, + { + pos: [3, 0, 4], + state: 0 + }, + { + pos: [4, 0, 4], + state: 0 + }, + { + nbt: { + Owner: { + UpperId: 4039158846114182220L, + LowerId: -6876936588741668278L, + Name: "Dev" + }, + Fuel: 0, + Slot: 0, + Items: [ + { + Slot: 0b, + id: "minecraft:lava_bucket", + Count: 1b + } + ], + id: "computercraft:turtle_normal", + ComputerId: 6, + On: 1b + }, + pos: [2, 2, 2], + state: 2 + }, + { + pos: [0, 1, 0], + state: 3 + }, + { + pos: [1, 1, 0], + state: 3 + }, + { + pos: [2, 1, 0], + state: 3 + }, + { + pos: [3, 1, 0], + state: 3 + }, + { + pos: [4, 1, 0], + state: 3 + }, + { + pos: [0, 2, 0], + state: 3 + }, + { + pos: [1, 2, 0], + state: 3 + }, + { + pos: [2, 2, 0], + state: 3 + }, + { + pos: [3, 2, 0], + state: 3 + }, + { + pos: [4, 2, 0], + state: 3 + }, + { + pos: [0, 3, 0], + state: 3 + }, + { + pos: [1, 3, 0], + state: 3 + }, + { + pos: [2, 3, 0], + state: 3 + }, + { + pos: [3, 3, 0], + state: 3 + }, + { + pos: [4, 3, 0], + state: 3 + }, + { + pos: [0, 4, 0], + state: 3 + }, + { + pos: [1, 4, 0], + state: 3 + }, + { + pos: [2, 4, 0], + state: 3 + }, + { + pos: [3, 4, 0], + state: 3 + }, + { + pos: [4, 4, 0], + state: 3 + }, + { + pos: [0, 1, 1], + state: 3 + }, + { + pos: [4, 1, 1], + state: 3 + }, + { + pos: [0, 2, 1], + state: 3 + }, + { + pos: [1, 2, 1], + state: 3 + }, + { + pos: [2, 2, 1], + state: 3 + }, + { + pos: [3, 2, 1], + state: 3 + }, + { + pos: [4, 2, 1], + state: 3 + }, + { + pos: [0, 3, 1], + state: 3 + }, + { + pos: [1, 3, 1], + state: 3 + }, + { + pos: [2, 3, 1], + state: 3 + }, + { + pos: [3, 3, 1], + state: 3 + }, + { + pos: [4, 3, 1], + state: 3 + }, + { + pos: [0, 4, 1], + state: 3 + }, + { + pos: [1, 4, 1], + state: 3 + }, + { + pos: [2, 4, 1], + state: 3 + }, + { + pos: [3, 4, 1], + state: 3 + }, + { + pos: [4, 4, 1], + state: 3 + }, + { + pos: [0, 1, 2], + state: 3 + }, + { + pos: [2, 1, 2], + state: 3 + }, + { + pos: [4, 1, 2], + state: 3 + }, + { + pos: [0, 2, 2], + state: 3 + }, + { + pos: [1, 2, 2], + state: 3 + }, + { + pos: [3, 2, 2], + state: 3 + }, + { + pos: [4, 2, 2], + state: 3 + }, + { + pos: [0, 3, 2], + state: 3 + }, + { + pos: [1, 3, 2], + state: 3 + }, + { + pos: [2, 3, 2], + state: 3 + }, + { + pos: [3, 3, 2], + state: 3 + }, + { + pos: [4, 3, 2], + state: 3 + }, + { + pos: [0, 4, 2], + state: 3 + }, + { + pos: [1, 4, 2], + state: 3 + }, + { + pos: [2, 4, 2], + state: 3 + }, + { + pos: [3, 4, 2], + state: 3 + }, + { + pos: [4, 4, 2], + state: 3 + }, + { + pos: [0, 1, 3], + state: 3 + }, + { + pos: [4, 1, 3], + state: 3 + }, + { + pos: [0, 2, 3], + state: 3 + }, + { + pos: [1, 2, 3], + state: 3 + }, + { + pos: [2, 2, 3], + state: 3 + }, + { + pos: [3, 2, 3], + state: 3 + }, + { + pos: [4, 2, 3], + state: 3 + }, + { + pos: [0, 3, 3], + state: 3 + }, + { + pos: [1, 3, 3], + state: 3 + }, + { + pos: [2, 3, 3], + state: 3 + }, + { + pos: [3, 3, 3], + state: 3 + }, + { + pos: [4, 3, 3], + state: 3 + }, + { + pos: [0, 4, 3], + state: 3 + }, + { + pos: [1, 4, 3], + state: 3 + }, + { + pos: [2, 4, 3], + state: 3 + }, + { + pos: [3, 4, 3], + state: 3 + }, + { + pos: [4, 4, 3], + state: 3 + }, + { + pos: [0, 1, 4], + state: 3 + }, + { + pos: [1, 1, 4], + state: 3 + }, + { + pos: [2, 1, 4], + state: 3 + }, + { + pos: [3, 1, 4], + state: 3 + }, + { + pos: [4, 1, 4], + state: 3 + }, + { + pos: [0, 2, 4], + state: 3 + }, + { + pos: [1, 2, 4], + state: 3 + }, + { + pos: [2, 2, 4], + state: 3 + }, + { + pos: [3, 2, 4], + state: 3 + }, + { + pos: [4, 2, 4], + state: 3 + }, + { + pos: [0, 3, 4], + state: 3 + }, + { + pos: [1, 3, 4], + state: 3 + }, + { + pos: [2, 3, 4], + state: 3 + }, + { + pos: [3, 3, 4], + state: 3 + }, + { + pos: [4, 3, 4], + state: 3 + }, + { + pos: [0, 4, 4], + state: 3 + }, + { + pos: [1, 4, 4], + state: 3 + }, + { + pos: [2, 4, 4], + state: 3 + }, + { + pos: [3, 4, 4], + state: 3 + }, + { + pos: [4, 4, 4], + state: 3 + } + ], + palette: [ + { + Name: "minecraft:polished_andesite" + }, + { + Name: "minecraft:white_stained_glass" + }, + { + Properties: { + waterlogged: "false", + facing: "south" + }, + Name: "computercraft:turtle_normal" + }, + { + Name: "minecraft:air" + } + ], + DataVersion: 2230 +} diff --git a/src/test/server-files/structures/turtle_test.place_waterlogged.snbt b/src/test/server-files/structures/turtle_test.place_waterlogged.snbt new file mode 100644 index 000000000..a7930b6e0 --- /dev/null +++ b/src/test/server-files/structures/turtle_test.place_waterlogged.snbt @@ -0,0 +1,550 @@ +{ + size: [5, 5, 5], + entities: [], + blocks: [ + { + pos: [0, 0, 0], + state: 0 + }, + { + pos: [1, 0, 0], + state: 0 + }, + { + pos: [2, 0, 0], + state: 0 + }, + { + pos: [3, 0, 0], + state: 0 + }, + { + pos: [4, 0, 0], + state: 0 + }, + { + pos: [1, 1, 0], + state: 1 + }, + { + pos: [2, 1, 0], + state: 1 + }, + { + pos: [3, 1, 0], + state: 1 + }, + { + pos: [0, 0, 1], + state: 0 + }, + { + pos: [1, 0, 1], + state: 0 + }, + { + pos: [2, 0, 1], + state: 0 + }, + { + pos: [3, 0, 1], + state: 0 + }, + { + pos: [4, 0, 1], + state: 0 + }, + { + pos: [1, 1, 1], + state: 1 + }, + { + pos: [3, 1, 1], + state: 1 + }, + { + pos: [0, 0, 2], + state: 0 + }, + { + pos: [1, 0, 2], + state: 0 + }, + { + pos: [2, 0, 2], + state: 0 + }, + { + pos: [3, 0, 2], + state: 0 + }, + { + pos: [4, 0, 2], + state: 0 + }, + { + pos: [1, 1, 2], + state: 1 + }, + { + pos: [3, 1, 2], + state: 1 + }, + { + pos: [0, 0, 3], + state: 0 + }, + { + pos: [1, 0, 3], + state: 0 + }, + { + pos: [2, 0, 3], + state: 0 + }, + { + pos: [3, 0, 3], + state: 0 + }, + { + pos: [4, 0, 3], + state: 0 + }, + { + pos: [1, 1, 3], + state: 1 + }, + { + pos: [2, 1, 3], + state: 1 + }, + { + pos: [3, 1, 3], + state: 1 + }, + { + pos: [0, 0, 4], + state: 0 + }, + { + pos: [1, 0, 4], + state: 0 + }, + { + pos: [2, 0, 4], + state: 0 + }, + { + pos: [3, 0, 4], + state: 0 + }, + { + pos: [4, 0, 4], + state: 0 + }, + { + nbt: { + Owner: { + UpperId: 4039158846114182220L, + LowerId: -6876936588741668278L, + Name: "Dev" + }, + Fuel: 0, + Slot: 0, + Items: [ + { + Slot: 0b, + id: "minecraft:oak_fence", + Count: 1b + } + ], + id: "computercraft:turtle_normal", + ComputerId: 7, + On: 1b + }, + pos: [2, 1, 1], + state: 2 + }, + { + pos: [0, 1, 0], + state: 3 + }, + { + pos: [4, 1, 0], + state: 3 + }, + { + pos: [0, 2, 0], + state: 3 + }, + { + pos: [1, 2, 0], + state: 3 + }, + { + pos: [2, 2, 0], + state: 3 + }, + { + pos: [3, 2, 0], + state: 3 + }, + { + pos: [4, 2, 0], + state: 3 + }, + { + pos: [0, 3, 0], + state: 3 + }, + { + pos: [1, 3, 0], + state: 3 + }, + { + pos: [2, 3, 0], + state: 3 + }, + { + pos: [3, 3, 0], + state: 3 + }, + { + pos: [4, 3, 0], + state: 3 + }, + { + pos: [0, 4, 0], + state: 3 + }, + { + pos: [1, 4, 0], + state: 3 + }, + { + pos: [2, 4, 0], + state: 3 + }, + { + pos: [3, 4, 0], + state: 3 + }, + { + pos: [4, 4, 0], + state: 3 + }, + { + pos: [0, 1, 1], + state: 3 + }, + { + pos: [4, 1, 1], + state: 3 + }, + { + pos: [0, 2, 1], + state: 3 + }, + { + pos: [1, 2, 1], + state: 3 + }, + { + pos: [2, 2, 1], + state: 3 + }, + { + pos: [3, 2, 1], + state: 3 + }, + { + pos: [4, 2, 1], + state: 3 + }, + { + pos: [0, 3, 1], + state: 3 + }, + { + pos: [1, 3, 1], + state: 3 + }, + { + pos: [2, 3, 1], + state: 3 + }, + { + pos: [3, 3, 1], + state: 3 + }, + { + pos: [4, 3, 1], + state: 3 + }, + { + pos: [0, 4, 1], + state: 3 + }, + { + pos: [1, 4, 1], + state: 3 + }, + { + pos: [2, 4, 1], + state: 3 + }, + { + pos: [3, 4, 1], + state: 3 + }, + { + pos: [4, 4, 1], + state: 3 + }, + { + pos: [0, 1, 2], + state: 3 + }, + { + pos: [2, 1, 2], + state: 4 + }, + { + pos: [4, 1, 2], + state: 3 + }, + { + pos: [0, 2, 2], + state: 3 + }, + { + pos: [1, 2, 2], + state: 3 + }, + { + pos: [2, 2, 2], + state: 3 + }, + { + pos: [3, 2, 2], + state: 3 + }, + { + pos: [4, 2, 2], + state: 3 + }, + { + pos: [0, 3, 2], + state: 3 + }, + { + pos: [1, 3, 2], + state: 3 + }, + { + pos: [2, 3, 2], + state: 3 + }, + { + pos: [3, 3, 2], + state: 3 + }, + { + pos: [4, 3, 2], + state: 3 + }, + { + pos: [0, 4, 2], + state: 3 + }, + { + pos: [1, 4, 2], + state: 3 + }, + { + pos: [2, 4, 2], + state: 3 + }, + { + pos: [3, 4, 2], + state: 3 + }, + { + pos: [4, 4, 2], + state: 3 + }, + { + pos: [0, 1, 3], + state: 3 + }, + { + pos: [4, 1, 3], + state: 3 + }, + { + pos: [0, 2, 3], + state: 3 + }, + { + pos: [1, 2, 3], + state: 3 + }, + { + pos: [2, 2, 3], + state: 3 + }, + { + pos: [3, 2, 3], + state: 3 + }, + { + pos: [4, 2, 3], + state: 3 + }, + { + pos: [0, 3, 3], + state: 3 + }, + { + pos: [1, 3, 3], + state: 3 + }, + { + pos: [2, 3, 3], + state: 3 + }, + { + pos: [3, 3, 3], + state: 3 + }, + { + pos: [4, 3, 3], + state: 3 + }, + { + pos: [0, 4, 3], + state: 3 + }, + { + pos: [1, 4, 3], + state: 3 + }, + { + pos: [2, 4, 3], + state: 3 + }, + { + pos: [3, 4, 3], + state: 3 + }, + { + pos: [4, 4, 3], + state: 3 + }, + { + pos: [0, 1, 4], + state: 3 + }, + { + pos: [1, 1, 4], + state: 3 + }, + { + pos: [2, 1, 4], + state: 3 + }, + { + pos: [3, 1, 4], + state: 3 + }, + { + pos: [4, 1, 4], + state: 3 + }, + { + pos: [0, 2, 4], + state: 3 + }, + { + pos: [1, 2, 4], + state: 3 + }, + { + pos: [2, 2, 4], + state: 3 + }, + { + pos: [3, 2, 4], + state: 3 + }, + { + pos: [4, 2, 4], + state: 3 + }, + { + pos: [0, 3, 4], + state: 3 + }, + { + pos: [1, 3, 4], + state: 3 + }, + { + pos: [2, 3, 4], + state: 3 + }, + { + pos: [3, 3, 4], + state: 3 + }, + { + pos: [4, 3, 4], + state: 3 + }, + { + pos: [0, 4, 4], + state: 3 + }, + { + pos: [1, 4, 4], + state: 3 + }, + { + pos: [2, 4, 4], + state: 3 + }, + { + pos: [3, 4, 4], + state: 3 + }, + { + pos: [4, 4, 4], + state: 3 + } + ], + palette: [ + { + Name: "minecraft:polished_andesite" + }, + { + Name: "minecraft:white_stained_glass" + }, + { + Properties: { + waterlogged: "true", + facing: "south" + }, + Name: "computercraft:turtle_normal" + }, + { + Name: "minecraft:air" + }, + { + Properties: { + level: "0" + }, + Name: "minecraft:water" + } + ], + DataVersion: 2230 +} diff --git a/src/test/server-files/structures/turtle_test.shears_sheep.snbt b/src/test/server-files/structures/turtle_test.shears_sheep.snbt new file mode 100644 index 000000000..dbd5ba6a6 --- /dev/null +++ b/src/test/server-files/structures/turtle_test.shears_sheep.snbt @@ -0,0 +1,648 @@ +{ + size: [5, 5, 5], + entities: [ + { + nbt: { + Brain: { + memories: {} + }, + HurtByTimestamp: 0, + Attributes: [ + { + Base: 8.0d, + Name: "generic.maxHealth" + }, + { + Base: 0.0d, + Name: "generic.knockbackResistance" + }, + { + Base: 0.23000000417232513d, + Name: "generic.movementSpeed" + }, + { + Base: 0.0d, + Name: "generic.armor" + }, + { + Base: 0.0d, + Name: "generic.armorToughness" + }, + { + Base: 1.0d, + Name: "forge.swimSpeed" + }, + { + Base: 64.0d, + Name: "forge.nameTagDistance" + }, + { + Base: 0.08d, + Name: "forge.entity_gravity" + }, + { + Base: 16.0d, + Modifiers: [ + { + UUIDMost: 2135385928807173041L, + UUIDLeast: -7913974980122166977L, + Amount: -0.04393447767139704d, + Operation: 1, + Name: "Random spawn bonus" + } + ], + Name: "generic.followRange" + }, + { + Base: 0.0d, + Name: "generic.attackKnockback" + } + ], + Invulnerable: 0b, + FallFlying: 0b, + ForcedAge: 0, + PortalCooldown: 0, + AbsorptionAmount: 0.0f, + FallDistance: 0.0f, + InLove: 0, + CanUpdate: 1b, + DeathTime: 0s, + HandDropChances: [0.085f, 0.085f], + PersistenceRequired: 0b, + id: "minecraft:sheep", + Age: 0, + Motion: [0.0d, -0.0784000015258789d, 0.0d], + UUIDLeast: -5245632071702074643L, + Health: 8.0f, + Color: 0b, + LeftHanded: 0b, + Air: 300s, + OnGround: 1b, + Dimension: 0, + Rotation: [99.779915f, 0.0f], + HandItems: [ + {}, + {} + ], + ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], + UUIDMost: -3792049278188698748L, + Pos: [-12.5d, 6.0d, 110.5d], + Fire: -1s, + ArmorItems: [ + {}, + {}, + {}, + {} + ], + CanPickUpLoot: 0b, + Sheared: 0b, + HurtTime: 0s + }, + blockPos: [2, 1, 2], + pos: [2.5d, 1.0d, 2.5d] + } + ], + blocks: [ + { + pos: [0, 0, 0], + state: 0 + }, + { + pos: [1, 0, 0], + state: 0 + }, + { + pos: [2, 0, 0], + state: 0 + }, + { + pos: [3, 0, 0], + state: 0 + }, + { + pos: [4, 0, 0], + state: 0 + }, + { + pos: [0, 0, 1], + state: 0 + }, + { + pos: [1, 0, 1], + state: 0 + }, + { + pos: [2, 0, 1], + state: 0 + }, + { + pos: [3, 0, 1], + state: 0 + }, + { + pos: [4, 0, 1], + state: 0 + }, + { + pos: [1, 1, 1], + state: 1 + }, + { + pos: [2, 1, 1], + state: 1 + }, + { + pos: [3, 1, 1], + state: 1 + }, + { + pos: [1, 2, 1], + state: 1 + }, + { + pos: [2, 2, 1], + state: 1 + }, + { + pos: [3, 2, 1], + state: 1 + }, + { + pos: [0, 0, 2], + state: 0 + }, + { + pos: [1, 0, 2], + state: 0 + }, + { + pos: [2, 0, 2], + state: 0 + }, + { + pos: [3, 0, 2], + state: 0 + }, + { + pos: [4, 0, 2], + state: 0 + }, + { + pos: [1, 1, 2], + state: 1 + }, + { + pos: [3, 1, 2], + state: 1 + }, + { + pos: [1, 2, 2], + state: 1 + }, + { + pos: [3, 2, 2], + state: 1 + }, + { + pos: [0, 0, 3], + state: 0 + }, + { + pos: [1, 0, 3], + state: 0 + }, + { + pos: [2, 0, 3], + state: 0 + }, + { + pos: [3, 0, 3], + state: 0 + }, + { + pos: [4, 0, 3], + state: 0 + }, + { + pos: [1, 1, 3], + state: 1 + }, + { + pos: [2, 1, 3], + state: 1 + }, + { + pos: [3, 1, 3], + state: 1 + }, + { + pos: [1, 2, 3], + state: 1 + }, + { + pos: [2, 2, 3], + state: 1 + }, + { + pos: [3, 2, 3], + state: 1 + }, + { + pos: [0, 0, 4], + state: 0 + }, + { + pos: [1, 0, 4], + state: 0 + }, + { + pos: [2, 0, 4], + state: 0 + }, + { + pos: [3, 0, 4], + state: 0 + }, + { + pos: [4, 0, 4], + state: 0 + }, + { + nbt: { + Owner: { + UpperId: 4039158846114182220L, + LowerId: -6876936588741668278L, + Name: "Dev" + }, + Fuel: 0, + Slot: 0, + Items: [ + { + Slot: 0b, + id: "minecraft:shears", + Count: 1b, + tag: { + Damage: 0 + } + } + ], + id: "computercraft:turtle_normal", + ComputerId: 5, + On: 1b + }, + pos: [2, 3, 2], + state: 2 + }, + { + pos: [0, 1, 0], + state: 3 + }, + { + pos: [1, 1, 0], + state: 3 + }, + { + pos: [2, 1, 0], + state: 3 + }, + { + pos: [3, 1, 0], + state: 3 + }, + { + pos: [4, 1, 0], + state: 3 + }, + { + pos: [0, 2, 0], + state: 3 + }, + { + pos: [1, 2, 0], + state: 3 + }, + { + pos: [2, 2, 0], + state: 3 + }, + { + pos: [3, 2, 0], + state: 3 + }, + { + pos: [4, 2, 0], + state: 3 + }, + { + pos: [0, 3, 0], + state: 3 + }, + { + pos: [1, 3, 0], + state: 3 + }, + { + pos: [2, 3, 0], + state: 3 + }, + { + pos: [3, 3, 0], + state: 3 + }, + { + pos: [4, 3, 0], + state: 3 + }, + { + pos: [0, 4, 0], + state: 3 + }, + { + pos: [1, 4, 0], + state: 3 + }, + { + pos: [2, 4, 0], + state: 3 + }, + { + pos: [3, 4, 0], + state: 3 + }, + { + pos: [4, 4, 0], + state: 3 + }, + { + pos: [0, 1, 1], + state: 3 + }, + { + pos: [4, 1, 1], + state: 3 + }, + { + pos: [0, 2, 1], + state: 3 + }, + { + pos: [4, 2, 1], + state: 3 + }, + { + pos: [0, 3, 1], + state: 3 + }, + { + pos: [1, 3, 1], + state: 3 + }, + { + pos: [2, 3, 1], + state: 3 + }, + { + pos: [3, 3, 1], + state: 3 + }, + { + pos: [4, 3, 1], + state: 3 + }, + { + pos: [0, 4, 1], + state: 3 + }, + { + pos: [1, 4, 1], + state: 3 + }, + { + pos: [2, 4, 1], + state: 3 + }, + { + pos: [3, 4, 1], + state: 3 + }, + { + pos: [4, 4, 1], + state: 3 + }, + { + pos: [0, 1, 2], + state: 3 + }, + { + pos: [2, 1, 2], + state: 3 + }, + { + pos: [4, 1, 2], + state: 3 + }, + { + pos: [0, 2, 2], + state: 3 + }, + { + pos: [2, 2, 2], + state: 3 + }, + { + pos: [4, 2, 2], + state: 3 + }, + { + pos: [0, 3, 2], + state: 3 + }, + { + pos: [1, 3, 2], + state: 3 + }, + { + pos: [3, 3, 2], + state: 3 + }, + { + pos: [4, 3, 2], + state: 3 + }, + { + pos: [0, 4, 2], + state: 3 + }, + { + pos: [1, 4, 2], + state: 3 + }, + { + pos: [2, 4, 2], + state: 3 + }, + { + pos: [3, 4, 2], + state: 3 + }, + { + pos: [4, 4, 2], + state: 3 + }, + { + pos: [0, 1, 3], + state: 3 + }, + { + pos: [4, 1, 3], + state: 3 + }, + { + pos: [0, 2, 3], + state: 3 + }, + { + pos: [4, 2, 3], + state: 3 + }, + { + pos: [0, 3, 3], + state: 3 + }, + { + pos: [1, 3, 3], + state: 3 + }, + { + pos: [2, 3, 3], + state: 3 + }, + { + pos: [3, 3, 3], + state: 3 + }, + { + pos: [4, 3, 3], + state: 3 + }, + { + pos: [0, 4, 3], + state: 3 + }, + { + pos: [1, 4, 3], + state: 3 + }, + { + pos: [2, 4, 3], + state: 3 + }, + { + pos: [3, 4, 3], + state: 3 + }, + { + pos: [4, 4, 3], + state: 3 + }, + { + pos: [0, 1, 4], + state: 3 + }, + { + pos: [1, 1, 4], + state: 3 + }, + { + pos: [2, 1, 4], + state: 3 + }, + { + pos: [3, 1, 4], + state: 3 + }, + { + pos: [4, 1, 4], + state: 3 + }, + { + pos: [0, 2, 4], + state: 3 + }, + { + pos: [1, 2, 4], + state: 3 + }, + { + pos: [2, 2, 4], + state: 3 + }, + { + pos: [3, 2, 4], + state: 3 + }, + { + pos: [4, 2, 4], + state: 3 + }, + { + pos: [0, 3, 4], + state: 3 + }, + { + pos: [1, 3, 4], + state: 3 + }, + { + pos: [2, 3, 4], + state: 3 + }, + { + pos: [3, 3, 4], + state: 3 + }, + { + pos: [4, 3, 4], + state: 3 + }, + { + pos: [0, 4, 4], + state: 3 + }, + { + pos: [1, 4, 4], + state: 3 + }, + { + pos: [2, 4, 4], + state: 3 + }, + { + pos: [3, 4, 4], + state: 3 + }, + { + pos: [4, 4, 4], + state: 3 + } + ], + palette: [ + { + Name: "minecraft:polished_andesite" + }, + { + Name: "minecraft:white_stained_glass" + }, + { + Properties: { + waterlogged: "false", + facing: "south" + }, + Name: "computercraft:turtle_normal" + }, + { + Name: "minecraft:air" + } + ], + DataVersion: 2230 +}