Test purpose
- Create a block entity - including functionality to react to mouse enter/leave movements and an anchor which is triggered following a mouse click on the block
- Create text packets of the block, using various arguments for the block's saveAsPacket() function
- Delete the block (using the block.deregister() function)
- Attempt to recreate the block from one of the text packets previously saved
- Attempt to update the reconstituted block using a packet file downloaded from the server
- Attempt to update the block using a second packet file which includes an instruction to remove the block's anchor functionality.
Note: step 3 starts within a second of the demo loading; step 5 takes place 5 seconds into the demo; step 6 happens a further 5 seconds later. Results of the tests will print out in the browser's console.
Annotated code