(WorldTickEvent evt)
| 102 | } |
| 103 | |
| 104 | @SubscribeEvent |
| 105 | public void tick(WorldTickEvent evt) { |
| 106 | WorldServer world = MinecraftServer.getServer().worldServers[0]; |
| 107 | long time = world.getTotalWorldTime(); |
| 108 | |
| 109 | if (startTestTime == 0) { |
| 110 | startTestTime = time; |
| 111 | } else if (testSequence == null) { |
| 112 | if (time - startTestTime > 10) { |
| 113 | |
| 114 | try { |
| 115 | testSequence = new Sequence(world); |
| 116 | |
| 117 | File file = new File(testFile); |
| 118 | FileInputStream f = new FileInputStream(file); |
| 119 | byte[] data = new byte[(int) file.length()]; |
| 120 | f.read(data); |
| 121 | f.close(); |
| 122 | |
| 123 | NBTTagCompound nbt = CompressedStreamTools.decompress(data); |
| 124 | |
| 125 | testSequence.readFromNBT(nbt); |
| 126 | } catch (FileNotFoundException e) { |
| 127 | e.printStackTrace(); |
| 128 | } catch (IOException e) { |
| 129 | e.printStackTrace(); |
| 130 | } |
| 131 | } |
| 132 | } else { |
| 133 | if (!testSequence.done()) { |
| 134 | testSequence.iterate(); |
| 135 | } else { |
| 136 | if (quitAfterRun) { |
| 137 | MinecraftServer.getServer().stopServer(); |
| 138 | System.exit(0); |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | } |
| 143 | } |
nothing calls this directly
no test coverage detected