Global

Class contents

Methods list

These are special functions (or methods) that you may call on the object. these functions typically instruct the object to perform a certain operation.

Events list

Events are functions you add to your objects, that will be called by Cubiverse when certain things (events) occur.
    No events

Class Information

Members

(readonly) voxelType :number

Enum for voxel types
Type:
  • number

Properties:

Name Type Description
none number
grass number
rock number
ore_goal number
ore_iron number
ore_coal number
ore_radioactive number
lava number
stone number
cobblestonen number
dirt number
snow number
teleport number
sand number
wood number
empty1 number
empty2 number
empty3 number
empty4 number
empty5 number
empty6 number
empty7 number
empty8 number
empty9 number
greenTubing number
redTubing number
computerTerminal number
electronicsTerminal number
tvWelcome number
woodenPlanks number
empty10 number
glassCube number
blueTubing number
yellowPanel number
warningCube number
empty10 number
treeFoliage number
treeTransparentFoliage number
conveyorBelt number
darkMetal number
errorCube number
yellowFlower number
redFlower number
blueFlower number

Methods

registerMobSpawnEntity(MobSpawnEntityObject)

Registers an object inherited from the MobSpawnEntity object, that controls the spawning location of any mobs. This function is ONLY available from JavaScript written within a "Mob spawn entity" cube. It is used to register the actual object you created with Cubiverse, so when a mob needs to be spawned Cubiverse know's which object to call to spawn the mob.
Parameters:
Name Type Description
MobSpawnEntityObject string The actual Java-Script object you have created to handle mob spawning (inherited from MobSpawnEntity )

registerPlayerSpawnEntity(PlayerSpawnEntityObject)

Registers an object inherited from the PlayerSpawnEntity object, that controls the spawning location of any players. This function is ONLY available from JavaScript written within a "player spawn entity" cube. It is used to register the actual object you created with Cubiverse, so when a player needs to be spawned Cubiverse know's which object to call for each spawn point in your world.
Parameters:
Name Type Description
PlayerSpawnEntityObject string The actual Java-Script object you have created to handle player spawning (inherited from PlayerSpawnEntity )