Files

769 B
Raw Permalink Blame History

Darklord.js — restoreBloodBlock() (satır 1615)

← Darklord.js · ← Master

function restoreBloodBlock(world, b)
{
    var state = null;
    try { state = mappet.createBlockState(String(b.id), Number(b.meta || 0)); } catch (e1) {}
    if (!state) return false;

    try
    {
        if (b.tile && String(b.tile).length > 0)
        {
            world.setTileEntity(b.x, b.y, b.z, state, mappet.createCompound(String(b.tile)));
        }
        else
        {
            world.setBlock(state, b.x, b.y, b.z);
        }

        return true;
    }
    catch (e2)
    {
        try { world.setBlock(state, b.x, b.y, b.z); return true; } catch (e3) {}
    }

    return false;
}