• 1

    posted a message on How do I go about making new blocks?

    In picture:

    Posted in: MCPE: Mod / Tool Help & Requests
  • 1

    posted a message on How do I go about making new blocks?
    Block.defineBlock(id, "name", "texture", materialSourceId, opaque, rendertype);

    //name and texture must be a string


    You can create a block with different texture on each sides:

    Block.defineBlock(id, "name", [["bottom texture",type],["top texture",type],["south texture",type],["north texture",type],["west texture",type],["east texture",type]], materialSourceId, opaque, rendertype);


    If you want to create a not-whole block, use this command:

    Block.setShape(id,x1,y1,z1,x2,y2,z2);

    x1, y1, z1 are the starter point's position in the block. These are between 0 and 1, for example: 0.5, 1/16, 1/4, 2/3, etc.
    x2, y2, z2 are the ender point's position in the block. These are between 0 and 1 too. This is important: x1 < x2, y1 < y2, z1 < z2.


    If you want to create a lighting block, use this:

    Block.setLightLevel(id,level);

    level >= 0 and level <= 15.

    If you want to set destroy time, use this:

    Block.setDestroyTime(id,time);

    time = how many seconds needed to destroying


    If you want to create a transparent, translucent or opaque, use this:

    Block.setRenderLayer(id,renderLayer);


    If you want to create block more than three or for with these commands, use this shorter mode. Copy this into your mod, at the beginning:

    Block.newBlock = function(id, name, texture, x1, y1, z1, x2, y2, z2, time, level, renderLayer)
    {
    Block.defineBlock(id, name, texture, materialSourceId, opaque, rendertype);
    Block.setShape(id,x1,y1,z1,x2,y2,z2);
    Block.setLightLevel(id,level);
    Block.setDestroyTime(id,time);
    Block.setRenderLayer(id,renderLayer);
    }

    And if you want to create a block shortly, use this command:

    Block.newBlock(id, "name", "texture", x1, y1, z1, x2, y2, z2, time, level, renderLayer);

    Posted in: MCPE: Mod / Tool Help & Requests
  • To post a comment, please .