Skip to content
benjamin edited this page Feb 26, 2018 · 3 revisions

defineBlock

function Block.defineBlock(blockId, name, textureName, materialSourceId, opaque, renderType);
  • blockId: The new Block ID
  • name: The block's name
  • textureName: The name of the texture, or a texture matrix Example of a texture matrix:
[["bottom texture name", subID],["top texture name", subID],["south texture name", subID],["north texture name", subID], ["west texture name", subID], ["east texture name", subID]]

Texture names, along with their subIDs.

  • materialSourceId: BROKEN Use a certain's block material as the material for this block.
  • opaque: Not transparent?
  • renderType: Render type

setColor

function Block.setColor(blockId, colors);
  • Set the tint of a block.

setDestroyTime

function Block.setDestroyTime(blockId, amount);
  • Sets how long it takes to destroy that block. The lower the faster.

setExplosionResistance

function Block.setExplosionResistance(blockId, amount);
  • Sets the explosion resistance.

setLightLevel

function Block.setLightLevel(blockId, level);
  • Sets the how much light this block emits.

setRenderLayer

function Block.setRenderLayer(blockId, renderLayer);
  • Sets the layer at which this block renders.

setShape

function Block.setShape(blockId, v1, v2, v3, v4, v5, v6);
  • Sets the Shape of a block

Block.defineBlock(blockId, name, textureNames materialSourceId, opaque, renderType);
Block.setColor(blockId, colors);
Block.setDestroyTime(blockId, amount);
Block.setExplosionResistance(blockId, amount);
Block.setLightLevel(blockId, level);
Block.setRenderLayer(blockId, renderLayer);
Block.setShape(blockId, v1, v2, v3, v4, v5, v6);

Clone this wiki locally