1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-09-28 15:08:47 +00:00

Add some tests for wired modems

This commit is contained in:
Jonathan Coates 2021-08-17 19:36:56 +01:00
parent 5eb711da87
commit 62baa72457
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
11 changed files with 1605 additions and 19 deletions

View File

@ -50,6 +50,6 @@ exclude: |
(?x)^( (?x)^(
src/generated| src/generated|
src/test/resources/test-rom/data/json-parsing/| src/test/resources/test-rom/data/json-parsing/|
src/test/server-files/| src/testMod/server-files/|
config/idea/ config/idea/
) )

View File

@ -34,7 +34,7 @@ public final class WiredModemLocalPeripheral
private static final String NBT_PERIPHERAL_TYPE = "PeripheralType"; private static final String NBT_PERIPHERAL_TYPE = "PeripheralType";
private static final String NBT_PERIPHERAL_ID = "PeripheralId"; private static final String NBT_PERIPHERAL_ID = "PeripheralId";
private int id; private int id = -1;
private String type; private String type;
private IPeripheral peripheral; private IPeripheral peripheral;

View File

@ -0,0 +1,24 @@
package dan200.computercraft.ingame
import dan200.computercraft.ingame.api.*
import dan200.computercraft.shared.Registry
import dan200.computercraft.shared.peripheral.modem.wired.BlockCable
import net.minecraft.util.math.BlockPos
class ModemTest {
@GameTest
suspend fun `Have peripherals`(context: TestContext) = context.checkComputerOk(15)
@GameTest
suspend fun `Gains peripherals`(context: TestContext) {
val position = BlockPos(2, 0, 2)
context.checkComputerOk(16, "initial")
context.setBlock(position, BlockCable.correctConnections(
context.level, context.offset(position),
Registry.ModBlocks.CABLE.get().defaultBlockState().setValue(BlockCable.CABLE, true)
))
context.checkComputerOk(16)
}
}

View File

@ -8,30 +8,35 @@ package dan200.computercraft.ingame.api;
import dan200.computercraft.ingame.mod.TestAPI; import dan200.computercraft.ingame.mod.TestAPI;
import kotlin.coroutines.Continuation; import kotlin.coroutines.Continuation;
import javax.annotation.Nonnull;
import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
/** /**
* Assertion state of a computer. * Assertion state of a computer.
* *
* @see TestAPI For the Lua interface for this. * @see TestAPI For the Lua interface for this.
* @see TestExtensionsKt#checkComputerOk(TestContext, int, Continuation) * @see TestExtensionsKt#checkComputerOk(TestContext, int, String, Continuation)
*/ */
public class ComputerState public class ComputerState
{ {
public static final String DONE = "DONE";
protected static final Map<Integer, ComputerState> lookup = new ConcurrentHashMap<>(); protected static final Map<Integer, ComputerState> lookup = new ConcurrentHashMap<>();
protected boolean done; protected final Set<String> markers = new HashSet<>();
protected String error; protected String error;
public boolean isDone() public boolean isDone( @Nonnull String marker )
{ {
return done; return markers.contains( marker );
} }
public void check() public void check( @Nonnull String marker )
{ {
if( !done ) throw new IllegalStateException( "Not yet done" ); if( !markers.contains( marker ) ) throw new IllegalStateException( "Not yet at " + marker );
if( error != null ) throw new AssertionError( error ); if( error != null ) throw new AssertionError( error );
} }

View File

@ -8,6 +8,7 @@ import net.minecraft.entity.Entity
import net.minecraft.tileentity.TileEntity import net.minecraft.tileentity.TileEntity
import net.minecraft.util.math.AxisAlignedBB import net.minecraft.util.math.AxisAlignedBB
import net.minecraft.util.math.BlockPos import net.minecraft.util.math.BlockPos
import net.minecraft.world.World
/** /**
* Wait until a predicate matches (or the test times out). * Wait until a predicate matches (or the test times out).
@ -24,13 +25,13 @@ suspend inline fun TestContext.waitUntil(fn: () -> Boolean) {
/** /**
* Wait until a computer has finished running and check it is OK. * Wait until a computer has finished running and check it is OK.
*/ */
suspend fun TestContext.checkComputerOk(id: Int) { suspend fun TestContext.checkComputerOk(id: Int, marker: String = ComputerState.DONE) {
waitUntil { waitUntil {
val computer = ComputerState.get(id) val computer = ComputerState.get(id)
computer != null && computer.isDone computer != null && computer.isDone(marker)
} }
ComputerState.get(id).check() ComputerState.get(id).check(marker)
} }
/** /**
@ -41,6 +42,9 @@ suspend fun TestContext.sleep(ticks: Int = 1) {
waitUntil { tracker.level.gameTime >= target } waitUntil { tracker.level.gameTime >= target }
} }
val TestContext.level: World
get() = tracker.level
fun TestContext.offset(pos: BlockPos): BlockPos = tracker.structureBlockPos.offset(pos.x, pos.y + 2, pos.z) fun TestContext.offset(pos: BlockPos): BlockPos = tracker.structureBlockPos.offset(pos.x, pos.y + 2, pos.z)
/** /**

View File

@ -5,6 +5,7 @@
*/ */
package dan200.computercraft.ingame.mod; package dan200.computercraft.ingame.mod;
import dan200.computercraft.ComputerCraft;
import dan200.computercraft.api.lua.IComputerSystem; import dan200.computercraft.api.lua.IComputerSystem;
import dan200.computercraft.api.lua.ILuaAPI; import dan200.computercraft.api.lua.ILuaAPI;
import dan200.computercraft.api.lua.LuaException; import dan200.computercraft.api.lua.LuaException;
@ -14,12 +15,14 @@ import dan200.computercraft.ingame.api.TestContext;
import dan200.computercraft.ingame.api.TestExtensionsKt; import dan200.computercraft.ingame.api.TestExtensionsKt;
import kotlin.coroutines.Continuation; import kotlin.coroutines.Continuation;
import java.util.Optional;
/** /**
* API exposed to computers to help write tests. * API exposed to computers to help write tests.
* *
* Note, we extend this API within startup file of computers (see {@code cctest.lua}). * Note, we extend this API within startup file of computers (see {@code cctest.lua}).
* *
* @see TestExtensionsKt#checkComputerOk(TestContext, int, Continuation) To check tests on the computer have passed. * @see TestExtensionsKt#checkComputerOk(TestContext, int, String, Continuation) To check tests on the computer have passed.
*/ */
public class TestAPI extends ComputerState implements ILuaAPI public class TestAPI extends ComputerState implements ILuaAPI
{ {
@ -33,7 +36,8 @@ public class TestAPI extends ComputerState implements ILuaAPI
@Override @Override
public void startup() public void startup()
{ {
done = false; ComputerCraft.log.info( "Computer #{} has turned on.", id );
markers.clear();
error = null; error = null;
lookup.put( id, this ); lookup.put( id, this );
} }
@ -41,6 +45,7 @@ public class TestAPI extends ComputerState implements ILuaAPI
@Override @Override
public void shutdown() public void shutdown()
{ {
ComputerCraft.log.info( "Computer #{} has shut down.", id );
if( lookup.get( id ) == this ) lookup.remove( id ); if( lookup.get( id ) == this ) lookup.remove( id );
} }
@ -53,16 +58,28 @@ public class TestAPI extends ComputerState implements ILuaAPI
@LuaFunction @LuaFunction
public final void fail( String message ) throws LuaException public final void fail( String message ) throws LuaException
{ {
if( done ) throw new LuaException( "Cannot call fail/ok multiple times." ); ComputerCraft.log.error( "Computer #{} failed with {}", id, message );
done = true; if( markers.contains( ComputerState.DONE ) ) throw new LuaException( "Cannot call fail/ok multiple times." );
markers.add( ComputerState.DONE );
error = message; error = message;
throw new LuaException( message ); throw new LuaException( message );
} }
@LuaFunction @LuaFunction
public final void ok() throws LuaException public final void ok( Optional<String> marker ) throws LuaException
{ {
if( done ) throw new LuaException( "Cannot call fail/ok multiple times." ); String actualMarker = marker.orElse( ComputerState.DONE );
done = true; if( markers.contains( ComputerState.DONE ) || markers.contains( actualMarker ) )
{
throw new LuaException( "Cannot call fail/ok multiple times." );
}
markers.add( actualMarker );
}
@LuaFunction
public final void log( String message )
{
ComputerCraft.log.info( "[Computer #{}] {}", id, message );
} }
} }

View File

@ -0,0 +1,16 @@
-- Modem_test.Have_peripherals
local function check_peripherals(expected, msg)
local peripherals = peripheral.getNames()
table.sort(peripherals)
test.eq(table.concat(expected, ", "), table.concat(peripherals, ", "), msg)
end
check_peripherals({
"monitor_0",
"printer_0",
"right",
}, "Starts with peripherals")
test.ok()

View File

@ -0,0 +1,22 @@
-- Modem_test.Gains_peripherals
local function check_peripherals(expected, msg)
local peripherals = peripheral.getNames()
table.sort(peripherals)
test.eq(table.concat(expected, ", "), table.concat(peripherals, ", "), msg)
end
check_peripherals({"back"}, "Has no peripherals on startup")
test.ok("initial")
os.pullEvent("peripheral")
sleep(0)
check_peripherals({
"back",
"monitor_1",
"printer_1",
}, "Gains new peripherals")
test.ok()

View File

@ -1,3 +1,5 @@
{ {
"computer": 14 "computer": 16,
"peripheral.monitor": 1,
"peripheral.printer": 1
} }

View File

@ -0,0 +1,741 @@
{
size: [5, 5, 5],
entities: [],
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, 2],
state: 1
},
{
pos: [0, 1, 3],
state: 1
},
{
pos: [1, 1, 0],
state: 1
},
{
pos: [2, 1, 0],
state: 1
},
{
pos: [2, 1, 1],
state: 1
},
{
pos: [2, 1, 2],
state: 1
},
{
pos: [2, 1, 3],
state: 1
},
{
pos: [2, 1, 4],
state: 1
},
{
pos: [3, 1, 0],
state: 1
},
{
pos: [3, 1, 1],
state: 1
},
{
pos: [3, 1, 3],
state: 1
},
{
pos: [3, 1, 4],
state: 1
},
{
pos: [4, 1, 0],
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, 1],
state: 1
},
{
pos: [1, 2, 2],
state: 1
},
{
pos: [1, 2, 3],
state: 1
},
{
pos: [1, 2, 4],
state: 1
},
{
pos: [2, 2, 0],
state: 1
},
{
pos: [2, 2, 1],
state: 1
},
{
pos: [2, 2, 2],
state: 1
},
{
pos: [2, 2, 3],
state: 1
},
{
pos: [2, 2, 4],
state: 1
},
{
pos: [3, 2, 0],
state: 1
},
{
pos: [3, 2, 1],
state: 1
},
{
pos: [3, 2, 2],
state: 1
},
{
pos: [3, 2, 3],
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, 1],
state: 1
},
{
pos: [1, 3, 2],
state: 1
},
{
pos: [1, 3, 3],
state: 1
},
{
pos: [1, 3, 4],
state: 1
},
{
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
},
{
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
},
{
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
},
{
nbt: {
term_text_10: " ",
term_text_11: " ",
term_textBgColour_20: "fffffffffffffffffffffffff",
term_bgColour: 15,
term_textColour_5: "0000000000000000000000000",
term_textColour_6: "0000000000000000000000000",
term_textColour_3: "0000000000000000000000000",
term_textColour_4: "0000000000000000000000000",
term_textColour_9: "0000000000000000000000000",
term_textColour_7: "0000000000000000000000000",
term_textColour_8: "0000000000000000000000000",
Items: [],
id: "computercraft:printer",
term_textColour: 0,
term_cursorX: 0,
term_text_20: " ",
term_cursorBlink: 0b,
term_palette: [I; 1118481, 13388876, 5744206, 8349260, 3368652, 11691749, 5020082, 10066329, 5000268, 15905484, 8375321, 14605932, 10072818, 15040472, 15905331, 15790320],
term_textColour_20: "0000000000000000000000000",
term_text_18: " ",
term_text_19: " ",
term_text_16: " ",
term_text_17: " ",
term_text_14: " ",
term_cursorY: 0,
term_text_15: " ",
term_text_12: " ",
term_text_13: " ",
term_textColour_18: "0000000000000000000000000",
term_textColour_19: "0000000000000000000000000",
term_textColour_16: "0000000000000000000000000",
term_textColour_17: "0000000000000000000000000",
term_text_8: " ",
term_text_7: " ",
term_text_9: " ",
term_text_4: " ",
term_textColour_10: "0000000000000000000000000",
term_text_3: " ",
term_textColour_11: "0000000000000000000000000",
term_text_6: " ",
term_text_5: " ",
term_text_0: " ",
term_textColour_14: "0000000000000000000000000",
term_textColour_15: "0000000000000000000000000",
term_text_2: " ",
term_textColour_12: "0000000000000000000000000",
term_text_1: " ",
term_textColour_13: "0000000000000000000000000",
Printing: 0b,
term_textBgColour_11: "fffffffffffffffffffffffff",
term_textBgColour_12: "fffffffffffffffffffffffff",
term_textBgColour_10: "fffffffffffffffffffffffff",
PageTitle: "",
term_textColour_1: "0000000000000000000000000",
term_textColour_2: "0000000000000000000000000",
term_textColour_0: "0000000000000000000000000",
term_textBgColour_9: "fffffffffffffffffffffffff",
term_textBgColour_8: "fffffffffffffffffffffffff",
term_textBgColour_7: "fffffffffffffffffffffffff",
term_textBgColour_6: "fffffffffffffffffffffffff",
term_textBgColour_5: "fffffffffffffffffffffffff",
term_textBgColour_19: "fffffffffffffffffffffffff",
term_textBgColour_4: "fffffffffffffffffffffffff",
term_textBgColour_3: "fffffffffffffffffffffffff",
term_textBgColour_17: "fffffffffffffffffffffffff",
term_textBgColour_2: "fffffffffffffffffffffffff",
term_textBgColour_18: "fffffffffffffffffffffffff",
term_textBgColour_1: "fffffffffffffffffffffffff",
term_textBgColour_15: "fffffffffffffffffffffffff",
term_textBgColour_0: "fffffffffffffffffffffffff",
term_textBgColour_16: "fffffffffffffffffffffffff",
term_textBgColour_13: "fffffffffffffffffffffffff",
term_textBgColour_14: "fffffffffffffffffffffffff"
},
pos: [0, 1, 0],
state: 2
},
{
nbt: {
PeripheralType: "printer",
PeirpheralAccess: 1b,
PeripheralId: 1,
id: "computercraft:cable"
},
pos: [0, 1, 1],
state: 3
},
{
nbt: {
XIndex: 0,
Height: 1,
id: "computercraft:monitor_advanced",
Width: 1,
YIndex: 0
},
pos: [0, 1, 4],
state: 4
},
{
nbt: {
PeirpheralAccess: 0b,
id: "computercraft:cable"
},
pos: [1, 1, 1],
state: 5
},
{
nbt: {
PeirpheralAccess: 0b,
id: "computercraft:cable"
},
pos: [1, 1, 2],
state: 6
},
{
nbt: {
PeirpheralAccess: 0b,
id: "computercraft:cable"
},
pos: [1, 1, 3],
state: 6
},
{
nbt: {
PeripheralType: "monitor",
PeirpheralAccess: 1b,
PeripheralId: 1,
id: "computercraft:cable"
},
pos: [1, 1, 4],
state: 7
},
{
nbt: {
PeirpheralAccess: 0b,
id: "computercraft:cable"
},
pos: [3, 1, 2],
state: 8
},
{
nbt: {
id: "computercraft:computer_advanced",
ComputerId: 16,
On: 1b
},
pos: [4, 1, 1],
state: 9
},
{
nbt: {
PeirpheralAccess: 0b,
id: "computercraft:cable"
},
pos: [4, 1, 2],
state: 10
}
],
palette: [
{
Name: "minecraft:polished_andesite"
},
{
Name: "minecraft:air"
},
{
Properties: {
top: "false",
bottom: "false",
facing: "north"
},
Name: "computercraft:printer"
},
{
Properties: {
east: "true",
waterlogged: "false",
south: "false",
north: "true",
west: "false",
modem: "north_on",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
orientation: "north",
facing: "north",
state: "none"
},
Name: "computercraft:monitor_advanced"
},
{
Properties: {
east: "false",
waterlogged: "false",
south: "true",
north: "false",
west: "true",
modem: "none",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
east: "false",
waterlogged: "false",
south: "true",
north: "true",
west: "false",
modem: "none",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
east: "false",
waterlogged: "false",
south: "false",
north: "true",
west: "true",
modem: "west_on",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
east: "true",
waterlogged: "false",
south: "false",
north: "false",
west: "false",
modem: "none",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
facing: "north",
state: "blinking"
},
Name: "computercraft:computer_advanced"
},
{
Properties: {
east: "false",
waterlogged: "false",
south: "false",
north: "true",
west: "true",
modem: "north_off",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
}
],
DataVersion: 2586
}

View File

@ -0,0 +1,755 @@
{
size: [5, 5, 5],
entities: [],
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, 3],
state: 1
},
{
pos: [1, 1, 0],
state: 1
},
{
pos: [1, 1, 1],
state: 1
},
{
pos: [2, 1, 0],
state: 1
},
{
pos: [2, 1, 1],
state: 1
},
{
pos: [2, 1, 3],
state: 1
},
{
pos: [2, 1, 4],
state: 1
},
{
pos: [3, 1, 0],
state: 1
},
{
pos: [3, 1, 1],
state: 1
},
{
pos: [3, 1, 3],
state: 1
},
{
pos: [3, 1, 4],
state: 1
},
{
pos: [4, 1, 0],
state: 1
},
{
pos: [4, 1, 1],
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, 1],
state: 1
},
{
pos: [1, 2, 2],
state: 1
},
{
pos: [1, 2, 3],
state: 1
},
{
pos: [1, 2, 4],
state: 1
},
{
pos: [2, 2, 0],
state: 1
},
{
pos: [2, 2, 1],
state: 1
},
{
pos: [2, 2, 2],
state: 1
},
{
pos: [2, 2, 3],
state: 1
},
{
pos: [2, 2, 4],
state: 1
},
{
pos: [3, 2, 0],
state: 1
},
{
pos: [3, 2, 1],
state: 1
},
{
pos: [3, 2, 2],
state: 1
},
{
pos: [3, 2, 3],
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, 1],
state: 1
},
{
pos: [1, 3, 2],
state: 1
},
{
pos: [1, 3, 3],
state: 1
},
{
pos: [1, 3, 4],
state: 1
},
{
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
},
{
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
},
{
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
},
{
nbt: {
term_text_10: " ",
term_text_11: " ",
term_textBgColour_20: "fffffffffffffffffffffffff",
term_bgColour: 15,
term_textColour_5: "0000000000000000000000000",
term_textColour_6: "0000000000000000000000000",
term_textColour_3: "0000000000000000000000000",
term_textColour_4: "0000000000000000000000000",
term_textColour_9: "0000000000000000000000000",
term_textColour_7: "0000000000000000000000000",
term_textColour_8: "0000000000000000000000000",
Items: [],
id: "computercraft:printer",
term_textColour: 0,
term_cursorX: 0,
term_text_20: " ",
term_cursorBlink: 0b,
term_palette: [I; 1118481, 13388876, 5744206, 8349260, 3368652, 11691749, 5020082, 10066329, 5000268, 15905484, 8375321, 14605932, 10072818, 15040472, 15905331, 15790320],
term_textColour_20: "0000000000000000000000000",
term_text_18: " ",
term_text_19: " ",
term_text_16: " ",
term_text_17: " ",
term_text_14: " ",
term_cursorY: 0,
term_text_15: " ",
term_text_12: " ",
term_text_13: " ",
term_textColour_18: "0000000000000000000000000",
term_textColour_19: "0000000000000000000000000",
term_textColour_16: "0000000000000000000000000",
term_textColour_17: "0000000000000000000000000",
term_text_8: " ",
term_text_7: " ",
term_text_9: " ",
term_text_4: " ",
term_textColour_10: "0000000000000000000000000",
term_text_3: " ",
term_textColour_11: "0000000000000000000000000",
term_text_6: " ",
term_text_5: " ",
term_text_0: " ",
term_textColour_14: "0000000000000000000000000",
term_textColour_15: "0000000000000000000000000",
term_text_2: " ",
term_textColour_12: "0000000000000000000000000",
term_text_1: " ",
term_textColour_13: "0000000000000000000000000",
Printing: 0b,
term_textBgColour_11: "fffffffffffffffffffffffff",
term_textBgColour_12: "fffffffffffffffffffffffff",
term_textBgColour_10: "fffffffffffffffffffffffff",
PageTitle: "",
term_textColour_1: "0000000000000000000000000",
term_textColour_2: "0000000000000000000000000",
term_textColour_0: "0000000000000000000000000",
term_textBgColour_9: "fffffffffffffffffffffffff",
term_textBgColour_8: "fffffffffffffffffffffffff",
term_textBgColour_7: "fffffffffffffffffffffffff",
term_textBgColour_6: "fffffffffffffffffffffffff",
term_textBgColour_5: "fffffffffffffffffffffffff",
term_textBgColour_19: "fffffffffffffffffffffffff",
term_textBgColour_4: "fffffffffffffffffffffffff",
term_textBgColour_3: "fffffffffffffffffffffffff",
term_textBgColour_17: "fffffffffffffffffffffffff",
term_textBgColour_2: "fffffffffffffffffffffffff",
term_textBgColour_18: "fffffffffffffffffffffffff",
term_textBgColour_1: "fffffffffffffffffffffffff",
term_textBgColour_15: "fffffffffffffffffffffffff",
term_textBgColour_0: "fffffffffffffffffffffffff",
term_textBgColour_16: "fffffffffffffffffffffffff",
term_textBgColour_13: "fffffffffffffffffffffffff",
term_textBgColour_14: "fffffffffffffffffffffffff"
},
pos: [0, 1, 0],
state: 2
},
{
nbt: {
PeripheralType: "printer",
PeirpheralAccess: 1b,
PeripheralId: 0,
id: "computercraft:cable"
},
pos: [0, 1, 1],
state: 3
},
{
nbt: {
PeirpheralAccess: 0b,
id: "computercraft:cable"
},
pos: [0, 1, 2],
state: 4
},
{
nbt: {
XIndex: 0,
Height: 1,
id: "computercraft:monitor_advanced",
Width: 1,
YIndex: 0
},
pos: [0, 1, 4],
state: 5
},
{
nbt: {
PeirpheralAccess: 0b,
id: "computercraft:cable"
},
pos: [1, 1, 2],
state: 6
},
{
nbt: {
PeirpheralAccess: 0b,
id: "computercraft:cable"
},
pos: [1, 1, 3],
state: 7
},
{
nbt: {
PeripheralType: "monitor",
PeirpheralAccess: 1b,
PeripheralId: 0,
id: "computercraft:cable"
},
pos: [1, 1, 4],
state: 8
},
{
nbt: {
PeirpheralAccess: 0b,
id: "computercraft:cable"
},
pos: [2, 1, 2],
state: 9
},
{
nbt: {
PeirpheralAccess: 0b,
id: "computercraft:cable"
},
pos: [3, 1, 2],
state: 10
},
{
nbt: {
id: "computercraft:computer_advanced",
ComputerId: 15,
On: 1b
},
pos: [4, 1, 2],
state: 11
}
],
palette: [
{
Name: "minecraft:polished_andesite"
},
{
Name: "minecraft:air"
},
{
Properties: {
top: "false",
bottom: "false",
facing: "north"
},
Name: "computercraft:printer"
},
{
Properties: {
east: "false",
waterlogged: "false",
south: "true",
north: "true",
west: "false",
modem: "north_on",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
east: "true",
waterlogged: "false",
south: "false",
north: "true",
west: "false",
modem: "none",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
orientation: "north",
facing: "north",
state: "none"
},
Name: "computercraft:monitor_advanced"
},
{
Properties: {
east: "true",
waterlogged: "false",
south: "true",
north: "false",
west: "true",
modem: "none",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
east: "false",
waterlogged: "false",
south: "true",
north: "true",
west: "false",
modem: "none",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
east: "false",
waterlogged: "false",
south: "false",
north: "true",
west: "true",
modem: "west_on",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
east: "true",
waterlogged: "false",
south: "false",
north: "false",
west: "true",
modem: "none",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
east: "true",
waterlogged: "false",
south: "false",
north: "false",
west: "true",
modem: "east_off",
up: "false",
cable: "true",
down: "false"
},
Name: "computercraft:cable"
},
{
Properties: {
facing: "north",
state: "blinking"
},
Name: "computercraft:computer_advanced"
}
],
DataVersion: 2586
}