diff --git a/src/testMod/java/dan200/computercraft/ingame/MonitorTest.kt b/src/testMod/java/dan200/computercraft/ingame/MonitorTest.kt index 644dc9e44..3625e5d03 100644 --- a/src/testMod/java/dan200/computercraft/ingame/MonitorTest.kt +++ b/src/testMod/java/dan200/computercraft/ingame/MonitorTest.kt @@ -1,8 +1,11 @@ package dan200.computercraft.ingame +import dan200.computercraft.ComputerCraft import dan200.computercraft.ingame.api.* +import dan200.computercraft.ingame.api.Timeouts.CLIENT_TIMEOUT import dan200.computercraft.shared.Capabilities import dan200.computercraft.shared.Registry +import dan200.computercraft.shared.peripheral.monitor.MonitorRenderer import dan200.computercraft.shared.peripheral.monitor.TileMonitor import net.minecraft.block.Blocks import net.minecraft.command.arguments.BlockStateInput @@ -42,15 +45,14 @@ class Monitor_Test { } } - @GameTest(batch = "client:Monitor_Test.Looks_acceptable", timeoutTicks = 400) - fun Looks_acceptable(helper: GameTestHelper) = helper.sequence { + private fun looksAcceptable(helper: GameTestHelper, renderer: MonitorRenderer) = helper.sequence { this - .thenExecute { helper.normaliseScene() } .thenExecute { + ComputerCraft.monitorRenderer = renderer helper.positionAtArmorStand() // Get the monitor and peripheral. This forces us to create a server monitor at this location. - val monitor = helper.getBlockEntity(BlockPos(2, 2, 2)) as TileMonitor + val monitor = helper.getBlockEntity(BlockPos(2, 2, 3)) as TileMonitor monitor.getCapability(Capabilities.CAPABILITY_PERIPHERAL) val terminal = monitor.cachedServerMonitor.terminal @@ -62,4 +64,21 @@ class Monitor_Test { } .thenScreenshot() } + + @GameTest(batch = "client:Monitor_Test.Looks_acceptable", timeoutTicks = CLIENT_TIMEOUT, template = LOOKS_ACCEPTABLE) + fun Looks_acceptable(helper: GameTestHelper) = looksAcceptable(helper, renderer = MonitorRenderer.TBO) + + @GameTest(batch = "client:Monitor_Test.Looks_acceptable_dark", timeoutTicks = CLIENT_TIMEOUT, template = LOOKS_ACCEPTABLE_DARK) + fun Looks_acceptable_dark(helper: GameTestHelper) = looksAcceptable(helper, renderer = MonitorRenderer.TBO) + + @GameTest(batch = "client:Monitor_Test.Looks_acceptable_vbo", timeoutTicks = CLIENT_TIMEOUT, template = LOOKS_ACCEPTABLE) + fun Looks_acceptable_vbo(helper: GameTestHelper) = looksAcceptable(helper, renderer = MonitorRenderer.VBO) + + @GameTest(batch = "client:Monitor_Test.Looks_acceptable_dark_vbo", timeoutTicks = CLIENT_TIMEOUT, template = LOOKS_ACCEPTABLE_DARK) + fun Looks_acceptable_dark_vbo(helper: GameTestHelper) = looksAcceptable(helper, renderer = MonitorRenderer.VBO) + + private companion object { + const val LOOKS_ACCEPTABLE = "looks_acceptable" + const val LOOKS_ACCEPTABLE_DARK = "looks_acceptable_dark" + } } diff --git a/src/testMod/java/dan200/computercraft/ingame/PrintoutTest.kt b/src/testMod/java/dan200/computercraft/ingame/PrintoutTest.kt new file mode 100644 index 000000000..12b3ac7d7 --- /dev/null +++ b/src/testMod/java/dan200/computercraft/ingame/PrintoutTest.kt @@ -0,0 +1,12 @@ +package dan200.computercraft.ingame + +import dan200.computercraft.ingame.api.* + +class PrintoutTest { + @GameTest(batch = "client:Printout_Test.In_frame_at_night", timeoutTicks = Timeouts.CLIENT_TIMEOUT) + fun In_frame_at_night(helper: GameTestHelper) = helper.sequence { + this + .thenExecute { helper.positionAtArmorStand() } + .thenScreenshot() + } +} diff --git a/src/testMod/java/dan200/computercraft/ingame/api/TestExtensions.kt b/src/testMod/java/dan200/computercraft/ingame/api/TestExtensions.kt index 4193e3817..360b933ae 100644 --- a/src/testMod/java/dan200/computercraft/ingame/api/TestExtensions.kt +++ b/src/testMod/java/dan200/computercraft/ingame/api/TestExtensions.kt @@ -3,13 +3,11 @@ package dan200.computercraft.ingame.api import dan200.computercraft.ingame.mod.ImageUtils import dan200.computercraft.ingame.mod.TestMod import net.minecraft.block.BlockState -import net.minecraft.block.Blocks import net.minecraft.client.Minecraft import net.minecraft.command.arguments.BlockStateInput import net.minecraft.entity.item.ArmorStandEntity import net.minecraft.util.ScreenShotHelper import net.minecraft.util.math.BlockPos -import net.minecraft.world.gen.Heightmap import java.nio.file.Files import java.util.concurrent.CompletableFuture import java.util.concurrent.ExecutionException @@ -134,24 +132,6 @@ fun GameTestHelper.sequence(run: GameTestSequence.() -> GameTestSequence) { */ fun GameTestHelper.setBlock(pos: BlockPos, state: BlockStateInput) = state.place(level, absolutePos(pos), 3) -/** - * "Normalise" the current world in preparation for screenshots. - * - * Basically removes any dirt and replaces it with concrete. - */ -fun GameTestHelper.normaliseScene() { - val y = level.getHeightmapPos(Heightmap.Type.WORLD_SURFACE, absolutePos(BlockPos.ZERO)) - for (x in -100..100) { - for (z in -100..100) { - val pos = y.offset(x, -3, z) - val block = level.getBlockState(pos).block - if (block == Blocks.DIRT || block == Blocks.GRASS_BLOCK) { - level.setBlock(pos, Blocks.WHITE_CONCRETE.defaultBlockState(), 3) - } - } - } -} - /** * Position the player at an armor stand. */ diff --git a/src/testMod/java/dan200/computercraft/ingame/mod/ImageUtils.java b/src/testMod/java/dan200/computercraft/ingame/mod/ImageUtils.java index 0a5dff2f9..a3b958c87 100644 --- a/src/testMod/java/dan200/computercraft/ingame/mod/ImageUtils.java +++ b/src/testMod/java/dan200/computercraft/ingame/mod/ImageUtils.java @@ -18,9 +18,9 @@ public final class ImageUtils private static final Logger LOG = LogManager.getLogger( ImageUtils.class ); /** - * Allow 0.05% of pixels to fail. This allows for slight differences at the edges. + * Allow 0.1% of pixels to fail. This allows for slight differences at the edges. */ - private static final double PIXEL_THRESHOLD = 0.0005; + private static final double PIXEL_THRESHOLD = 0.001; /** * Maximum possible distance between two colours. Floating point differences means we need some fuzziness here. diff --git a/src/testMod/server-files/screenshots/monitor_test.looks_acceptable.png b/src/testMod/server-files/screenshots/monitor_test.looks_acceptable.png index 85d194053..02c60c26c 100644 Binary files a/src/testMod/server-files/screenshots/monitor_test.looks_acceptable.png and b/src/testMod/server-files/screenshots/monitor_test.looks_acceptable.png differ diff --git a/src/testMod/server-files/screenshots/monitor_test.looks_acceptable_dark.png b/src/testMod/server-files/screenshots/monitor_test.looks_acceptable_dark.png new file mode 100644 index 000000000..6c038f4f8 Binary files /dev/null and b/src/testMod/server-files/screenshots/monitor_test.looks_acceptable_dark.png differ diff --git a/src/testMod/server-files/screenshots/monitor_test.looks_acceptable_dark_vbo.png b/src/testMod/server-files/screenshots/monitor_test.looks_acceptable_dark_vbo.png new file mode 100644 index 000000000..e9bf0f007 Binary files /dev/null and b/src/testMod/server-files/screenshots/monitor_test.looks_acceptable_dark_vbo.png differ diff --git a/src/testMod/server-files/screenshots/monitor_test.looks_acceptable_vbo.png b/src/testMod/server-files/screenshots/monitor_test.looks_acceptable_vbo.png new file mode 100644 index 000000000..74a00d343 Binary files /dev/null and b/src/testMod/server-files/screenshots/monitor_test.looks_acceptable_vbo.png differ diff --git a/src/testMod/server-files/screenshots/printouttest.in_frame_at_night.png b/src/testMod/server-files/screenshots/printouttest.in_frame_at_night.png new file mode 100644 index 000000000..83651617b Binary files /dev/null and b/src/testMod/server-files/screenshots/printouttest.in_frame_at_night.png differ diff --git a/src/testMod/server-files/structures/monitor_test.looks_acceptable.snbt b/src/testMod/server-files/structures/monitor_test.looks_acceptable.snbt index c1c44576c..5e0d9c8e0 100644 --- a/src/testMod/server-files/structures/monitor_test.looks_acceptable.snbt +++ b/src/testMod/server-files/structures/monitor_test.looks_acceptable.snbt @@ -25,21 +25,21 @@ Pose: {}, id: "minecraft:armor_stand", Invisible: 1b, - UUID: [I; -1245769654, -1089124211, -1971323071, 221540869], + UUID: [I; 474729512, 2108312608, -1494837479, 630038770], Motion: [0.0d, 0.0d, 0.0d], Small: 0b, Health: 20.0f, Air: 300s, - OnGround: 1b, + OnGround: 0b, Marker: 1b, - Rotation: [-0.2999616f, 16.965813f], + Rotation: [0.15043798f, 15.347454f], HandItems: [ {}, {} ], CustomName: '{"text":"monitor_test.looks_acceptable"}', - Pos: [121.57308543720325d, 6.0d, 139.40392497295767d], - Fire: 0s, + Pos: [21.392713937302208d, 6.0d, 35.30000001192093d], + Fire: -1s, ArmorItems: [ {}, {}, @@ -49,8 +49,8 @@ NoBasePlate: 0b, HurtTime: 0s }, - blockPos: [2, 1, 0], - pos: [2.573085437203247d, 1.0d, 0.40392497295766816d] + blockPos: [2, 1, 1], + pos: [2.392713937302208d, 1.0d, 1.300000011920929d] } ], blocks: [ @@ -160,7 +160,7 @@ }, { pos: [0, 1, 1], - state: 1 + state: 2 }, { pos: [0, 1, 2], @@ -178,14 +178,6 @@ pos: [1, 1, 0], state: 1 }, - { - pos: [1, 1, 1], - state: 1 - }, - { - pos: [1, 1, 3], - state: 1 - }, { pos: [1, 1, 4], state: 1 @@ -194,14 +186,6 @@ pos: [2, 1, 0], state: 1 }, - { - pos: [2, 1, 1], - state: 1 - }, - { - pos: [2, 1, 3], - state: 1 - }, { pos: [2, 1, 4], state: 1 @@ -210,14 +194,6 @@ pos: [3, 1, 0], state: 1 }, - { - pos: [3, 1, 1], - state: 1 - }, - { - pos: [3, 1, 3], - state: 1 - }, { pos: [3, 1, 4], state: 1 @@ -228,7 +204,7 @@ }, { pos: [4, 1, 1], - state: 1 + state: 2 }, { pos: [4, 1, 2], @@ -266,14 +242,6 @@ pos: [1, 2, 0], state: 1 }, - { - pos: [1, 2, 1], - state: 1 - }, - { - pos: [1, 2, 3], - state: 1 - }, { pos: [1, 2, 4], state: 1 @@ -282,14 +250,6 @@ pos: [2, 2, 0], state: 1 }, - { - pos: [2, 2, 1], - state: 1 - }, - { - pos: [2, 2, 3], - state: 1 - }, { pos: [2, 2, 4], state: 1 @@ -298,14 +258,6 @@ pos: [3, 2, 0], state: 1 }, - { - pos: [3, 2, 1], - state: 1 - }, - { - pos: [3, 2, 3], - state: 1 - }, { pos: [3, 2, 4], state: 1 @@ -354,18 +306,6 @@ pos: [1, 3, 0], state: 1 }, - { - pos: [1, 3, 1], - state: 1 - }, - { - pos: [1, 3, 2], - state: 1 - }, - { - pos: [1, 3, 3], - state: 1 - }, { pos: [1, 3, 4], state: 1 @@ -374,18 +314,6 @@ pos: [2, 3, 0], state: 1 }, - { - pos: [2, 3, 1], - state: 1 - }, - { - pos: [2, 3, 2], - state: 1 - }, - { - pos: [2, 3, 3], - state: 1 - }, { pos: [2, 3, 4], state: 1 @@ -394,18 +322,6 @@ pos: [3, 3, 0], state: 1 }, - { - pos: [3, 3, 1], - state: 1 - }, - { - pos: [3, 3, 2], - state: 1 - }, - { - pos: [3, 3, 3], - state: 1 - }, { pos: [3, 3, 4], state: 1 @@ -464,7 +380,7 @@ }, { pos: [1, 4, 3], - state: 1 + state: 2 }, { pos: [1, 4, 4], @@ -504,7 +420,7 @@ }, { pos: [3, 4, 3], - state: 1 + state: 2 }, { pos: [3, 4, 4], @@ -531,27 +447,111 @@ state: 1 }, { - nbt: { - XIndex: 2, - Height: 2, - id: "computercraft:monitor_advanced", - Width: 3, - YIndex: 0 - }, - pos: [1, 1, 2], - state: 2 + pos: [1, 1, 1], + state: 3 + }, + { + pos: [1, 1, 2], + state: 3 + }, + { + pos: [2, 1, 1], + state: 3 }, { - nbt: { - XIndex: 1, - Height: 2, - id: "computercraft:monitor_advanced", - Width: 3, - YIndex: 0 - }, pos: [2, 1, 2], state: 3 }, + { + pos: [3, 1, 1], + state: 3 + }, + { + pos: [3, 1, 2], + state: 3 + }, + { + pos: [1, 2, 1], + state: 3 + }, + { + pos: [1, 2, 2], + state: 3 + }, + { + pos: [2, 2, 1], + state: 3 + }, + { + pos: [2, 2, 2], + state: 3 + }, + { + pos: [3, 2, 1], + state: 3 + }, + { + pos: [3, 2, 2], + state: 3 + }, + { + pos: [1, 3, 1], + state: 3 + }, + { + pos: [1, 3, 2], + state: 3 + }, + { + pos: [1, 3, 3], + state: 3 + }, + { + pos: [2, 3, 1], + state: 3 + }, + { + pos: [2, 3, 2], + state: 3 + }, + { + pos: [2, 3, 3], + state: 3 + }, + { + pos: [3, 3, 1], + state: 3 + }, + { + pos: [3, 3, 2], + state: 3 + }, + { + pos: [3, 3, 3], + state: 3 + }, + { + nbt: { + XIndex: 2, + Height: 2, + id: "computercraft:monitor_advanced", + Width: 3, + YIndex: 0 + }, + pos: [1, 1, 3], + state: 4 + }, + { + nbt: { + XIndex: 1, + Height: 2, + id: "computercraft:monitor_advanced", + Width: 3, + YIndex: 0 + }, + pos: [2, 1, 3], + state: 5 + }, { nbt: { XIndex: 0, @@ -560,8 +560,8 @@ Width: 3, YIndex: 0 }, - pos: [3, 1, 2], - state: 4 + pos: [3, 1, 3], + state: 6 }, { nbt: { @@ -571,8 +571,8 @@ Width: 3, YIndex: 1 }, - pos: [1, 2, 2], - state: 5 + pos: [1, 2, 3], + state: 7 }, { nbt: { @@ -582,8 +582,8 @@ Width: 3, YIndex: 1 }, - pos: [2, 2, 2], - state: 6 + pos: [2, 2, 3], + state: 8 }, { nbt: { @@ -593,14 +593,20 @@ Width: 3, YIndex: 1 }, - pos: [3, 2, 2], - state: 7 + pos: [3, 2, 3], + state: 9 } ], palette: [ { Name: "minecraft:polished_andesite" }, + { + Name: "minecraft:white_concrete" + }, + { + Name: "minecraft:shroomlight" + }, { Name: "minecraft:air" }, diff --git a/src/testMod/server-files/structures/monitor_test.looks_acceptable_dark.snbt b/src/testMod/server-files/structures/monitor_test.looks_acceptable_dark.snbt new file mode 100644 index 000000000..b668ff18b --- /dev/null +++ b/src/testMod/server-files/structures/monitor_test.looks_acceptable_dark.snbt @@ -0,0 +1,660 @@ +{ + size: [5, 5, 5], + entities: [ + { + nbt: { + Brain: { + memories: {} + }, + HurtByTimestamp: 0, + Attributes: [ + { + Base: 0.699999988079071d, + Name: "minecraft:generic.movement_speed" + } + ], + Invulnerable: 0b, + FallFlying: 0b, + ShowArms: 0b, + PortalCooldown: 0, + AbsorptionAmount: 0.0f, + FallDistance: 0.0f, + DisabledSlots: 0, + CanUpdate: 1b, + DeathTime: 0s, + Pose: {}, + id: "minecraft:armor_stand", + Invisible: 1b, + UUID: [I; -1516632699, -1770765897, -1362337958, -475677268], + Motion: [0.0d, 0.0d, 0.0d], + Small: 0b, + Health: 20.0f, + Air: 300s, + OnGround: 0b, + Marker: 1b, + Rotation: [0.15043798f, 15.347454f], + HandItems: [ + {}, + {} + ], + CustomName: '{"text":"monitor_test.looks_acceptable_dark"}', + Pos: [64.3927139373022d, 6.0d, 59.30000001192093d], + Fire: -1s, + ArmorItems: [ + {}, + {}, + {}, + {} + ], + NoBasePlate: 0b, + HurtTime: 0s + }, + blockPos: [2, 1, 1], + pos: [2.3927139373022044d, 1.0d, 1.300000011920929d] + } + ], + blocks: [ + { + pos: [0, 0, 0], + state: 0 + }, + { + pos: [0, 0, 1], + state: 0 + }, + { + pos: [0, 0, 2], + state: 0 + }, + { + pos: [0, 0, 3], + state: 0 + }, + { + pos: [0, 0, 4], + state: 0 + }, + { + pos: [1, 0, 0], + state: 0 + }, + { + pos: [1, 0, 1], + state: 0 + }, + { + pos: [1, 0, 2], + state: 0 + }, + { + pos: [1, 0, 3], + state: 0 + }, + { + pos: [1, 0, 4], + state: 0 + }, + { + pos: [2, 0, 0], + state: 0 + }, + { + pos: [2, 0, 1], + state: 0 + }, + { + pos: [2, 0, 2], + state: 0 + }, + { + pos: [2, 0, 3], + state: 0 + }, + { + pos: [2, 0, 4], + state: 0 + }, + { + pos: [3, 0, 0], + state: 0 + }, + { + pos: [3, 0, 1], + state: 0 + }, + { + pos: [3, 0, 2], + state: 0 + }, + { + pos: [3, 0, 3], + state: 0 + }, + { + pos: [3, 0, 4], + state: 0 + }, + { + pos: [4, 0, 0], + state: 0 + }, + { + pos: [4, 0, 1], + state: 0 + }, + { + pos: [4, 0, 2], + state: 0 + }, + { + pos: [4, 0, 3], + state: 0 + }, + { + pos: [4, 0, 4], + state: 0 + }, + { + pos: [0, 1, 0], + state: 1 + }, + { + pos: [0, 1, 1], + state: 1 + }, + { + pos: [0, 1, 2], + state: 1 + }, + { + pos: [0, 1, 3], + state: 1 + }, + { + pos: [0, 1, 4], + state: 1 + }, + { + pos: [1, 1, 0], + state: 1 + }, + { + pos: [1, 1, 4], + state: 1 + }, + { + pos: [2, 1, 0], + state: 1 + }, + { + pos: [2, 1, 4], + state: 1 + }, + { + pos: [3, 1, 0], + state: 1 + }, + { + pos: [3, 1, 4], + state: 1 + }, + { + pos: [4, 1, 0], + state: 1 + }, + { + pos: [4, 1, 1], + state: 1 + }, + { + pos: [4, 1, 2], + state: 1 + }, + { + pos: [4, 1, 3], + state: 1 + }, + { + pos: [4, 1, 4], + state: 1 + }, + { + pos: [0, 2, 0], + state: 1 + }, + { + pos: [0, 2, 1], + state: 1 + }, + { + pos: [0, 2, 2], + state: 1 + }, + { + pos: [0, 2, 3], + state: 1 + }, + { + pos: [0, 2, 4], + state: 1 + }, + { + pos: [1, 2, 0], + state: 1 + }, + { + pos: [1, 2, 4], + state: 1 + }, + { + pos: [2, 2, 0], + state: 1 + }, + { + pos: [2, 2, 4], + state: 1 + }, + { + pos: [3, 2, 0], + state: 1 + }, + { + pos: [3, 2, 4], + state: 1 + }, + { + pos: [4, 2, 0], + state: 1 + }, + { + pos: [4, 2, 1], + state: 1 + }, + { + pos: [4, 2, 2], + state: 1 + }, + { + pos: [4, 2, 3], + state: 1 + }, + { + pos: [4, 2, 4], + state: 1 + }, + { + pos: [0, 3, 0], + state: 1 + }, + { + pos: [0, 3, 1], + state: 1 + }, + { + pos: [0, 3, 2], + state: 1 + }, + { + pos: [0, 3, 3], + state: 1 + }, + { + pos: [0, 3, 4], + state: 1 + }, + { + pos: [1, 3, 0], + state: 1 + }, + { + pos: [1, 3, 4], + state: 1 + }, + { + pos: [2, 3, 0], + state: 1 + }, + { + pos: [2, 3, 4], + state: 1 + }, + { + pos: [3, 3, 0], + state: 1 + }, + { + pos: [3, 3, 4], + state: 1 + }, + { + pos: [4, 3, 0], + state: 1 + }, + { + pos: [4, 3, 1], + state: 1 + }, + { + pos: [4, 3, 2], + state: 1 + }, + { + pos: [4, 3, 3], + state: 1 + }, + { + pos: [4, 3, 4], + state: 1 + }, + { + pos: [0, 4, 0], + state: 1 + }, + { + pos: [0, 4, 1], + state: 1 + }, + { + pos: [0, 4, 2], + state: 1 + }, + { + pos: [0, 4, 3], + state: 1 + }, + { + pos: [0, 4, 4], + state: 1 + }, + { + pos: [1, 4, 0], + state: 1 + }, + { + pos: [1, 4, 1], + state: 1 + }, + { + pos: [1, 4, 2], + state: 1 + }, + { + pos: [1, 4, 3], + state: 1 + }, + { + pos: [1, 4, 4], + state: 1 + }, + { + pos: [2, 4, 0], + state: 1 + }, + { + pos: [2, 4, 1], + state: 1 + }, + { + pos: [2, 4, 2], + state: 1 + }, + { + pos: [2, 4, 3], + state: 1 + }, + { + pos: [2, 4, 4], + state: 1 + }, + { + pos: [3, 4, 0], + state: 1 + }, + { + pos: [3, 4, 1], + state: 1 + }, + { + pos: [3, 4, 2], + state: 1 + }, + { + pos: [3, 4, 3], + state: 1 + }, + { + pos: [3, 4, 4], + state: 1 + }, + { + pos: [4, 4, 0], + state: 1 + }, + { + pos: [4, 4, 1], + state: 1 + }, + { + pos: [4, 4, 2], + state: 1 + }, + { + pos: [4, 4, 3], + state: 1 + }, + { + pos: [4, 4, 4], + state: 1 + }, + { + pos: [1, 1, 1], + state: 2 + }, + { + pos: [1, 1, 2], + state: 2 + }, + { + pos: [2, 1, 1], + state: 2 + }, + { + pos: [2, 1, 2], + state: 2 + }, + { + pos: [3, 1, 1], + state: 2 + }, + { + pos: [3, 1, 2], + state: 2 + }, + { + pos: [1, 2, 1], + state: 2 + }, + { + pos: [1, 2, 2], + state: 2 + }, + { + pos: [2, 2, 1], + state: 2 + }, + { + pos: [2, 2, 2], + state: 2 + }, + { + pos: [3, 2, 1], + state: 2 + }, + { + pos: [3, 2, 2], + state: 2 + }, + { + pos: [1, 3, 1], + state: 2 + }, + { + pos: [1, 3, 2], + state: 2 + }, + { + pos: [1, 3, 3], + state: 2 + }, + { + pos: [2, 3, 1], + state: 2 + }, + { + pos: [2, 3, 2], + state: 2 + }, + { + pos: [2, 3, 3], + state: 2 + }, + { + pos: [3, 3, 1], + state: 2 + }, + { + pos: [3, 3, 2], + state: 2 + }, + { + pos: [3, 3, 3], + state: 2 + }, + { + nbt: { + XIndex: 2, + Height: 2, + id: "computercraft:monitor_advanced", + Width: 3, + YIndex: 0 + }, + pos: [1, 1, 3], + state: 3 + }, + { + nbt: { + XIndex: 1, + Height: 2, + id: "computercraft:monitor_advanced", + Width: 3, + YIndex: 0 + }, + pos: [2, 1, 3], + state: 4 + }, + { + nbt: { + XIndex: 0, + Height: 2, + id: "computercraft:monitor_advanced", + Width: 3, + YIndex: 0 + }, + pos: [3, 1, 3], + state: 5 + }, + { + nbt: { + XIndex: 2, + Height: 2, + id: "computercraft:monitor_advanced", + Width: 3, + YIndex: 1 + }, + pos: [1, 2, 3], + state: 6 + }, + { + nbt: { + XIndex: 1, + Height: 2, + id: "computercraft:monitor_advanced", + Width: 3, + YIndex: 1 + }, + pos: [2, 2, 3], + state: 7 + }, + { + nbt: { + XIndex: 0, + Height: 2, + id: "computercraft:monitor_advanced", + Width: 3, + YIndex: 1 + }, + pos: [3, 2, 3], + state: 8 + } + ], + palette: [ + { + Name: "minecraft:polished_andesite" + }, + { + Name: "minecraft:white_concrete" + }, + { + Name: "minecraft:air" + }, + { + Properties: { + orientation: "north", + facing: "north", + state: "lu" + }, + Name: "computercraft:monitor_advanced" + }, + { + Properties: { + orientation: "north", + facing: "north", + state: "lru" + }, + Name: "computercraft:monitor_advanced" + }, + { + Properties: { + orientation: "north", + facing: "north", + state: "ru" + }, + Name: "computercraft:monitor_advanced" + }, + { + Properties: { + orientation: "north", + facing: "north", + state: "ld" + }, + Name: "computercraft:monitor_advanced" + }, + { + Properties: { + orientation: "north", + facing: "north", + state: "lrd" + }, + Name: "computercraft:monitor_advanced" + }, + { + Properties: { + orientation: "north", + facing: "north", + state: "rd" + }, + Name: "computercraft:monitor_advanced" + } + ], + DataVersion: 2586 +} diff --git a/src/testMod/server-files/structures/printouttest.in_frame_at_night.snbt b/src/testMod/server-files/structures/printouttest.in_frame_at_night.snbt new file mode 100644 index 000000000..36d88177a --- /dev/null +++ b/src/testMod/server-files/structures/printouttest.in_frame_at_night.snbt @@ -0,0 +1,646 @@ +{ + size: [5, 5, 5], + entities: [ + { + nbt: { + Motion: [0.0d, 0.0d, 0.0d], + Facing: 2b, + ItemRotation: 0b, + Invulnerable: 0b, + Air: 300s, + OnGround: 0b, + PortalCooldown: 0, + Rotation: [180.0f, 0.0f], + FallDistance: 0.0f, + Item: { + id: "computercraft:printed_page", + Count: 1b, + tag: { + Text9: " ", + Text8: " ", + Text7: " ", + Text6: " ", + Text5: " ", + Text4: " ", + Text3: " ", + Text2: " ", + Text1: "the test failed. ", + Text0: "If you're reading this, ", + Color20: "eeeeeeeeeeeeeeeeeeeeeeeee", + Text20: " ", + Title: "a.lua", + Text18: " ", + Text19: " ", + Text16: " ", + Color2: "eeeeeeeeeeeeeeeeeeeeeeeee", + Text17: " ", + Color1: "eeeeeeeeeeeeeeeeeeeeeeeee", + Text14: " ", + Color0: "eeeeeeeeeeeeeeeeeeeeeeeee", + Text15: " ", + Pages: 1, + Text12: " ", + Color6: "eeeeeeeeeeeeeeeeeeeeeeeee", + Text13: " ", + Color5: "eeeeeeeeeeeeeeeeeeeeeeeee", + Text10: " ", + Color4: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color11: "eeeeeeeeeeeeeeeeeeeeeeeee", + Text11: " ", + Color3: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color10: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color13: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color9: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color12: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color8: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color15: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color7: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color14: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color17: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color16: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color19: "eeeeeeeeeeeeeeeeeeeeeeeee", + Color18: "eeeeeeeeeeeeeeeeeeeeeeeee" + } + }, + ItemDropChance: 1.0f, + CanUpdate: 1b, + Pos: [10.5d, 7.5d, 44.96875d], + Fire: -1s, + TileY: 7, + id: "minecraft:item_frame", + TileX: 10, + Invisible: 0b, + UUID: [I; 1043973837, -2076424529, -1762893135, -165665834], + TileZ: 44, + Fixed: 0b + }, + blockPos: [2, 2, 3], + pos: [2.5d, 2.5d, 3.96875d] + }, + { + nbt: { + Brain: { + memories: {} + }, + HurtByTimestamp: 0, + Attributes: [ + { + Base: 0.699999988079071d, + Name: "minecraft:generic.movement_speed" + } + ], + Invulnerable: 0b, + FallFlying: 0b, + ShowArms: 0b, + PortalCooldown: 0, + AbsorptionAmount: 0.0f, + FallDistance: 0.0f, + DisabledSlots: 0, + CanUpdate: 1b, + DeathTime: 0s, + Pose: {}, + id: "minecraft:armor_stand", + Invisible: 1b, + UUID: [I; -1917933016, 1390888530, -2109873447, -2136052677], + Motion: [0.0d, 0.0d, 0.0d], + Small: 0b, + Health: 20.0f, + Air: 300s, + OnGround: 0b, + Marker: 1b, + Rotation: [1.3504658f, 6.7031174f], + HandItems: [ + {}, + {} + ], + CustomName: '{"text":"printouttest.in_frame_at_night"}', + Pos: [10.583196949396914d, 6.0d, 43.6089749199596d], + Fire: -1s, + ArmorItems: [ + {}, + {}, + {}, + {} + ], + NoBasePlate: 0b, + HurtTime: 0s + }, + blockPos: [2, 1, 2], + pos: [2.583196949396914d, 1.0d, 2.6089749199596d] + } + ], + blocks: [ + { + pos: [0, 0, 0], + state: 0 + }, + { + pos: [0, 0, 1], + state: 0 + }, + { + pos: [0, 0, 2], + state: 0 + }, + { + pos: [0, 0, 3], + state: 0 + }, + { + pos: [0, 0, 4], + state: 0 + }, + { + pos: [1, 0, 0], + state: 0 + }, + { + pos: [1, 0, 1], + state: 0 + }, + { + pos: [1, 0, 2], + state: 0 + }, + { + pos: [1, 0, 3], + state: 0 + }, + { + pos: [1, 0, 4], + state: 0 + }, + { + pos: [2, 0, 0], + state: 0 + }, + { + pos: [2, 0, 1], + state: 0 + }, + { + pos: [2, 0, 2], + state: 0 + }, + { + pos: [2, 0, 3], + state: 0 + }, + { + pos: [2, 0, 4], + state: 0 + }, + { + pos: [3, 0, 0], + state: 0 + }, + { + pos: [3, 0, 1], + state: 0 + }, + { + pos: [3, 0, 2], + state: 0 + }, + { + pos: [3, 0, 3], + state: 0 + }, + { + pos: [3, 0, 4], + state: 0 + }, + { + pos: [4, 0, 0], + state: 0 + }, + { + pos: [4, 0, 1], + state: 0 + }, + { + pos: [4, 0, 2], + state: 0 + }, + { + pos: [4, 0, 3], + state: 0 + }, + { + pos: [4, 0, 4], + state: 0 + }, + { + pos: [0, 1, 0], + state: 1 + }, + { + pos: [0, 1, 1], + state: 1 + }, + { + pos: [0, 1, 2], + state: 1 + }, + { + pos: [0, 1, 3], + state: 1 + }, + { + pos: [0, 1, 4], + state: 1 + }, + { + pos: [1, 1, 0], + state: 1 + }, + { + pos: [1, 1, 4], + state: 1 + }, + { + pos: [2, 1, 0], + state: 1 + }, + { + pos: [2, 1, 4], + state: 1 + }, + { + pos: [3, 1, 0], + state: 1 + }, + { + pos: [3, 1, 4], + state: 1 + }, + { + pos: [4, 1, 0], + state: 1 + }, + { + pos: [4, 1, 1], + state: 1 + }, + { + pos: [4, 1, 2], + state: 1 + }, + { + pos: [4, 1, 3], + state: 1 + }, + { + pos: [4, 1, 4], + state: 1 + }, + { + pos: [0, 2, 0], + state: 1 + }, + { + pos: [0, 2, 1], + state: 1 + }, + { + pos: [0, 2, 2], + state: 1 + }, + { + pos: [0, 2, 3], + state: 1 + }, + { + pos: [0, 2, 4], + state: 1 + }, + { + pos: [1, 2, 0], + state: 1 + }, + { + pos: [1, 2, 4], + state: 1 + }, + { + pos: [2, 2, 0], + state: 1 + }, + { + pos: [2, 2, 4], + state: 1 + }, + { + pos: [3, 2, 0], + state: 1 + }, + { + pos: [3, 2, 4], + state: 1 + }, + { + pos: [4, 2, 0], + state: 1 + }, + { + pos: [4, 2, 1], + state: 1 + }, + { + pos: [4, 2, 2], + state: 1 + }, + { + pos: [4, 2, 3], + state: 1 + }, + { + pos: [4, 2, 4], + state: 1 + }, + { + pos: [0, 3, 0], + state: 1 + }, + { + pos: [0, 3, 1], + state: 1 + }, + { + pos: [0, 3, 2], + state: 1 + }, + { + pos: [0, 3, 3], + state: 1 + }, + { + pos: [0, 3, 4], + state: 1 + }, + { + pos: [1, 3, 0], + state: 1 + }, + { + pos: [1, 3, 4], + state: 1 + }, + { + pos: [2, 3, 0], + state: 1 + }, + { + pos: [2, 3, 4], + state: 1 + }, + { + pos: [3, 3, 0], + state: 1 + }, + { + pos: [3, 3, 4], + state: 1 + }, + { + pos: [4, 3, 0], + state: 1 + }, + { + pos: [4, 3, 1], + state: 1 + }, + { + pos: [4, 3, 2], + state: 1 + }, + { + pos: [4, 3, 3], + state: 1 + }, + { + pos: [4, 3, 4], + state: 1 + }, + { + pos: [0, 4, 0], + state: 1 + }, + { + pos: [0, 4, 1], + state: 1 + }, + { + pos: [0, 4, 2], + state: 1 + }, + { + pos: [0, 4, 3], + state: 1 + }, + { + pos: [0, 4, 4], + state: 1 + }, + { + pos: [1, 4, 0], + state: 1 + }, + { + pos: [1, 4, 1], + state: 1 + }, + { + pos: [1, 4, 2], + state: 1 + }, + { + pos: [1, 4, 3], + state: 1 + }, + { + pos: [1, 4, 4], + state: 1 + }, + { + pos: [2, 4, 0], + state: 1 + }, + { + pos: [2, 4, 1], + state: 1 + }, + { + pos: [2, 4, 2], + state: 1 + }, + { + pos: [2, 4, 3], + state: 1 + }, + { + pos: [2, 4, 4], + state: 1 + }, + { + pos: [3, 4, 0], + state: 1 + }, + { + pos: [3, 4, 1], + state: 1 + }, + { + pos: [3, 4, 2], + state: 1 + }, + { + pos: [3, 4, 3], + state: 1 + }, + { + pos: [3, 4, 4], + state: 1 + }, + { + pos: [4, 4, 0], + state: 1 + }, + { + pos: [4, 4, 1], + state: 1 + }, + { + pos: [4, 4, 2], + state: 1 + }, + { + pos: [4, 4, 3], + state: 1 + }, + { + pos: [4, 4, 4], + state: 1 + }, + { + pos: [1, 1, 1], + state: 2 + }, + { + pos: [1, 1, 2], + state: 2 + }, + { + pos: [1, 1, 3], + state: 2 + }, + { + pos: [2, 1, 1], + state: 2 + }, + { + pos: [2, 1, 2], + state: 2 + }, + { + pos: [2, 1, 3], + state: 2 + }, + { + pos: [3, 1, 1], + state: 2 + }, + { + pos: [3, 1, 2], + state: 2 + }, + { + pos: [3, 1, 3], + state: 2 + }, + { + pos: [1, 2, 1], + state: 2 + }, + { + pos: [1, 2, 2], + state: 2 + }, + { + pos: [1, 2, 3], + state: 2 + }, + { + pos: [2, 2, 1], + state: 2 + }, + { + pos: [2, 2, 2], + state: 2 + }, + { + pos: [2, 2, 3], + state: 2 + }, + { + pos: [3, 2, 1], + state: 2 + }, + { + pos: [3, 2, 2], + state: 2 + }, + { + pos: [3, 2, 3], + state: 2 + }, + { + pos: [1, 3, 1], + state: 2 + }, + { + pos: [1, 3, 2], + state: 2 + }, + { + pos: [1, 3, 3], + state: 2 + }, + { + pos: [2, 3, 1], + state: 2 + }, + { + pos: [2, 3, 2], + state: 2 + }, + { + pos: [2, 3, 3], + state: 2 + }, + { + pos: [3, 3, 1], + state: 2 + }, + { + pos: [3, 3, 2], + state: 2 + }, + { + pos: [3, 3, 3], + state: 2 + } + ], + palette: [ + { + Name: "minecraft:polished_andesite" + }, + { + Name: "minecraft:white_concrete" + }, + { + Name: "minecraft:air" + } + ], + DataVersion: 2586 +}