The deactivated event is only used for custom blocks. This function will activate when a block is no longer powered by a redstone power source. The deactivated event is usually used along side the activated event, though it can be used by itself if you only want actions to happen when it loses power. An example of how to use the deactivated event in a block file can be found below.​

deactivated="setBlockId(origin, 124)";

This event will turn the block into a block with an id of 124 when redstone signal is cut off from the block. The deactivated event can use world functions and the origin variable.

Example Uses