CoTBlockAdvanced

Link to cotblockadvanced

A registered CoT Block. Used for advanced functionality. like onRandomTick, onReplaced etc.

These functions should be run in CraftTweaker scripts, instead of ContentTweaker ones. And they are reloadable. You can get it via advanced block BEP.

This class was added by a mod with mod-id contenttweaker. Perciò, è necessario avere questa mod installata per poter utilizzare questa funzione.

Importare la Classe

Link to importare-la-classe

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import mods.contenttweaker.block.advance.CoTBlockAdvanced;

Link to setBlockColorSupplier

Name: setBlockColorSupplier

The block's color

Returns: the CoTBlockAdvanced, used for method chaining.
Return Type: CoTBlockAdvanced

ZenScript
Copy
CoTBlockAdvanced.setBlockColorSupplier(func as IBlockColorSupplier) as CoTBlockAdvanced
ParametroTipoDescrizione
Parametro
func
Tipo
IBlockColorSupplier
Descrizione
An IBlockColorSupplier. The tintIndex argument is defined by its model

Link to setIsSideInvisible

Name: setIsSideInvisible

Return Type: CoTBlockAdvanced

ZenScript
Copy
CoTBlockAdvanced.setIsSideInvisible(func as IBlockIsSideInvisible) as CoTBlockAdvanced
ParametroTipoDescrizione
Parametro
func
Tipo
IBlockIsSideInvisible
Descrizione
No Description Provided

Link to setIsTransparent

Name: setIsTransparent

Return Type: CoTBlockAdvanced

ZenScript
Copy
CoTBlockAdvanced.setIsTransparent(func as IBlockIsTransparent) as CoTBlockAdvanced
ParametroTipoDescrizione
Parametro
func
Tipo
IBlockIsTransparent
Descrizione
No Description Provided

Name: setOnActivated

Sets what will happen when a player right-clicks the block

Returns: the CoTBlockAdvanced, used for method chaining
Return Type: CoTBlockAdvanced

ZenScript
Copy
CoTBlockAdvanced.setOnActivated(func as IBlockActivated) as CoTBlockAdvanced
ParametroTipoDescrizione
Parametro
func
Tipo
IBlockActivated
Descrizione
An IBlockActivated function, the function should return an ActionResultType

Name: setOnAdded

Sets what will happen when the block is added.

Returns: the CoTBlockAdvanced, used for method chaining
Return Type: CoTBlockAdvanced

ZenScript
Copy
CoTBlockAdvanced.setOnAdded(func as IBlockAdded) as CoTBlockAdvanced
ParametroTipoDescrizione
Parametro
func
Tipo
IBlockAdded
Descrizione
No Description Provided

Link to setOnNeighborChanged

Name: setOnNeighborChanged

Sets what will happen when a neighbour of the block is changed

Returns: the CoTBlockAdvanced, used for method chaining
Return Type: CoTBlockAdvanced

ZenScript
Copy
CoTBlockAdvanced.setOnNeighborChanged(func as IBlockNeighborChanged) as CoTBlockAdvanced
ParametroTipoDescrizione
Parametro
func
Tipo
IBlockNeighborChanged
Descrizione
No Description Provided

Name: setOnRandomTick

Sets what will happen when the block receive a random tick. Throws an exception if the block does not tick randomly.

Returns: the CoTBlockAdvanced, used for method chaining
Return Type: CoTBlockAdvanced

ZenScript
Copy
CoTBlockAdvanced.setOnRandomTick(func as IBlockRandomTick) as CoTBlockAdvanced
ParametroTipoDescrizione
Parametro
func
Tipo
IBlockRandomTick
Descrizione
No Description Provided

Name: setOnReplaced

Sets what will happen when the block is replaced. (Note. destroy means replace with air)

Returns: the CoTBlockAdvanced, used for method chaining
Return Type: CoTBlockAdvanced

ZenScript
Copy
CoTBlockAdvanced.setOnReplaced(func as IBlockReplaced) as CoTBlockAdvanced
ParametroTipoDescrizione
Parametro
func
Tipo
IBlockReplaced
Descrizione
No Description Provided