Building blocks, except shallow blocks, are accompanied by Java classes. These Java classes contain the code for the operations and variables declared in the block. If Java code depends on other libraries, bind them to the building block.
The Java class for a building block may, just as any other Java class, extend a base class and implement different interfaces. We recommend the following:
no.ntnu.item.arctis.runtime.Block. This is the default for most templates. Blocks specialized for certain platforms may extend other classes. These classes offer access to the blockID of a block.
The constructor for a building block Java class is created by the SDK automatically, if necessary. This constructor is used for example to initialize parameters for the block. You should not edit the Java constructor of a building block, since it is generated automatically to keep it in sync with the instance parameters of the building block. A good place to initialize variables is dedicated Java method which is called when the block is started.