Repository navigation
Block
benjamin edited this page Feb 26, 2018
·
3 revisions
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
function Block.setColor(blockId, colors);
- Set the tint of a block.
function Block.setDestroyTime(blockId, amount);
- Sets how long it takes to destroy that block. The lower the faster.
function Block.setExplosionResistance(blockId, amount);
- Sets the explosion resistance.
function Block.setLightLevel(blockId, level);
- Sets the how much light this block emits.
function Block.setRenderLayer(blockId, renderLayer);
- Sets the layer at which this block renders.
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);