1.14.19 - Crystal

A crystal is a switch that lowers or raises alternatively some special colored blocks in the ground called crystal blocks.

This type of map entity can be declared in the map data file. It can also be created dynamically with map:create_crystal().

Overview

A crystal is essentially a solid switch that inverts the configuration of crystal blocks when activated.

Crystal sprites

Two sprites for a crystal are automatically created by the engine. You can access them like for any other entity, specifying their name in entity:get_sprite([name]).

Methods inherited from map entity

Crystals are particular map entities. Therefore, they inherit all methods from the type map entity.

See Methods of all entity types to know these methods.

Methods of the type crystal

None.

Events inherited from map entity

Events are callback methods automatically called by the engine if you define them.

Crystals are particular map entities. Therefore, they inherit all events from the type map entity.

See Events of all entity types to know these events.

Events of the type crystal

None.